Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFhrg-0004Rz-Oo for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Feb 2014 10:25:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WFhrf-0005xj-IX for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Feb 2014 10:25:23 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFhrd-0005xG-PV for pgsql-hackers@postgresql.org; Tue, 18 Feb 2014 10:25:21 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFhrZ-0002tZ-5D for pgsql-hackers@postgresql.org; Tue, 18 Feb 2014 10:25:20 +0000 Received: from mfs5.rdh.ecl.ntt.co.jp (mfs5.rdh.ecl.ntt.co.jp [129.60.39.144]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1IAPE40001252; Tue, 18 Feb 2014 19:25:14 +0900 Received: from mfs5.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 4036BE013A; Tue, 18 Feb 2014 19:25:14 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 33FA5E0138; Tue, 18 Feb 2014 19:25:14 +0900 (JST) Received: from postgrespc ([129.60.241.165]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1IAPEt9018853; Tue, 18 Feb 2014 19:25:14 +0900 From: "Etsuro Fujita" To: "'Shigeru Hanada'" Cc: "'PostgreSQL-development'" References: <12432.1384406906@sss.pgh.pa.us> <10163.1384786524@sss.pgh.pa.us> <52DDD071.9090405@ak.jp.nec.com> <52E5F3FD.6050000@lab.ntt.co.jp> <52E6137B.1080704@lab.ntt.co.jp> <52F4D206.7010704@lab.ntt.co.jp> <52F8BF6F.2050204@lab.ntt.co.jp> In-Reply-To: Subject: Re: inherit support for foreign tables Date: Tue, 18 Feb 2014 19:24:50 +0900 Message-ID: <000901cf2c93$a7d67c60$f7837520$@etsuro@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac8sbPcNbAHMfm9nQu6XyKYHhokpNgAJJcfw Content-Language: ja X-TM-AS-MML: No X-Pg-Spam-Score: -1.5 (-) 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 > From: Shigeru Hanada [mailto:shigeru.hanada@gmail.com] > 2014-02-10 21:00 GMT+09:00 Etsuro Fujita : > > (2014/02/07 21:31), Etsuro Fujita wrote: > >> So, I've modified the patch so > >> that we continue to disallow SET STORAGE on a foreign table *in the > >> same manner as before*, but, as your patch does, allow it on an > >> inheritance hierarchy that contains foreign tables, with the > >> semantics that we quietly ignore the foreign tables and apply the > >> operation to the plain tables, by modifying the ALTER TABLE simple > recursion mechanism. > >> Attached is the updated version of the patch. >=20 > I'm not sure that allowing ALTER TABLE against parent table affects > descendants even some of them are foreign table. I think the rule should > be simple enough to understand for users, of course it should be also > consistent and have backward compatibility. Yeah, the understandability is important. But I think the flexibility is a= lso important. In other words, I think it is a bit too inflexible that we = disallow e.g., SET STORAGE to be set on an inheritance tree that contains f= oreign table(s) because we disallow SET STORAGE to be set on foreign tables= directly. > If foreign table can be modified through inheritance tree, this kind of > change can be done. >=20 > 1) create foreign table as a child of a ordinary table > 2) run ALTER TABLE parent, the foreign table is also changed > 3) remove foreign table from the inheritance tree by ALTER TABLE child NO > INHERIT parent > 4) here we can't do same thing as 2), because it is not a child anymore. >=20 > So IMO we should determine which ALTER TABLE features are allowed to fore= ign > tables, and allow them regardless of the recursivity. What I think should be newly allowed to be set on foreign tables is * ADD table_constraint * DROP CONSTRAINT * [NO] INHERIT parent_table Thanks, Best regards, Etsuro Fujita --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers