Fix infer_arbiter_indexes() to not barf on system columns.
authorTom Lane <[email protected]>
Wed, 11 May 2016 21:06:53 +0000 (17:06 -0400)
committerTom Lane <[email protected]>
Wed, 11 May 2016 21:06:53 +0000 (17:06 -0400)
commit428484ce102b3d4e6308c8504744558c2e2d99af
tree5b019411631a63e85a68cfe7a16133957ba64316
parent58d802410ad85c44073d4ef494a9d5ac24ecba66
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.
src/backend/optimizer/util/plancat.c