postgresql/src/include/optimizer
Tom Lane 8f889b1083 Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ...
This SQL-standard feature allows a sub-SELECT yielding multiple columns
(but only one row) to be used to compute the new values of several columns
to be updated.  While the same results can be had with an independent
sub-SELECT per column, such a workaround can require a great deal of
duplicated computation.

The standard actually says that the source for a multi-column assignment
could be any row-valued expression.  The implementation used here is
tightly tied to our existing sub-SELECT support and can't handle other
cases; the Bison grammar would have some issues with them too.  However,
I don't feel too bad about this since other cases can be converted into
sub-SELECTs.  For instance, "SET (a,b,c) = row_valued_function(x)" could
be written "SET (a,b,c) = (SELECT * FROM row_valued_function(x))".
2014-06-18 13:22:34 -04:00
..
clauses.h Speed up COPY into tables with DEFAULT nextval() 2014-01-20 17:22:38 +00:00
cost.h Increase the default value of effective_cache_size to 4GB. 2014-05-08 21:11:47 -04:00
geqo.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_copy.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_gene.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_misc.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_mutation.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_pool.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_random.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_recombination.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geqo_selection.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
joininfo.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
orclauses.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pathnode.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
paths.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
placeholder.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
plancat.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
planmain.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
planner.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
predtest.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
prep.h Make security barrier views automatically updatable 2014-04-12 21:04:58 -04:00
restrictinfo.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
subselect.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
tlist.h Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ... 2014-06-18 13:22:34 -04:00
var.h Update copyright for 2014 2014-01-07 16:05:30 -05:00