mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Goodbye ABORT. Hello ERROR for all errors.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.10 1998/01/05 03:29:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.11 1998/01/07 21:01:35 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* many of the old access method routines have been turned into
|
||||
@@ -101,7 +101,7 @@ RelationGetIndexScan(Relation relation,
|
||||
IndexScanDesc scan;
|
||||
|
||||
if (!RelationIsValid(relation))
|
||||
elog(ABORT, "RelationGetIndexScan: relation invalid");
|
||||
elog(ERROR, "RelationGetIndexScan: relation invalid");
|
||||
|
||||
scan = (IndexScanDesc) palloc(sizeof(IndexScanDescData));
|
||||
|
||||
@@ -150,7 +150,7 @@ IndexScanRestart(IndexScanDesc scan,
|
||||
ScanKey key)
|
||||
{
|
||||
if (!IndexScanIsValid(scan))
|
||||
elog(ABORT, "IndexScanRestart: invalid scan");
|
||||
elog(ERROR, "IndexScanRestart: invalid scan");
|
||||
|
||||
ItemPointerSetInvalid(&scan->previousItemData);
|
||||
ItemPointerSetInvalid(&scan->currentItemData);
|
||||
@@ -191,7 +191,7 @@ void
|
||||
IndexScanEnd(IndexScanDesc scan)
|
||||
{
|
||||
if (!IndexScanIsValid(scan))
|
||||
elog(ABORT, "IndexScanEnd: invalid scan");
|
||||
elog(ERROR, "IndexScanEnd: invalid scan");
|
||||
|
||||
pfree(scan);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ void
|
||||
IndexScanRestorePosition(IndexScanDesc scan)
|
||||
{
|
||||
if (scan->flags & ScanUnmarked)
|
||||
elog(ABORT, "IndexScanRestorePosition: no mark to restore");
|
||||
elog(ERROR, "IndexScanRestorePosition: no mark to restore");
|
||||
|
||||
scan->previousItemData = scan->previousMarkData;
|
||||
scan->currentItemData = scan->currentMarkData;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.18 1998/01/05 03:29:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.19 1998/01/07 21:01:42 momjian Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* index_open - open an index relation by relationId
|
||||
@@ -103,13 +103,13 @@ Assert(RelationIsValid(relation)); \
|
||||
#define GET_REL_PROCEDURE(x,y) \
|
||||
procedure = relation->rd_am->y; \
|
||||
if (! RegProcedureIsValid(procedure)) \
|
||||
elog(ABORT, "index_%s: invalid %s regproc", \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y))
|
||||
|
||||
#define GET_SCAN_PROCEDURE(x,y) \
|
||||
procedure = scan->relation->rd_am->y; \
|
||||
if (! RegProcedureIsValid(procedure)) \
|
||||
elog(ABORT, "index_%s: invalid %s regproc", \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y))
|
||||
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.14 1998/01/05 03:29:38 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.15 1998/01/07 21:01:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -349,7 +349,7 @@ RelationGetStrategy(Relation relation,
|
||||
{
|
||||
if (!StrategyNumberIsValid(strategy))
|
||||
{
|
||||
elog(ABORT, "RelationGetStrategy: corrupted evaluation");
|
||||
elog(ERROR, "RelationGetStrategy: corrupted evaluation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ RelationInvokeStrategy(Relation relation,
|
||||
}
|
||||
}
|
||||
|
||||
elog(ABORT, "RelationInvokeStrategy: cannot evaluate strategy %d",
|
||||
elog(ERROR, "RelationInvokeStrategy: cannot evaluate strategy %d",
|
||||
strategy);
|
||||
|
||||
/* not reached, just to make compiler happy */
|
||||
@@ -514,7 +514,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
|
||||
tuple = heap_getnext(scan, false, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
elog(ABORT, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu",
|
||||
elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu",
|
||||
(uint32) operatorObjectId);
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
|
||||
|
||||
if (!RegProcedureIsValid(entry->sk_procedure))
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu",
|
||||
(uint32) operatorObjectId);
|
||||
}
|
||||
@@ -567,7 +567,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
scan = heap_beginscan(relation, false, false, 1, entry);
|
||||
tuple = heap_getnext(scan, 0, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
elog(ABORT, "IndexSupportInitialize: corrupted catalogs");
|
||||
elog(ERROR, "IndexSupportInitialize: corrupted catalogs");
|
||||
|
||||
/*
|
||||
* XXX note that the following assumes the INDEX tuple is well formed
|
||||
@@ -583,7 +583,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
{
|
||||
if (attributeIndex == 0)
|
||||
{
|
||||
elog(ABORT, "IndexSupportInitialize: no pg_index tuple");
|
||||
elog(ERROR, "IndexSupportInitialize: no pg_index tuple");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user