Missing error condition in CREATE TABLE
Missing error condition in CREATE TABLE
От:
Christopher 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
Re: Missing error condition in CREATE TABLE
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Christopher Kings-Lynne 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