Re: postgres_fdw foreign tables and serial columns

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw foreign tables and serial columns
Date: 2013-05-15 14:16:51
Message-ID: A737B7A37273E048B164557ADEF4A58B0581DDB6@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com> writes:
>> [ this error message sucks: ]
>> test=# create foreign table local_foo (id serial) server test_server options (table_name 'foo');
>> ERROR: referenced relation "local_foo" is not a table
>
> Yeah, I'd noticed that myself. We could probably tweak the code to
> issue a different error message and/or add a HINT if the serial's
> parent relation is a foreign table. I'm not exactly sure what it
> should say though. Thoughts?

HINT: Serial columns can only be defined for local tables. Use "integer" or "bigint" instead.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-05-15 14:27:34 Re: postgres_fdw foreign tables and serial columns
Previous Message Cédric Villemain 2013-05-15 14:15:40 Re: PostgreSQL 9.3 beta breaks some extensions "make install"