On Tue, Apr 28, 2015 at 09:39:02PM +0900, Amit Langote wrote: > On Tue, Apr 28, 2015 at 9:28 PM, David Fetter <da...@fetter.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 <da...@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com 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