postgresql/src/backend
Tom Lane 31ce32ade4 Fix failure to handle conflicts in non-arbiter exclusion constraints.
ExecInsertIndexTuples treated an exclusion constraint as subject to
noDupErr processing even when it was not listed in arbiterIndexes, and
would therefore not error out for a conflict in such a constraint, instead
returning it as an arbiter-index failure.  That led to an infinite loop in
ExecInsert, since ExecCheckIndexConstraints ignored the index as-intended
and therefore didn't throw the expected error.  To fix, make the exclusion
constraint code path use the same condition as the index_insert call does
to decide whether no-error-for-duplicates behavior is appropriate.  While
at it, refactor a little bit to avoid unnecessary list_member_oid calls.
(That surely wouldn't save anything worth noticing, but I find the code
a bit clearer this way.)

Per bug report from Heikki Rauhala.  Back-patch to 9.5 where ON CONFLICT
was introduced.

Report: <4C976D6B-76B4-434C-8052-D009F7B7AEDA@reaktor.fi>
2016-07-04 16:09:11 -04:00
..
access Fix handling of multixacts predating pg_upgrade 2016-06-24 18:29:28 -04:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Fix multiple minor infelicities in aclchk.c error reports. 2016-06-13 13:53:10 -04:00
commands Fix CREATE MATVIEW/CREATE TABLE AS ... WITH NO DATA to not plan the query. 2016-06-27 15:57:21 -04:00
executor Fix failure to handle conflicts in non-arbiter exclusion constraints. 2016-07-04 16:09:11 -04:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib Avoid use of float arithmetic in bipartite_match.c. 2015-08-23 13:02:19 -04:00
libpq Distrust external OpenSSL clients; clear err queue 2016-05-06 23:47:42 -04:00
main Avoid crash on old Windows with AVX2-capable CPU for VS2013 builds 2016-03-10 14:10:32 +01:00
nodes Fix CREATE MATVIEW/CREATE TABLE AS ... WITH NO DATA to not plan the query. 2016-06-27 15:57:21 -04:00
optimizer Fix infer_arbiter_indexes() to not barf on system columns. 2016-05-11 17:06:53 -04:00
parser Fix grammar's AND/OR flattening to work with operator_precedence_warning. 2016-06-03 19:12:30 -04:00
po Translation updates 2016-05-09 10:05:46 -04:00
port Support building with Visual Studio 2015 2016-04-29 08:06:25 -04:00
postmaster Make "postgres -C guc" print "" not "(null)" for null-valued GUCs. 2016-06-22 11:55:24 -04:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:11:52 -05:00
replication Fix typo in ReorderBufferIterTXNInit(). 2016-06-30 12:37:02 -04:00
rewrite Improve error message for rejecting RETURNING clauses with dropped columns. 2016-02-29 19:11:44 -05:00
snowball Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
storage Finish up XLOG_HINT renaming 2016-06-17 18:05:55 -04:00
tcop Be more predictable about reporting "lock timeout" vs "statement timeout". 2016-05-27 10:40:20 -04:00
tsearch Fix possible use of uninitialised value in ts_headline() 2016-04-08 21:25:32 +03:00
utils Be more paranoid in ruleutils.c's get_variable(). 2016-07-01 11:40:22 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile AIX: Link the postgres executable with -Wl,-brtllib. 2015-07-15 21:00:30 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00