mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	heap_delete returns int now (for non-functional deletes).
This commit is contained in:
		| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * 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 | ||||
| @@ -1114,7 +1114,7 @@ heap_insert(Relation relation, HeapTuple tup) | ||||
|  *	Must decide how to handle errors. | ||||
|  * ---------------- | ||||
|  */ | ||||
| void | ||||
| int | ||||
| heap_delete(Relation relation, ItemPointer tid) | ||||
| { | ||||
|     ItemId		lp; | ||||
| @@ -1163,7 +1163,7 @@ heap_delete(Relation relation, ItemPointer tid) | ||||
| 	if ( IsSystemRelationName(RelationGetRelationName(relation)->data) ) | ||||
| 	    RelationUnsetLockForWrite(relation); | ||||
| 	ReleaseBuffer(b); | ||||
| 	return; | ||||
| 	return (1); | ||||
|     } | ||||
|     /* ---------------- | ||||
|      *	check that we're deleteing a valid item | ||||
| @@ -1203,6 +1203,8 @@ heap_delete(Relation relation, ItemPointer tid) | ||||
|     WriteBuffer(b); | ||||
|     if ( IsSystemRelationName(RelationGetRelationName(relation)->data) ) | ||||
| 	RelationUnsetLockForWrite(relation); | ||||
|      | ||||
|     return(0); | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
| @@ -1302,10 +1304,10 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup) | ||||
| 			      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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user