]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Handle OID column inheritance correctly in ALTER TABLE ... INHERIT.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 4 Jan 2017 23:00:11 +0000 (18:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 4 Jan 2017 23:00:11 +0000 (18:00 -0500)
commit696d40d303af1e92fbbe4192a93c5a94340fc22c
tree2f154f1aa695423a0effad83ab6d861039c2962f
parent1dfe7f068121d15d59c85ecd936d154922e195d1
Handle OID column inheritance correctly in ALTER TABLE ... INHERIT.

Inheritance operations must treat the OID column, if any, much like
regular user columns.  But MergeAttributesIntoExisting() neglected to
do that, leading to weird results after a table with OIDs is associated
to a parent with OIDs via ALTER TABLE ... INHERIT.

Report and patch by Amit Langote, reviewed by Ashutosh Bapat, some
adjustments by me.  It's been broken all along, so back-patch to
all supported branches.

Discussion: https://postgr.es/m/cb13cfe7-a48c-5720-c383-bb843ab28298@lab.ntt.co.jp
src/backend/commands/tablecmds.c
src/test/regress/expected/inherit.out
src/test/regress/sql/inherit.sql