1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Goodbye ABORT. Hello ERROR for all errors.

This commit is contained in:
Bruce Momjian
1998-01-07 21:07:04 +00:00
parent e6c6146eb8
commit 679d39b9c8
99 changed files with 493 additions and 497 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.24 1998/01/05 03:29:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.25 1998/01/07 21:01:20 momjian Exp $
*
*
* INTERFACE ROUTINES
@ -295,7 +295,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b))
elog(ABORT, "heapgettup: failed ReadBuffer");
elog(ERROR, "heapgettup: failed ReadBuffer");
#endif
dp = (Page) BufferGetPage(*b);
@ -334,7 +334,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b))
{
elog(ABORT, "heapgettup: failed ReadBuffer");
elog(ERROR, "heapgettup: failed ReadBuffer");
}
#endif
@ -381,7 +381,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b))
{
elog(ABORT, "heapgettup: failed ReadBuffer");
elog(ERROR, "heapgettup: failed ReadBuffer");
}
#endif
@ -477,7 +477,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b))
{
elog(ABORT, "heapgettup: failed ReadBuffer");
elog(ERROR, "heapgettup: failed ReadBuffer");
}
#endif
dp = (Page) BufferGetPage(*b);
@ -545,7 +545,7 @@ heap_open(Oid relationId)
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
{
elog(ABORT, "%s is an index relation", r->rd_rel->relname.data);
elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
}
return (r);
@ -574,7 +574,7 @@ heap_openr(char *relationName)
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
{
elog(ABORT, "%s is an index relation", r->rd_rel->relname.data);
elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
}
return (r);
@ -626,7 +626,7 @@ heap_beginscan(Relation relation,
* ----------------
*/
if (RelationIsValid(relation) == false)
elog(ABORT, "heap_beginscan: !RelationIsValid(relation)");
elog(ERROR, "heap_beginscan: !RelationIsValid(relation)");
/* ----------------
* set relation level read lock
@ -808,7 +808,7 @@ heap_getnext(HeapScanDesc scandesc,
* ----------------
*/
if (sdesc == NULL)
elog(ABORT, "heap_getnext: NULL relscan");
elog(ERROR, "heap_getnext: NULL relscan");
/* ----------------
* initialize return buffer to InvalidBuffer
@ -1051,7 +1051,7 @@ heap_fetch(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(buffer))
{
elog(ABORT, "heap_fetch: %s relation: ReadBuffer(%lx) failed",
elog(ERROR, "heap_fetch: %s relation: ReadBuffer(%lx) failed",
&relation->rd_rel->relname, (long) tid);
}
#endif
@ -1216,7 +1216,7 @@ heap_delete(Relation relation, ItemPointer tid)
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(b))
{ /* XXX L_SH better ??? */
elog(ABORT, "heap_delete: failed ReadBuffer");
elog(ERROR, "heap_delete: failed ReadBuffer");
}
#endif /* NO_BUFFERISVALID */
@ -1249,7 +1249,7 @@ heap_delete(Relation relation, ItemPointer tid)
/* XXX call something else */
ReleaseBuffer(b);
elog(ABORT, "heap_delete: (am)invalid tid");
elog(ERROR, "heap_delete: (am)invalid tid");
}
/* ----------------
@ -1329,7 +1329,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
if (!BufferIsValid(buffer))
{
/* XXX L_SH better ??? */
elog(ABORT, "amreplace: failed ReadBuffer");
elog(ERROR, "amreplace: failed ReadBuffer");
}
#endif /* NO_BUFFERISVALID */
@ -1385,7 +1385,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
if (!tuple)
{
ReleaseBuffer(buffer);
elog(ABORT, "heap_replace: (am)invalid otid");
elog(ERROR, "heap_replace: (am)invalid otid");
}
/* XXX order problems if not atomic assignment ??? */

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Id: hio.c,v 1.12 1998/01/05 03:29:30 momjian Exp $
* $Id: hio.c,v 1.13 1998/01/07 21:01:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -60,7 +60,7 @@ RelationPutHeapTuple(Relation relation,
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(buffer))
{
elog(ABORT, "RelationPutHeapTuple: no buffer for %ld in %s",
elog(ERROR, "RelationPutHeapTuple: no buffer for %ld in %s",
blockIndex, &relation->rd_rel->relname);
}
#endif
@ -157,7 +157,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
PageInit(pageHeader, BufferGetPageSize(buffer), 0);
if (len > PageGetFreeSpace(pageHeader))
elog(ABORT, "Tuple is too big: size %d", len);
elog(ERROR, "Tuple is too big: size %d", len);
}
offnum = PageAddItem((Page) pageHeader, (Item) tuple,