There are other ways of ensuring referential integrity.
SET NULL
Instead of blocking the action (i.e., update or deletion), set the
referencing row's foreign key column(s) to null.
create table P(
p_id int not null primary key,
x int
);
create table F(
f_id int not null primary key,
p_id int references P
on delete set null
on update set null,
y int
);