Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7oBp-0008Cb-6h for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jan 2014 15:33:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W7oBo-0005kx-Ln for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jan 2014 15:33:32 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7oBm-0005jJ-Ek for pgsql-hackers@postgresql.org; Mon, 27 Jan 2014 15:33:30 +0000 Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7oBf-0003qY-VS for pgsql-hackers@postgresql.org; Mon, 27 Jan 2014 15:33:29 +0000 Received: by fetter.org (Postfix, from userid 500) id E1D3E302B69; Mon, 27 Jan 2014 07:33:22 -0800 (PST) Date: Mon, 27 Jan 2014 07:33:22 -0800 From: David Fetter To: Etsuro Fujita Cc: pgsql-hackers@postgresql.org Subject: Re: inherit support for foreign tables Message-ID: <20140127153322.GB11668@fetter.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52E6137B.1080704@lab.ntt.co.jp> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -0.9 (/) 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 On Mon, Jan 27, 2014 at 05:06:19PM +0900, Etsuro Fujita wrote: > Hi Hanada-san, > > While still reviwing this patch, I feel this patch has given enough > consideration to interactions with other commands, but found the > following incorrect? behabior: > > postgres=# CREATE TABLE product (id INTEGER, description TEXT); > CREATE TABLE > postgres=# CREATE FOREIGN TABLE product1 () INHERITS (product) > SERVER fs OPTIONS (filename '/home/foo/product1.csv', format 'csv'); > CREATE FOREIGN TABLE > postgres=# ALTER TABLE product ALTER COLUMN description SET STORAGE > EXTERNAL; > ERROR: "product1" is not a table or materialized view > > ISTN the ALTER TABLE simple recursion mechanism (ie > ATSimpleRecursion()) should be modified for the ALTER COLUMN SET > STORAGE case. This points to a larger discussion about what precisely foreign tables can and cannot inherit from local ones. I don't think that a generic solution will be satisfactory, as the PostgreSQL FDW could, at least in principle, support many more than the CSV FDW, as shown above. In my estimation, the outcome of discussion above is not a blocker for this patch. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers