Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Date: 2015-04-26 02:55:27
Message-ID: CAKFQuwZHs_Xo+uLaQC9zt-HOf0RzorqeZ3ExkKBVMM9QE_8eEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, April 25, 2015, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-04-26 03:11:52 Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Previous Message Tom Lane 2015-04-26 02:16:12 Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?