diff options
Diffstat (limited to 'src/backend/utils/adt/ri_triggers.c')
-rw-r--r-- | src/backend/utils/adt/ri_triggers.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 20ad56c31f1..b195e243393 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -17,7 +17,7 @@ * * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.73 2004/09/13 20:07:13 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.74 2004/10/15 22:40:11 tgl Exp $ * * ---------- */ @@ -224,10 +224,15 @@ RI_FKey_check(PG_FUNCTION_ARGS) * We should not even consider checking the row if it is no longer * valid since it was either deleted (doesn't matter) or updated (in * which case it'll be checked with its final values). + * + * We do not know what buffer the new_row is in, but it doesn't matter + * since it's not possible for a hint-bit update to occur here (the + * new_row could only contain our own XID, and we haven't yet committed + * or aborted...) */ if (new_row) { - if (!HeapTupleSatisfiesItself(new_row->t_data)) + if (!HeapTupleSatisfiesItself(new_row->t_data, InvalidBuffer)) { heap_close(pk_rel, RowShareLock); return PointerGetDatum(NULL); |