Missing error condition in CREATE TABLE

Started by Christopher Kings-Lynneover 22 years ago2 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

Hi,

Shouldn't this be a WARNING or an ERROR? Trying to create a table
WITHOUT OIDS that inherits from a table WITH OIDS silently ignores the
WITHOUT OIDS specification. It think that should be a warning...

test=# create table a (a int4);
CREATE TABLE
test=# create table c () inherits (a) without oids;
CREATE TABLE
test=# select relhasoids from pg_class where relname='c';
relhasoids
------------
t
(1 row)

Chris

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Missing error condition in CREATE TABLE

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

Shouldn't this be a WARNING or an ERROR? Trying to create a table
WITHOUT OIDS that inherits from a table WITH OIDS silently ignores the
WITHOUT OIDS specification. It think that should be a warning...

I'm not convinced. You might as well claim it's wrong that the child
inherits other parent columns that you didn't specify in its CREATE
command. IOW, for user columns a column will appear in the child if
it's defined by the parent or by the child --- seems to me that OID
should work the same.

regards, tom lane