Re: Proof of concept: auto updatable views [Review of Patch]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Thom Brown <thom(at)linux(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Amit kapila <amit(dot)kapila(at)huawei(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proof of concept: auto updatable views [Review of Patch]
Date: 2012-12-09 22:00:49
Message-ID: 17225.1355090449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2012-12-09 22:13:27 Re: Proof of concept: auto updatable views [Review of Patch]
Previous Message Karl O. Pinc 2012-12-09 21:58:26 Re: Submission Review: User control over psql error stream