pgsql: Fix infer_arbiter_indexes() to not barf on system columns.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix infer_arbiter_indexes() to not barf on system columns.
Date: 2016-05-11 21:07:01
Message-ID: E1b0bLR-0001jg-2V@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix infer_arbiter_indexes() to not barf on system columns.

While it could be argued that rejecting system column mentions in the
ON CONFLICT list is an unsupported feature, falling over altogether
just because the table has a unique index on OID is indubitably a bug.

As far as I can tell, fixing infer_arbiter_indexes() is sufficient to
make ON CONFLICT (oid) actually work, though making a regression test
for that case is problematic because of the impossibility of setting
the OID counter to a known value.

Minor cosmetic cleanups along with the bug fix.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/428484ce102b3d4e6308c8504744558c2e2d99af

Modified Files
--------------
src/backend/optimizer/util/plancat.c | 43 ++++++++++++++----------------------
1 file changed, 16 insertions(+), 27 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-05-11 21:09:00 Re: pgsql: Fix assorted missing infrastructure for ON CONFLICT.
Previous Message Peter Geoghegan 2016-05-11 21:00:35 Re: pgsql: Fix assorted missing infrastructure for ON CONFLICT.