Last active
January 27, 2021 15:00
-
-
Save nirbhayc/dc958d2b71163f3af35002b5d36c4f2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table t1 { | |
schema | |
{ | |
int i | |
} | |
keys | |
{ | |
"idx1" = i | |
} | |
} $$ | |
create table t2 { | |
schema | |
{ | |
int i | |
} | |
keys | |
{ | |
"idx2" = i | |
} | |
constraints | |
{ | |
"fk" = "idx2" -> <"t1":"idx1"> on delete restrict | |
} | |
}$$ | |
insert into t1 values(1); | |
insert into t2 values(1); | |
delete from t1; | |
[delete from t1] failed with rc 3 verify key constraint cannot resolve constraint table 't1' index '0' key 'IDX1' -> table 't2' index '0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment