Find file History
Latest commit 3850723 Dec 4, 2016 @tglsfdc tglsfdc Don't mess up pstate->p_next_resno in transformOnConflictClause().
transformOnConflictClause incremented p_next_resno while generating the
phony targetlist for the EXCLUDED pseudo-rel.  Then that field got
incremented some more during transformTargetList, possibly leading to
free_parsestate concluding that we'd overrun the allowed length of a tlist,
as reported by Justin Pryzby.

We could fix this by resetting p_next_resno to 1 after using it for the
EXCLUDED pseudo-rel tlist, but it seems easier and less coupled to other
places if we just don't use that field at all in this loop.  (Note that
this doesn't change anything about the resnos that end up appearing in
the main target list, because those are all replaced with target-column
numbers by updateTargetListEntry.)

In passing, fix incorrect type OID assigned to the whole-row Var for
"EXCLUDED.*" (somehow this escaped having any bad consequences so far,
but it's certainly wrong); remove useless assignment to var->location;
pstrdup the column names in case of a relcache flush; and improve
nearby comments.

Back-patch to 9.5 where ON CONFLICT was introduced.

Failed to load latest commit information.
backend Don't mess up pstate->p_next_resno in transformOnConflictClause(). Dec 4, 2016
bin Add max_parallel_workers GUC. Dec 2, 2016
common Rename "pg_xlog" directory to "pg_wal". Oct 20, 2016
fe_utils Teach appendShellString() to not quote strings containing "-". Sep 6, 2016
include Fix thinko in b3427da. Dec 2, 2016
interfaces libpq: Fix inadvertent change in PQhost() behavior. Dec 1, 2016
makefiles Provide NO_INSTALLCHECK option for pgxs. Nov 14, 2016
pl Check that result tupdesc has exactly 1 column in return_next scalar … Nov 15, 2016
port Make pgwin32_putenv() probe every known CRT, regardless of compiler. Dec 4, 2016
template Remove "sco" and "unixware" ports. Oct 11, 2016
test Document recipe for testing compatibility with old Perl. Dec 4, 2016
timezone More zic cleanup. Nov 6, 2016
tools Introduce dynamic shared memory areas. Dec 2, 2016
tutorial Update copyright for 2016 Jan 2, 2016
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. Sep 22, 2010
DEVELOPERS Replace a couple of references to files that no longer exist in the s… May 4, 2009
Makefile Install TAP test infrastructure so it's available for extension testing. Sep 23, 2016 Allow individual TAP tests to be run via PROVE_TESTS Nov 14, 2016
Makefile.shlib Remove "sco" and "unixware" ports. Oct 11, 2016
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. Oct 8, 2012 search build dir for source files, too Jun 7, 2016
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. Oct 8, 2012