Re: A question about code in DefineRelation()

From: Hadi Moshayedi <hadi(at)moshayedi(dot)net>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A question about code in DefineRelation()
Date: 2014-04-25 13:39:34
Message-ID: CAK=1=Wo2Cx4vsCFhiE8O3Be0F9fg70PedBnSPiqn=yofSbHMpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-25 14:24:39 Re: Composite Datums containing toasted fields are a bad idea(?)
Previous Message Dmitry Dolgov 2014-04-25 12:43:23 Re: Json(b) extension