Gregory Stark <st...@enterprisedb.com> writes: > Tom Lane <t...@sss.pgh.pa.us> writes: >> ON UPDATE DO INSTEAD SUBSTITUTE base_table [ (base_column_name, ...) ] >> [ WHERE ... ] >> >> ON UPDATE DO INSTEAD >> UPDATE base_table SET base_col_1 = new.derived_col_1, base_col_2 ... >> WHERE CURRENT OF VIEW;
> What would happen with these if the view is defined with "SELECT *" and I add > a new column or drop columns from the table? Nothing, just as happens now, because the * got expanded to a set column list by the parser before the view ever got defined. > This same machinery isn't present in the normal executor is it? I mean, if I > can update a view then ISTM I should be able to update a view written inline > in the query like: > UPDATE (select * from a where x=1) set y=2 That is not a view; the primary reason why not being that there are no applicable rules. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers