当前位置: 动力学知识库 > 问答 > 编程问答 >

sql - Postgresql foreign data wrapper constraints

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: