The following script: CREATE TABLE t1 (a int, PRIMARY KEY (a)); CREATE TABLE t (a int, PRIMARY KEY (a), FOREIGN KEY (a) REFERENCES t1) PARTITION BY LIST (a); ALTER TABLE t ATTACH PARTITION t1 FOR VALUES IN (1); ALTER TABLE t DETACH PARTITION t1; ALTER TABLE t ATTACH PARTITION t1 FOR VALUES IN (1);
ends up with the error complaining about check triggers: ERROR: XX000: could not find ON INSERT check triggers of foreign key constraint 16400 LOCATION: GetForeignKeyCheckTriggers, tablecmds.c:11260
Reproduced on REL_15_STABLE (starting from f4566345c) .. master.
Hi Alexander,
I saw the same error in [1]. I guess it is same issue.
I send a patch in [1], but it may need a more work.