• [Info-ingres] An off the wall request...... updateable view

    From Karl Schendel@21:1/5 to Ingres and related product discussi on Wed Mar 3 12:06:07 2021
    On Mar 3, 2021, at 11:55 AM, Allan Biggs <allanb4@iname.com> wrote:

    Also sent to the OpenROAD group

    I have spent the day wishing that I could update a view.

    You can update a simple view that is just select columns from a table, and
    I think a where clause is allowed.

    The Standard allows updating a more general view, with a whole slew
    of rules and regulations about what you can and can't update; but Ingres
    has never bothered to implement it.

    Karl

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to Karl Schendel on Wed Mar 3 17:50:58 2021
    Karl Schendel wrote:


    On Mar 3, 2021, at 11:55 AM, Allan Biggs <allanb4@iname.com> wrote:

    Also sent to the OpenROAD group

    I have spent the day wishing that I could update a view.

    You can update a simple view that is just select columns from a table, and
    I think a where clause is allowed.

    The Standard allows updating a more general view, with a whole slew
    of rules and regulations about what you can and can't update; but Ingres
    has never bothered to implement it.

    What Karl said. And if the view was created WITH CHECK OPTION you can
    update it only in such a way that a successful update doesn't cause the
    updated row(s) to disappear from the view.

    The rules are much the same as for an updateable cursor.

    Intererestingly not only can you update views, Ingres allows you to
    define rules that fire when you you update a view just like rules on
    a base table. I don't think that ability is mentioned in the
    documentation but it is correct behaviour and it works. (Just don't
    ask me to look after any system where you do that to make magical
    things to happen.)

    Incidentally, in 2013 Chris Date wrote an entire book (largely
    unhindered by any thoughts of SQL): View Updating and Relational
    Theory, ISBN 978-1-449-35784-9. I see the bookmark in my copy is well
    over a quarter of the way through it...

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karl Schendel@21:1/5 to Ingres and related product discussi on Wed Mar 3 13:19:32 2021
    On Mar 3, 2021, at 12:50 PM, Roy Hann <specially@processed.almost.meat> wrote:

    ...

    Incidentally, in 2013 Chris Date wrote an entire book (largely
    unhindered by any thoughts of SQL): View Updating and Relational
    Theory, ISBN 978-1-449-35784-9. I see the bookmark in my copy is well
    over a quarter of the way through it...

    I applaud you for not carelessly rushing things!

    Karl

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)