Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > The generic issue there is whether we can allow column defaults to be > evaluated on the remote end. The original postgres_fdw submission tried > to support that, but it had enough bugs and logical inconsistencies that > I ended up ripping that out before c

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Tom Lane
Stephen Frost writes: > I'm alright with allowing it and making it the 'default', but I can > certainly see use-cases for having a sequence on the remote side which > is used for new values for that table and I'd suggest that we figure out > a way to support that. The generic issue there is wheth

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Stephen Frost
* Andrew Dunstan (and...@dunslane.net) wrote: > On 05/15/2013 10:27 AM, Tom Lane wrote: > >You can certainly argue that it might be silly to have a local sequence > >generating the default value for insertions into a remote table; but > >on the other hand, it might not be silly, depending on usage

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Andrew Dunstan
On 05/15/2013 10:27 AM, Tom Lane wrote: You can certainly argue that it might be silly to have a local sequence generating the default value for insertions into a remote table; but on the other hand, it might not be silly, depending on usage scenario. I don't think the database should be enforci

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Tom Lane
Albe Laurenz writes: > Tom Lane wrote: >> "Nicholson, Brad (Toronto, ON, CA)" 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'

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Albe Laurenz
Tom Lane wrote: > "Nicholson, Brad (Toronto, ON, CA)" 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 c

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Atri Sharma
Sent from my iPad On 15-May-2013, at 18:56, Tom Lane wrote: > "Nicholson, Brad (Toronto, ON, CA)" writes: >> [ this error message sucks: ] >> test=# create foreign table local_foo (id serial) server test_server options >> (table_name 'foo');

Re: [HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Tom Lane
"Nicholson, Brad (Toronto, ON, CA)" 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 Yea

[HACKERS] postgres_fdw foreign tables and serial columns

2013-05-15 Thread Nicholson, Brad (Toronto, ON, CA)
Hi, I'm kicking the tires on the 9.3 postgres_fdw stuff - I'm not sure if this is an issue or intended behavior, but it was pretty confusing based on the error message that was output. If you try creating a foreign table with a reference to a serial data type, it comes back with a "referenced