Re: ATSimpleRecursion() and inheritance foreign parents

From: David Fetter <david(at)fetter(dot)org>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ATSimpleRecursion() and inheritance foreign parents
Date: 2015-04-28 12:50:28
Message-ID: 20150428125028.GD31463@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 28, 2015 at 09:39:02PM +0900, Amit Langote wrote:
> On Tue, Apr 28, 2015 at 9:28 PM, David Fetter <david(at)fetter(dot)org> wrote:
> > On Tue, Apr 28, 2015 at 03:17:08PM +0900, Amit Langote wrote:
> >>
> >> An example,
> >> postgres=# alter foreign table fparent alter a type char;
> >> ALTER FOREIGN TABLE
> >>
> >> postgres=# select * from fparent;
> >> ERROR: attribute "a" of relation "fchild1" does not match parent's type
> >>
> >> Above error, AIUI, is hit much before it is determined that fparent is a
> >> foreign table, whereas the following is FDW-specific (waiting to happen) error,
> >>
> >> postgres=# alter foreign table fparent add b char;
> >> ALTER FOREIGN TABLE
> >>
> >> postgres=# SELECT * FROM fparent;
> >> ERROR: column "b" does not exist
> >> CONTEXT: Remote SQL command: SELECT a, b FROM public.parent
> >
> > I'm pretty sure this is a bug. The way I see it, foreign tables can
> > either fully participate in table inheritance, or not at all, because
> > any inconsistencies here will cause confusion at best.
> >
>
> As mentioned by Fujita-san, the first one is definitely a bug (he sent
> a patch) but the second one is not quite related to inheritance; that
> is, it can happen irrespective of foreign tables participating in
> inheritance and is documented.

My mistake. Sorry for the noise.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-28 13:04:37 Re: pgsql: Add transforms feature
Previous Message Amit Langote 2015-04-28 12:39:02 Re: ATSimpleRecursion() and inheritance foreign parents