Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yidsd-0001hs-4B for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2015 07:06:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yidsc-0004lK-KL for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2015 07:06:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yidsb-0004lC-HP for pgsql-hackers@postgresql.org; Thu, 16 Apr 2015 07:06:29 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YidsY-0005RY-8O for pgsql-hackers@postgresql.org; Thu, 16 Apr 2015 07:06:27 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id t3G76K51015117; Thu, 16 Apr 2015 16:06:20 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 4C9CC5F631; Thu, 16 Apr 2015 16:06:20 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 3D88D5F623; Thu, 16 Apr 2015 16:06:20 +0900 (JST) Received: from [129.60.241.75] ([129.60.241.75]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id t3G76JDN015763; Thu, 16 Apr 2015 16:06:20 +0900 Message-ID: <552F5F49.6000105@lab.ntt.co.jp> Date: Thu, 16 Apr 2015 16:05:45 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Tom Lane CC: Ashutosh Bapat , Kyotaro HORIGUCHI , Heikki Linnakangas , Noah Misch , Shigeru Hanada , pgsql-hackers Subject: Re: inherit support for foreign tables References: <543D0261.6020803@lab.ntt.co.jp> <54461BEB.9000707@lab.ntt.co.jp> <5449EE98.1040704@lab.ntt.co.jp> <20141107.145713.169337282.horiguchi.kyotaro@lab.ntt.co.jp> <545CB4A2.1030303@lab.ntt.co.jp> <54645499.7050709@lab.ntt.co.jp> <5476FB4B.9060705@lab.ntt.co.jp> <5487BB9D.7070605@lab.ntt.co.jp> <30555.1418853840@sss.pgh.pa.us> <5497FE79.7090804@lab.ntt.co.jp> <19367.1419262577@sss.pgh.pa.us> <54B76DD2.1040106@lab.ntt.co.jp> <54E6DB4E.40801@lab.ntt.co.jp> <21104.1427047056@sss.pgh.pa.us> In-Reply-To: <21104.1427047056@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------060801070602090805040601" X-TM-AS-MML: disable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------060801070602090805040601 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit On 2015/03/23 2:57, Tom Lane wrote: > Etsuro Fujita writes: >> [ fdw-inh-8.patch ] > > I've committed this with some substantial rearrangements, notably: > * As I mentioned earlier, I got rid of a few unnecessary restrictions on > foreign tables so as to avoid introducing warts into inheritance behavior. > In particular, we now allow NOT VALID CHECK constraints (and hence ALTER > ... VALIDATE CONSTRAINT), ALTER SET STORAGE, and ALTER SET WITH/WITHOUT > OIDS. These are probably no-ops anyway for foreign tables, though > conceivably an FDW might choose to implement some behavior for STORAGE > or OIDs. I agree with you on this point. However, ISTM there is a bug in handling OIDs on foreign tables; while we now allow for ALTER SET WITH/WITHOUT OIDS, we still don't allow the default_with_oids parameter for foreign tables. I think that since CREATE FOREIGN TABLE should be consistent with ALTER FOREIGN TABLE, we should also allow the parameter for foreign tables. Attached is a patch for that. Best regards, Etsuro Fujita --------------060801070602090805040601 Content-Type: text/x-diff; name="tablecmd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tablecmd.patch" *** a/src/backend/commands/tablecmds.c --- b/src/backend/commands/tablecmds.c *************** *** 580,586 **** DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, descriptor = BuildDescForRelation(schema); localHasOids = interpretOidsOption(stmt->options, ! (relkind == RELKIND_RELATION)); descriptor->tdhasoid = (localHasOids || parentOidCount > 0); /* --- 580,587 ---- descriptor = BuildDescForRelation(schema); localHasOids = interpretOidsOption(stmt->options, ! (relkind == RELKIND_RELATION || ! relkind == RELKIND_FOREIGN_TABLE)); descriptor->tdhasoid = (localHasOids || parentOidCount > 0); /* --------------060801070602090805040601 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------060801070602090805040601--