*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.14 1997/08/19 21:29:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.15 1997/08/27 09:00:20 vadim Exp $
*
*
* INTERFACE ROUTINES
* Must decide how to handle errors.
* ----------------
*/
-void
+int
heap_delete(Relation relation, ItemPointer tid)
{
ItemId lp;
if ( IsSystemRelationName(RelationGetRelationName(relation)->data) )
RelationUnsetLockForWrite(relation);
ReleaseBuffer(b);
- return;
+ return (1);
}
/* ----------------
* check that we're deleteing a valid item
WriteBuffer(b);
if ( IsSystemRelationName(RelationGetRelationName(relation)->data) )
RelationUnsetLockForWrite(relation);
+
+ return(0);
}
/* ----------------
NowTimeQual,
0,
(ScanKey)NULL))
- {
- ReleaseBuffer(buffer);
- elog(WARN, "heap_replace: (am)invalid otid");
- }
+ {
+ ReleaseBuffer(buffer);
+ elog(WARN, "heap_replace: (am)invalid otid");
+ }
/* XXX order problems if not atomic assignment ??? */
tup->t_oid = tp->t_oid;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.8 1997/08/26 23:31:53 momjian Exp $
+ * $Id: heapam.h,v 1.9 1997/08/27 09:03:47 vadim Exp $
*
*-------------------------------------------------------------------------
*/
extern HeapTuple heap_fetch(Relation relation, TimeQual timeQual,
ItemPointer tid, Buffer *b);
extern Oid heap_insert(Relation relation, HeapTuple tup);
-extern void heap_delete(Relation relation, ItemPointer tid);
+extern int heap_delete(Relation relation, ItemPointer tid);
extern int heap_replace(Relation relation, ItemPointer otid,
HeapTuple tup);
extern void heap_markpos(HeapScanDesc sdesc);