1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Remove support for temporal RESTRICT foreign keys

It isn't clear how these should behave, so let's wait to implement them
until we are sure how to do it.

This feature was initially added by commit 89f908a6d0, so it hasn't
been released yet.

Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://postgr.es/m/e773bc11-4ac1-40de-bb91-814e02f05b6d%40eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-03-10 11:29:54 +01:00
parent e033696596
commit b83e8a2ca2
4 changed files with 11 additions and 402 deletions

View File

@ -10052,7 +10052,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
*/
if (fkconstraint->fk_with_period)
{
if (fkconstraint->fk_upd_action == FKCONSTR_ACTION_CASCADE ||
if (fkconstraint->fk_upd_action == FKCONSTR_ACTION_RESTRICT ||
fkconstraint->fk_upd_action == FKCONSTR_ACTION_CASCADE ||
fkconstraint->fk_upd_action == FKCONSTR_ACTION_SETNULL ||
fkconstraint->fk_upd_action == FKCONSTR_ACTION_SETDEFAULT)
ereport(ERROR,
@ -10060,7 +10061,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("unsupported %s action for foreign key constraint using PERIOD",
"ON UPDATE"));
if (fkconstraint->fk_del_action == FKCONSTR_ACTION_CASCADE ||
if (fkconstraint->fk_del_action == FKCONSTR_ACTION_RESTRICT ||
fkconstraint->fk_del_action == FKCONSTR_ACTION_CASCADE ||
fkconstraint->fk_del_action == FKCONSTR_ACTION_SETNULL ||
fkconstraint->fk_del_action == FKCONSTR_ACTION_SETDEFAULT)
ereport(ERROR,