postgresql/src/backend
Tom Lane d43a619c60 Fix check_srf_call_placement() to handle VALUES cases correctly.
INSERT ... VALUES with a single VALUES row is implemented quite differently
from the general VALUES case.  A user-visible implication of that is that
we accept SRFs in the single-row case, but not in the multi-row case.
That's a historical artifact no doubt, but in view of the lack of field
complaints, I'm not excited about fixing it right now.

However, check_srf_call_placement() needs to know about this, first because
it should throw an error in the unsupported case, and second because it
should set p_hasTargetSRFs in the single-row case (because we treat that
like a SELECT tlist).  That's an oversight in commit a4c35ea1c.

To fix, split EXPR_KIND_VALUES into two values.  So far as I can see,
this is the only place where we need to distinguish the two cases at
present; but there might be more later.

Patch by me, per report from Andres Freund.

Discussion: https://postgr.es/m/20170116081548.zg63zltblwimpfgp@alap3.anarazel.de
2017-01-16 15:23:11 -05:00
..
access Improve coding in _hash_addovflpage. 2017-01-10 08:31:03 -05:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
commands Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
executor Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
foreign Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
lib Fix overflow check in StringInfo; add missing casts 2017-01-10 11:41:13 -03:00
libpq Re-allow SSL passphrase prompt at server start, but not thereafter. 2017-01-04 12:44:03 -05:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
optimizer Fix matching of boolean index columns to sort ordering. 2017-01-15 14:09:35 -05:00
parser Fix check_srf_call_placement() to handle VALUES cases correctly. 2017-01-16 15:23:11 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Re-allow SSL passphrase prompt at server start, but not thereafter. 2017-01-04 12:44:03 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rewrite Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage Fix typos in comments. 2017-01-16 18:55:34 +09:00
tcop Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
tsearch Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
utils Fix NULL pointer dereference in tuplesort.c. 2017-01-16 13:53:40 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00