diff options
| author | Tom Lane | 2001-01-23 04:32:23 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-01-23 04:32:23 +0000 |
| commit | 786f1a59cd44f890b2423e15ba3ab172dab968bf (patch) | |
| tree | 30a730a13a351ac02264f7f48ab6145eb7c51e17 /src/include/access | |
| parent | 7a2a1acd520761b479c9dfc4a8e573aeec626094 (diff) | |
Fix all the places that called heap_update() and heap_delete() without
bothering to check the return value --- which meant that in case the
update or delete failed because of a concurrent update, you'd not find
out about it, except by observing later that the transaction produced
the wrong outcome. There are now subroutines simple_heap_update and
simple_heap_delete that should be used anyplace that you're not prepared
to do the full nine yards of coping with concurrent updates. In
practice, that seems to mean absolutely everywhere but the executor,
because *noplace* else was checking.
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/heapam.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 7618cc55ae5..461599cee12 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.60 2000/12/27 23:59:13 tgl Exp $ + * $Id: heapam.h,v 1.61 2001/01/23 04:32:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -209,6 +209,9 @@ extern int heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid); extern int heap_update(Relation relation, ItemPointer otid, HeapTuple tup, ItemPointer ctid); extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf); +extern void simple_heap_delete(Relation relation, ItemPointer tid); +extern void simple_heap_update(Relation relation, ItemPointer otid, + HeapTuple tup); extern void heap_markpos(HeapScanDesc scan); extern void heap_restrpos(HeapScanDesc scan); |
