Reputation: 12111
I want to create a foreign table and add a column with a constraint. It would look something like this:
CREATE FOREIGN TABLE test (
id integer CHECK(id > 1),
value character varying
) server test options (
tablename 'test',
db_url 'url',
primary_key 'id'
);
It gives me the error:
ERROR: constraints are not supported on foreign tables
LINE 2: id int CHECK (id > 1),
So apparently at the moment this is not possible. Is there any workaround for this? If not then will this work in the future at some point? I'm on PostgreSQL 9.3.3 using FDW plugin Multicorn and my foreign table is on MySQL database.
Upvotes: 2
Views: 1142