Re: [HACKERS] postgres_fdw foreign keys with default sequence

2015-02-18 Thread Kevin Grittner
Tim Kane wrote: > CREATE MATERIALISED VIEW local.devices; > > CREATE test_table (device_id bigint FOREIGN KEY (device_id) REFERENCES > local.devices (device_id) ); > > ERROR: referenced relation "devices" is not a table In the future, please show code that you have actually run. In this case

Re: [HACKERS] postgres_fdw foreign keys with default sequence

2015-02-17 Thread Tim Kane
Slight typo on my local host example there. s/clone/local/ More like the below: CREATE FOREIGN TABLE IF NOT EXISTS live.devices ( device_id bigint NOT NULL ); CREATE MATERIALISED VIEW local.devices; CREATE test_table (device_id bigint FOREIGN KEY (device_id) REFERENCES *local*.devic

[HACKERS] postgres_fdw foreign keys with default sequence

2015-02-17 Thread Tim Kane
Hi all, Not sure if this has been reported already, it seems to be a variation on this thread: http://www.postgresql.org/message-id/20130515151059.go4...@tamriel.snowman.net One minor difference is, in my scenario - my source table field is defined as BIGINT (not serial) - though it does have a