Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WCpYL-00018T-8r for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2014 12:01:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WCpYK-00059U-Pn for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2014 12:01:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WCpYJ-00059F-FB for pgsql-hackers@postgresql.org; Mon, 10 Feb 2014 12:01:31 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WCpYE-0006Uf-Ex for pgsql-hackers@postgresql.org; Mon, 10 Feb 2014 12:01:31 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1AC1M3w022103; Mon, 10 Feb 2014 21:01:22 +0900 Received: from mfs6.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 6594AE0132; Mon, 10 Feb 2014 21:01:22 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 594A9E0130; Mon, 10 Feb 2014 21:01:22 +0900 (JST) Received: from [129.60.241.153] ([129.60.241.153]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1AC1MKj017129; Mon, 10 Feb 2014 21:01:22 +0900 Message-ID: <52F8BF6F.2050204@lab.ntt.co.jp> Date: Mon, 10 Feb 2014 21:00:47 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Shigeru Hanada CC: PostgreSQL-development Subject: Re: inherit support for foreign tables 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> In-Reply-To: <52F4D206.7010704@lab.ntt.co.jp> Content-Type: text/plain; charset=Shift_JIS Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Pg-Spam-Score: -2.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 (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. > > I'll continue the patch review a bit more, though the patch looks good > generally to me except for the abobe issue and the way that the ANALYZE > command works. While reviwing the patch, I've found some issues on interactions with other commands, other than the SET STORAGE command. * ADD table_constraint NOT VALID: the patch allows ADD table_constraint *NOT VALID* to be set on a foreign table as well as an inheritance hierarchy that contains foreign tables. But I think it would be better to disallow ADD table_constraint *NOT VALID* on a foreign table, but allow it on an inheritance hierarchy that contains foreign tables, with the semantics that we apply the operation to the plain tables and apply the transformed operation *ADD table_constraint* to the foreign tables. * VALIDATE CONSTRAINT constraint_name: though the patch disallow the direct operation on foreign tables, it allows the operation on an inheritance hierarchy that contains foreign tables, and the operation fails if there is at least one foreign table that has at least one NOT VALID constraint. I think it would be better to modify the patch so that we allow the operation on an inheritance hierarchy that contains foreign tables, with the semantics that we quietly ignore the foreign tables and apply the operation on the plain tables just like the semantics of SET STORAGE. (Note that the foreign tables wouldn't have NOT VALID constraints by diallowing ADD table_constraint *NOT VALID* on foreign tables as mentioned above.) * SET WITH OIDS: though the patch disallow the direct operation on foreign tables, it allows the operation on an inheritance hierarchy that contains foreign tables, and that operation is successfully done on foreign tables. I think it would be better to modify the patch so that we 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 just like the semantics of SET STORAGE. Comments are wellcome! Thanks, Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers