Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property? - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Date
Msg-id CAKFQuwZHs_Xo+uLaQC9zt-HOf0RzorqeZ3ExkKBVMM9QE_8eEg@mail.gmail.com
Whole thread Raw
In response to Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
List pgsql-hackers
On Saturday, April 25, 2015, Tom Lane <tgl@sss.pgh.pa.us> wrote:

It's perhaps debatable whether it should act that way, but in the absence
of complaints from the field, I'm hesitant to change these cases.  It
might be better if the effective behavior were "table gets OIDs if
default_with_oids = true or WITH OIDS is given or base table has OIDs".

+1
 

Still another case that needs to be thought about is "create table likeit
(like base) without oids" where base does have OIDs.  Probably the right
thing here is to let the WITHOUT OIDS spec override what we see in base.


Why are oids special in this manner?  No other inherited column can be omitted from the child table.  Though I guess unlike inherits there is no reason to mandate the final result be identical to the base table - though here is something to be said for pointing out the inconsistency and requiring the user to alter table if indeed they want to have the oid-ness changed.

David J.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Next
From: Tom Lane
Date:
Subject: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?