-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
@mapleflow
Description
Env:
Ubuntu 14.04, Django 1.10.5, pg_pathman 1.3, postgresql 9.6
table product
reference table msg
alter table product add constraint
product_msg_fk
foreign key(msg_id)
references msg(id)
deferrable initially deferred;
msg
works well when directly insert
,but when i insert into product
record, error occur
django.db.utils.IntegrityError: insert or update on table "product" violates
foreign key constraint "product_msg_fk"
DETAIL: Key (msg_id)=(100) is not present in table "msg".
all data are exists in correct partition, i create partition by table msg
field create_time
.
Anything wrong with my sql, django project or pg_pathman config?