pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix CREATE TABLE ... LIKE ... WITH OIDS. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix CREATE TABLE ... LIKE ... WITH OIDS. @ 2016-12-22 21:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-12-22 21:23 UTC (permalink / raw) To: pgsql-committers Fix CREATE TABLE ... LIKE ... WITH OIDS. Having a WITH OIDS specification should result in the creation of an OID column, but commit b943f502b broke that in the case that there were LIKE tables without OIDS. Commentary in that patch makes it look like this was intentional, but if so it was based on a faulty reading of what inheritance does: the parent tables can add an OID column, but they can't subtract one. AFAICS, the behavior ought to be that you get an OID column if any of the inherited tables, LIKE tables, or WITH clause ask for one. Also, revert that patch's unnecessary split of transformCreateStmt's loop over the tableElts list into two passes. That seems to have been based on a misunderstanding as well: we already have two-pass processing here, we don't need three passes. Per bug #14474 from Jeff Dafoe. Back-patch to 9.6 where the misbehavior was introduced. Report: https://postgr.es/m/20161222145304.25620.47445@wrigleys.postgresql.org Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/1ead0208b2178089b024caa2d1465a3f3056a45c Modified Files -------------- src/backend/parser/parse_utilcmd.c | 52 +++++++++---------------- src/test/regress/expected/create_table_like.out | 9 ++++- src/test/regress/sql/create_table_like.sql | 5 ++- 3 files changed, 30 insertions(+), 36 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix CREATE TABLE ... LIKE ... WITH OIDS. @ 2016-12-22 21:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-12-22 21:23 UTC (permalink / raw) To: pgsql-committers Fix CREATE TABLE ... LIKE ... WITH OIDS. Having a WITH OIDS specification should result in the creation of an OID column, but commit b943f502b broke that in the case that there were LIKE tables without OIDS. Commentary in that patch makes it look like this was intentional, but if so it was based on a faulty reading of what inheritance does: the parent tables can add an OID column, but they can't subtract one. AFAICS, the behavior ought to be that you get an OID column if any of the inherited tables, LIKE tables, or WITH clause ask for one. Also, revert that patch's unnecessary split of transformCreateStmt's loop over the tableElts list into two passes. That seems to have been based on a misunderstanding as well: we already have two-pass processing here, we don't need three passes. Per bug #14474 from Jeff Dafoe. Back-patch to 9.6 where the misbehavior was introduced. Report: https://postgr.es/m/20161222145304.25620.47445@wrigleys.postgresql.org Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/68330c8b42ade797995fb84f46af7549c041ad1e Modified Files -------------- src/backend/parser/parse_utilcmd.c | 53 +++++++++---------------- src/test/regress/expected/create_table_like.out | 9 ++++- src/test/regress/sql/create_table_like.sql | 5 ++- 3 files changed, 31 insertions(+), 36 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-12-22 21:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-12-22 21:23 pgsql: Fix CREATE TABLE ... LIKE ... WITH OIDS. Tom Lane <tgl@sss.pgh.pa.us> 2016-12-22 21:23 pgsql: Fix CREATE TABLE ... LIKE ... WITH OIDS. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox