mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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/rtree/Attic/rtproc.c,v 1.14 1998/01/07 18:46:15 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.15 1998/01/07 21:02:05 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ rt_box_union(BOX *a, BOX *b)
|
||||
BOX *n;
|
||||
|
||||
if ((n = (BOX *) palloc(sizeof(*n))) == (BOX *) NULL)
|
||||
elog(ABORT, "Cannot allocate box for union");
|
||||
elog(ERROR, "Cannot allocate box for union");
|
||||
|
||||
n->high.x = Max(a->high.x, b->high.x);
|
||||
n->high.y = Max(a->high.y, b->high.y);
|
||||
@@ -45,7 +45,7 @@ rt_box_inter(BOX *a, BOX *b)
|
||||
BOX *n;
|
||||
|
||||
if ((n = (BOX *) palloc(sizeof(*n))) == (BOX *) NULL)
|
||||
elog(ABORT, "Cannot allocate box for union");
|
||||
elog(ERROR, "Cannot allocate box for union");
|
||||
|
||||
n->high.x = Min(a->high.x, b->high.x);
|
||||
n->high.y = Min(a->high.y, b->high.y);
|
||||
@@ -94,7 +94,7 @@ rt_poly_union(POLYGON *a, POLYGON *b)
|
||||
p = (POLYGON *) palloc(sizeof(POLYGON));
|
||||
|
||||
if (!PointerIsValid(p))
|
||||
elog(ABORT, "Cannot allocate polygon for union");
|
||||
elog(ERROR, "Cannot allocate polygon for union");
|
||||
|
||||
MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
|
||||
p->size = sizeof(POLYGON);
|
||||
@@ -136,7 +136,7 @@ rt_poly_inter(POLYGON *a, POLYGON *b)
|
||||
p = (POLYGON *) palloc(sizeof(POLYGON));
|
||||
|
||||
if (!PointerIsValid(p))
|
||||
elog(ABORT, "Cannot allocate polygon for intersection");
|
||||
elog(ERROR, "Cannot allocate polygon for intersection");
|
||||
|
||||
MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
|
||||
p->size = sizeof(POLYGON);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.20 1998/01/05 03:30:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.21 1998/01/07 21:02:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ rtbuild(Relation heap,
|
||||
*/
|
||||
|
||||
if (oldPred == NULL && (nb = RelationGetNumberOfBlocks(index)) != 0)
|
||||
elog(ABORT, "%s already contains data", index->rd_rel->relname.data);
|
||||
elog(ERROR, "%s already contains data", index->rd_rel->relname.data);
|
||||
|
||||
/* initialize the root page (if this is a new index) */
|
||||
if (oldPred == NULL)
|
||||
@@ -664,7 +664,7 @@ rtintinsert(Relation r,
|
||||
*/
|
||||
|
||||
if (IndexTupleSize(old) != IndexTupleSize(ltup))
|
||||
elog(ABORT, "Variable-length rtree keys are not supported.");
|
||||
elog(ERROR, "Variable-length rtree keys are not supported.");
|
||||
|
||||
/* install pointer to left child */
|
||||
memmove(old, ltup, IndexTupleSize(ltup));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.14 1998/01/05 03:30:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.15 1998/01/07 21:02:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
|
||||
|
||||
if (!IndexScanIsValid(s))
|
||||
{
|
||||
elog(ABORT, "rtrescan: invalid scan.");
|
||||
elog(ERROR, "rtrescan: invalid scan.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ rtdropscan(IndexScanDesc s)
|
||||
}
|
||||
|
||||
if (l == (RTScanList) NULL)
|
||||
elog(ABORT, "rtree scan list corrupted -- cannot find 0x%lx", s);
|
||||
elog(ERROR, "rtree scan list corrupted -- cannot find 0x%lx", s);
|
||||
|
||||
if (prev == (RTScanList) NULL)
|
||||
RTScans = l->rtsl_next;
|
||||
@@ -400,7 +400,7 @@ adjustiptr(IndexScanDesc s,
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ABORT, "Bad operation in rtree scan adjust: %d", op);
|
||||
elog(ERROR, "Bad operation in rtree scan adjust: %d", op);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user