Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit815b20a

Browse files
committed
Restore RI trigger sanity check
I unnecessarily removed this check in3de241d because Imisunderstood what the final representation of constraints across apartitioning hierarchy was to be. Put it back (in both branches).Discussion:https://postgr.es/m/201901222145.t6wws6t6vrcu@alvherre.pgsql
1 parentc1afd17 commit815b20a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎src/backend/utils/adt/ri_triggers.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,13 @@ ri_FetchConstraintInfo(Trigger *trigger, Relation trig_rel, bool rel_is_pk)
17391739
elog(ERROR,"wrong pg_constraint entry for trigger \"%s\" on table \"%s\"",
17401740
trigger->tgname,RelationGetRelationName(trig_rel));
17411741
}
1742+
else
1743+
{
1744+
if (riinfo->fk_relid!=RelationGetRelid(trig_rel)||
1745+
riinfo->pk_relid!=trigger->tgconstrrelid)
1746+
elog(ERROR,"wrong pg_constraint entry for trigger \"%s\" on table \"%s\"",
1747+
trigger->tgname,RelationGetRelationName(trig_rel));
1748+
}
17421749

17431750
if (riinfo->confmatchtype!=FKCONSTR_MATCH_FULL&&
17441751
riinfo->confmatchtype!=FKCONSTR_MATCH_PARTIAL&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp