Skip to content

Commit a75d369

Browse files
committed
Fix for after update trigger and unique defferrable constraints
1 parent e4421fe commit a75d369

File tree

2 files changed

+387
-2
lines changed

2 files changed

+387
-2
lines changed

src/backend/commands/constraint.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ unique_key_recheck(PG_FUNCTION_ARGS)
9191
if (table_get_row_ref_type(trigdata->tg_relation) == ROW_REF_ROWID)
9292
{
9393
bool isnull;
94-
checktidDatum = slot_getsysattr(trigdata->tg_trigslot, RowIdAttributeNumber, &isnull);
94+
checktidDatum = slot_getsysattr(trigdata->tg_newslot, RowIdAttributeNumber, &isnull);
9595
Assert(!isnull);
9696
}
9797
else
9898
{
99-
checktidDatum = ItemPointerGetDatum(&trigdata->tg_trigslot->tts_tid);
99+
checktidDatum = ItemPointerGetDatum(&trigdata->tg_newslot->tts_tid);
100100
}
101101
}
102102
else

0 commit comments

Comments
 (0)