Re: A question about code in DefineRelation() - Mailing list pgsql-hackers

From Hadi Moshayedi
Subject Re: A question about code in DefineRelation()
Date
Msg-id CAK=1=Wo2Cx4vsCFhiE8O3Be0F9fg70PedBnSPiqn=yofSbHMpw@mail.gmail.com
Whole thread Raw
In response to Re: A question about code in DefineRelation()  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: A question about code in DefineRelation()  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Re: A question about code in DefineRelation()  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers


On second thought I noticed that that makes CREATE FOREIGN TABLE include
an OID column in newly-created foreign tables wrongly, when the
default_with_oids parameter is set to on.  Please find attached a patch.


The fix makes sense to me, since in ALTER TABLE SET WITH OIDS we check that the relation is a table and not a foreign table:

3160 case AT_AddOids: /* SET WITH OIDS */
3161 ATSimplePermissions(rel, ATT_TABLE);

So, I think we should be consistent between DefineRelation() and alter table.

-- Hadi.

pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Json(b) extension
Next
From: Tom Lane
Date:
Subject: Re: Composite Datums containing toasted fields are a bad idea(?)