Tom Lane writes:
> SQL92 gives this restriction on WHERE clauses for updatable views:
>
> d) If the <table expression> immediately contained in QS imme-
> diately contains a <where clause> WC, then no leaf generally
> underlying table of QS shall be a generally underlying table
> of any <query expression> contained in WC.
>
> which conveys nothing to my mind :-(, except that they're restricting
> sub-SELECTs in WHERE somehow. Can anyone translate that into English?
No table mentioned in the FROM-clause (in PG even implicitly) of the query
expression (or view definition) is allowed to be mentioned in a subquery
in the WHERE clause of the query expression (or view definition).
The phrasing "leaf" and "generally" underlying is only to make this
statement theoretically pure because you can create generally underlying
tables that look different but do the same thing (different join syntax),
whereas a leaf generally underlying table is guaranteed to be a real base
table.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter