postgresql/src/backend/utils
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
..
adt Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ... 2014-06-18 13:22:34 -04:00
cache Silence a couple of spurious valgrind warnings in inval.c. 2014-05-24 17:34:22 +02:00
error pgindent run for 9.4 2014-05-06 12:12:18 -04:00
fmgr pgindent run for 9.4 2014-05-06 12:12:18 -04:00
hash pgindent run for 9.4 2014-05-06 12:12:18 -04:00
init pgindent run for 9.4 2014-05-06 12:12:18 -04:00
mb Fix typos in comments. 2014-06-11 19:50:29 -04:00
misc Small typo and formatting fixes in postgresql.conf.sample 2014-05-25 23:21:41 -04:00
mmgr pgindent run for 9.4 2014-05-06 12:12:18 -04:00
resowner pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sort Improve tuplestore's error messages for I/O failures. 2014-06-12 18:59:06 -04:00
time Fix longstanding bug in HeapTupleSatisfiesVacuum(). 2014-06-04 21:36:19 +02:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Update copyright for 2014 2014-01-07 16:05:30 -05:00
Gen_dummy_probes.sed Update copyright for 2014 2014-01-07 16:05:30 -05:00
Gen_fmgrtab.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
generate-errcodes.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Fix build with LWLOCK_STATS or dtrace. 2014-03-21 23:26:34 +01:00