Re: Proof of concept: auto updatable views [Review of Patch] - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Proof of concept: auto updatable views [Review of Patch]
Date
Msg-id CA+U5nMKPOfiawG+C5OSbJKGQEDPATrYSuXqPogRJM-wrWCvu6w@mail.gmail.com
Whole thread Raw
In response to Re: Proof of concept: auto updatable views [Review of Patch]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proof of concept: auto updatable views [Review of Patch]  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 9 December 2012 22:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>> It's a shame though that pg_view_is_updatable() and
>> pg_view_is_insertable() are not really useful for identifying
>> potentially updatable views (e.g., consider an auto-updatable view on
>> top of a trigger-updatable view). I'm left wondering if I
>> misinterpreted the SQL standard's intentions when separating out the
>> concepts of "updatable" and "trigger updatable". It seems like it
>> would have been more useful to have "trigger updatable" imply
>> "updatable".
>
> I wondered about that too, but concluded that they were separate after
> noticing that the standard frequently writes things like "updatable or
> trigger updatable".  They wouldn't need to write that if the latter
> implied the former.
>
> But in any case, those functions are expensive enough that I can't see
> running them against every view in the DB anytime somebody hits tab.
> I think just allowing tab-completion to include all views is probably
> the best compromise.

I'm surprised to see that "updateable" and "trigger updateable" states
aren't recorded in the catalog somewhere. ISTM a useful thing to be
able to know about a view and not something we should be calculating
on the fly. That has nothing much to do with tab completion, it just
seems like a generally useful thing.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Proof of concept: auto updatable views [Review of Patch]
Next
From: Tomas Vondra
Date:
Subject: Re: CommitFest #3 and upcoming schedule