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:
@ -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,
|
||||
|
Reference in New Issue
Block a user