Skip to content

Commit bfcb973

Browse files
committed
Fix for after update trigger and unique defferrable constraints
1 parent 740875d commit bfcb973

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
@@ -89,12 +89,12 @@ unique_key_recheck(PG_FUNCTION_ARGS)
8989
if (table_get_row_ref_type(trigdata->tg_relation) == ROW_REF_ROWID)
9090
{
9191
bool isnull;
92-
checktidDatum = slot_getsysattr(trigdata->tg_trigslot, RowIdAttributeNumber, &isnull);
92+
checktidDatum = slot_getsysattr(trigdata->tg_newslot, RowIdAttributeNumber, &isnull);
9393
Assert(!isnull);
9494
}
9595
else
9696
{
97-
checktidDatum = ItemPointerGetDatum(&trigdata->tg_trigslot->tts_tid);
97+
checktidDatum = ItemPointerGetDatum(&trigdata->tg_newslot->tts_tid);
9898
}
9999
}
100100
else

0 commit comments

Comments
 (0)