From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: shigeru.hanada@gmail.com
Cc: fujita.etsuro@lab.ntt.co.jp
Cc: pgsql-hackers@postgresql.org
Subject: Re: inherit support for foreign tables
Date: Tue, 18 Feb 2014 09:49:23 -0500
Message-ID: <24104.1392734963@sss.pgh.pa.us> (raw)
In-Reply-To: <20140218.192919.27127653.horiguchi.kyotaro@lab.ntt.co.jp>
References: <52F4D206.7010704@lab.ntt.co.jp>
<52F8BF6F.2050204@lab.ntt.co.jp>
<CAEZqfEdiZWEXuSQg2r=q7t_0Zb7JBvs2jgWEWAd089HyNM2oFw@mail.gmail.com>
<20140218.192919.27127653.horiguchi.kyotaro@lab.ntt.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> Could you guess any use cases in which we are happy with ALTER
> TABLE's inheritance tree walking? IMHO, ALTER FOREIGN TABLE
> always comes with some changes of the data source so implicitly
> invoking of such commands should be defaultly turned off. If the
> ALTER'ing the whole familiy is deadfully useful for certain
> cases, it might be explicitly turned on by some syntax added to
> CREATE FOREIGN TABLE or ALTER TABLE.
> It would looks like following,
> CREATE FOREIGN TABLE ft1 () INHERITS (pt1 ALLOW_INHERITED_ALTER, pt2);
> ALTER TABLE INCLUDE FOREIGN CHILDREN parent ADD COLUMN add1 integer;
Ugh. This adds a lot of logical complication without much real use,
IMO. The problems that have been discussed in this thread are that
certain types of ALTER are sensible to apply to foreign tables and
others are not --- so how does a one-size-fits-all switch help that?
Also, there are some types of ALTER for which recursion to children
*must* occur or things become inconsistent --- ADD COLUMN itself is
an example, and ADD CONSTRAINT is another. It would not be acceptable
for an ALLOW_INHERITED_ALTER switch to suppress that, but if the
switch is leaky then it's even less consistent and harder to explain.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, horiguchi.kyotaro@lab.ntt.co.jp, shigeru.hanada@gmail.com, fujita.etsuro@lab.ntt.co.jp
Subject: Re: inherit support for foreign tables
In-Reply-To: <24104.1392734963@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox