Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreign key referencing table in a different schema - not allowed. #3855

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Foreign key referencing table in a different schema - not allowed. #3855

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2015-11-09 16:40:39 +0100
From: Endre Palatinus <>
To: SQL devs <>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes

Last updated: 2016-01-15 11:37:42 +0100

Comment 21496

Date: 2015-11-09 16:40:39 +0100
From: Endre Palatinus <>

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/537.86.2
Build Identifier:

It is not possible to add a foreign key reference to a column of a table belonging to a schema different to the table's schema being created.

Reproducible: Always

Steps to Reproduce:

create schema schema1;
create schema schema2;
create table schema1.basetable(id serial);
create table schema1.childtable(id serial, fk int references schema1.basetable(id));
create table schema2.childtable(id serial, fk int references schema1.basetable(id));

Actual Results:

operation successful
operation successful
operation successful
operation successful
CONSTRAINT FOREIGN KEY: no such table 'basetable'

Expected Results:

operation successful
operation successful
operation successful
operation successful
operation successful

Comment 21553

Date: 2015-11-18 19:51:05 +0100
From: @njnes

we now handle foreign keys between tables in different schemas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant