1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-07 11:02: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

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.29 1998/01/05 03:28:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.30 1998/01/07 21:00:40 momjian Exp $
* *
* NOTES * NOTES
* The old interface functions have been converted to macros * The old interface functions have been converted to macros
@ -93,7 +93,7 @@ ComputeDataSize(TupleDesc tupleDesc,
break; break;
default: default:
if (att[i]->attlen < sizeof(int32)) if (att[i]->attlen < sizeof(int32))
elog(ABORT, "ComputeDataSize: attribute %d has len %d", elog(ERROR, "ComputeDataSize: attribute %d has len %d",
i, att[i]->attlen); i, att[i]->attlen);
if (att[i]->attalign == 'd') if (att[i]->attalign == 'd')
data_length = DOUBLEALIGN(data_length) + att[i]->attlen; data_length = DOUBLEALIGN(data_length) + att[i]->attlen;
@ -194,7 +194,7 @@ DataFill(char *data,
break; break;
default: default:
if (att[i]->attlen < sizeof(int32)) if (att[i]->attlen < sizeof(int32))
elog(ABORT, "DataFill: attribute %d has len %d", elog(ERROR, "DataFill: attribute %d has len %d",
i, att[i]->attlen); i, att[i]->attlen);
if (att[i]->attalign == 'd') if (att[i]->attalign == 'd')
{ {
@ -249,10 +249,10 @@ heap_attisnull(HeapTuple tup, int attnum)
break; break;
case 0: case 0:
elog(ABORT, "heap_attisnull: zero attnum disallowed"); elog(ERROR, "heap_attisnull: zero attnum disallowed");
default: default:
elog(ABORT, "heap_attisnull: undefined negative attnum"); elog(ERROR, "heap_attisnull: undefined negative attnum");
} }
return (0); return (0);
@ -290,7 +290,7 @@ heap_sysattrlen(AttrNumber attno)
return sizeof f->t_cmax; return sizeof f->t_cmax;
default: default:
elog(ABORT, "sysattrlen: System attribute number %d unknown.", attno); elog(ERROR, "sysattrlen: System attribute number %d unknown.", attno);
return 0; return 0;
} }
} }
@ -328,7 +328,7 @@ heap_sysattrbyval(AttrNumber attno)
break; break;
default: default:
byval = true; byval = true;
elog(ABORT, "sysattrbyval: System attribute number %d unknown.", elog(ERROR, "sysattrbyval: System attribute number %d unknown.",
attno); attno);
break; break;
} }
@ -358,7 +358,7 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
case MaxCommandIdAttributeNumber: case MaxCommandIdAttributeNumber:
return ((Datum) (long) tup->t_cmax); return ((Datum) (long) tup->t_cmax);
default: default:
elog(ABORT, "heap_getsysattr: undefined attnum %d", attnum); elog(ERROR, "heap_getsysattr: undefined attnum %d", attnum);
} }
return ((Datum) NULL); return ((Datum) NULL);
} }
@ -538,7 +538,7 @@ fastgetattr(HeapTuple tup,
default: default:
if (att[j]->attlen < sizeof(int32)) if (att[j]->attlen < sizeof(int32))
{ {
elog(ABORT, elog(ERROR,
"fastgetattr: attribute %d has len %d", "fastgetattr: attribute %d has len %d",
j, att[j]->attlen); j, att[j]->attlen);
} }
@ -598,7 +598,7 @@ fastgetattr(HeapTuple tup,
break; break;
default: default:
if (att[i]->attlen < sizeof(int32)) if (att[i]->attlen < sizeof(int32))
elog(ABORT, elog(ERROR,
"fastgetattr2: attribute %d has len %d", "fastgetattr2: attribute %d has len %d",
i, att[i]->attlen); i, att[i]->attlen);
if (att[i]->attalign == 'd') if (att[i]->attalign == 'd')
@ -657,7 +657,7 @@ fastgetattr(HeapTuple tup,
break; break;
default: default:
if (att[attnum]->attlen < sizeof(int32)) if (att[attnum]->attlen < sizeof(int32))
elog(ABORT, "fastgetattr3: attribute %d has len %d", elog(ERROR, "fastgetattr3: attribute %d has len %d",
attnum, att[attnum]->attlen); attnum, att[attnum]->attlen);
if (att[attnum]->attalign == 'd') if (att[attnum]->attalign == 'd')
off = DOUBLEALIGN(off); off = DOUBLEALIGN(off);
@ -686,7 +686,7 @@ heap_copytuple(HeapTuple tuple)
/* XXX For now, just prevent an undetectable executor related error */ /* XXX For now, just prevent an undetectable executor related error */
if (tuple->t_len > MAXTUPLEN) if (tuple->t_len > MAXTUPLEN)
{ {
elog(ABORT, "palloctup: cannot handle length %d tuples", elog(ERROR, "palloctup: cannot handle length %d tuples",
tuple->t_len); tuple->t_len);
} }
@ -773,7 +773,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
} }
if (numberOfAttributes > MaxHeapAttributeNumber) if (numberOfAttributes > MaxHeapAttributeNumber)
elog(ABORT, "heap_formtuple: numberOfAttributes of %d > %d", elog(ERROR, "heap_formtuple: numberOfAttributes of %d > %d",
numberOfAttributes, MaxHeapAttributeNumber); numberOfAttributes, MaxHeapAttributeNumber);
if (hasnull) if (hasnull)
@ -883,7 +883,7 @@ heap_modifytuple(HeapTuple tuple,
} }
else if (repl[attoff] != 'r') else if (repl[attoff] != 'r')
{ {
elog(ABORT, "heap_modifytuple: repl is \\%3d", repl[attoff]); elog(ERROR, "heap_modifytuple: repl is \\%3d", repl[attoff]);
} }
else else

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.21 1998/01/05 03:28:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.22 1998/01/07 21:00:43 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ index_formtuple(TupleDesc tupleDescriptor,
int numberOfAttributes = tupleDescriptor->natts; int numberOfAttributes = tupleDescriptor->natts;
if (numberOfAttributes > MaxIndexAttributeNumber) if (numberOfAttributes > MaxIndexAttributeNumber)
elog(ABORT, "index_formtuple: numberOfAttributes of %d > %d", elog(ERROR, "index_formtuple: numberOfAttributes of %d > %d",
numberOfAttributes, MaxIndexAttributeNumber); numberOfAttributes, MaxIndexAttributeNumber);
@ -103,7 +103,7 @@ index_formtuple(TupleDesc tupleDescriptor,
*/ */
if (size & 0xE000) if (size & 0xE000)
elog(ABORT, "index_formtuple: data takes %d bytes: too big", size); elog(ERROR, "index_formtuple: data takes %d bytes: too big", size);
infomask |= size; infomask |= size;
@ -314,7 +314,7 @@ fastgetiattr(IndexTuple tup,
off = (att[j]->attalign == 'd') ? off = (att[j]->attalign == 'd') ?
DOUBLEALIGN(off) : LONGALIGN(off); DOUBLEALIGN(off) : LONGALIGN(off);
else else
elog(ABORT, "fastgetiattr: attribute %d has len %d", elog(ERROR, "fastgetiattr: attribute %d has len %d",
j, att[j]->attlen); j, att[j]->attlen);
break; break;
@ -382,7 +382,7 @@ fastgetiattr(IndexTuple tup,
DOUBLEALIGN(off) + att[i]->attlen : DOUBLEALIGN(off) + att[i]->attlen :
LONGALIGN(off) + att[i]->attlen; LONGALIGN(off) + att[i]->attlen;
else else
elog(ABORT, "fastgetiattr2: attribute %d has len %d", elog(ERROR, "fastgetiattr2: attribute %d has len %d",
i, att[i]->attlen); i, att[i]->attlen);
break; break;
@ -409,7 +409,7 @@ fastgetiattr(IndexTuple tup,
break; break;
default: default:
if (att[attnum]->attlen < sizeof(int32)) if (att[attnum]->attlen < sizeof(int32))
elog(ABORT, "fastgetattr3: attribute %d has len %d", elog(ERROR, "fastgetattr3: attribute %d has len %d",
attnum, att[attnum]->attlen); attnum, att[attnum]->attlen);
if (att[attnum]->attalign == 'd') if (att[attnum]->attalign == 'd')
off = DOUBLEALIGN(off); off = DOUBLEALIGN(off);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.21 1998/01/05 03:29:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.22 1998/01/07 21:00:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -45,7 +45,7 @@ typtoout(Oid type)
return ((Oid) return ((Oid)
((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput); ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
elog(ABORT, "typtoout: Cache lookup of type %d failed", type); elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }
@ -62,7 +62,7 @@ gettypelem(Oid type)
return ((Oid) return ((Oid)
((TypeTupleForm) GETSTRUCT(typeTuple))->typelem); ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
elog(ABORT, "typtoout: Cache lookup of type %d failed", type); elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.30 1998/01/05 03:29:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.31 1998/01/07 21:00:45 momjian Exp $
* *
* NOTES * NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be * some of the executor utility code such as "ExecTypeFromTL" should be
@ -321,7 +321,7 @@ TupleDescInitEntry(TupleDesc desc,
* RelationNameCreateHeapRelation() calls BuildDesc() which * RelationNameCreateHeapRelation() calls BuildDesc() which
* calls this routine and since EMP does not exist yet, the * calls this routine and since EMP does not exist yet, the
* system cache lookup below fails. That's fine, but rather * system cache lookup below fails. That's fine, but rather
* then doing a elog(ABORT) we just leave that information * then doing a elog(ERROR) we just leave that information
* uninitialized, return false, then fix things up later. * uninitialized, return false, then fix things up later.
* -cim 6/14/90 * -cim 6/14/90
* ---------------- * ----------------
@ -508,7 +508,7 @@ BuildDescForRelation(List *schema, char *relname)
TupleDescMakeSelfReference(desc, attnum, relname); TupleDescMakeSelfReference(desc, attnum, relname);
} }
else else
elog(ABORT, "DefineRelation: no such type %s", elog(ERROR, "DefineRelation: no such type %s",
typename); typename);
} }

View File

@ -130,7 +130,7 @@ gistbuild(Relation heap,
*/ */
if (oldPred == NULL && (nb = RelationGetNumberOfBlocks(index)) != 0) if (oldPred == NULL && (nb = RelationGetNumberOfBlocks(index)) != 0)
elog(ABORT, "%.16s already contains data", &(index->rd_rel->relname.data[0])); elog(ERROR, "%.16s already contains data", &(index->rd_rel->relname.data[0]));
/* initialize the root page (if this is a new index) */ /* initialize the root page (if this is a new index) */
if (oldPred == NULL) if (oldPred == NULL)
@ -1182,7 +1182,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
0, 0, 0); 0, 0, 0);
itupform = (IndexTupleForm) GETSTRUCT(htup); itupform = (IndexTupleForm) GETSTRUCT(htup);
if (!HeapTupleIsValid(htup)) if (!HeapTupleIsValid(htup))
elog(ABORT, "initGISTstate: index %d not found", index->rd_id); elog(ERROR, "initGISTstate: index %d not found", index->rd_id);
giststate->haskeytype = itupform->indhaskeytype; giststate->haskeytype = itupform->indhaskeytype;
if (giststate->haskeytype) if (giststate->haskeytype)
{ {
@ -1193,7 +1193,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
0, 0); 0, 0);
if (!HeapTupleIsValid(htup)) if (!HeapTupleIsValid(htup))
{ {
elog(ABORT, "initGISTstate: no attribute tuple %d %d", elog(ERROR, "initGISTstate: no attribute tuple %d %d",
itupform->indexrelid, FirstOffsetNumber); itupform->indexrelid, FirstOffsetNumber);
return; return;
} }

View File

@ -83,7 +83,7 @@ gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
if (!IndexScanIsValid(s)) if (!IndexScanIsValid(s))
{ {
elog(ABORT, "gistrescan: invalid scan."); elog(ERROR, "gistrescan: invalid scan.");
return; return;
} }
@ -281,7 +281,7 @@ gistdropscan(IndexScanDesc s)
} }
if (l == (GISTScanList) NULL) if (l == (GISTScanList) NULL)
elog(ABORT, "GiST scan list corrupted -- cannot find 0x%lx", s); elog(ERROR, "GiST scan list corrupted -- cannot find 0x%lx", s);
if (prev == (GISTScanList) NULL) if (prev == (GISTScanList) NULL)
GISTScans = l->gsl_next; GISTScans = l->gsl_next;
@ -397,7 +397,7 @@ adjustiptr(IndexScanDesc s,
break; break;
default: default:
elog(ABORT, "Bad operation in GiST scan adjust: %d", op); elog(ERROR, "Bad operation in GiST scan adjust: %d", op);
} }
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.11 1998/01/05 03:29:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.12 1998/01/07 21:00:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -49,7 +49,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
/* we need a scan key to do our search, so build one */ /* we need a scan key to do our search, so build one */
itup = &(hitem->hash_itup); itup = &(hitem->hash_itup);
if ((natts = rel->rd_rel->relnatts) != 1) if ((natts = rel->rd_rel->relnatts) != 1)
elog(ABORT, "Hash indices valid for only one index key."); elog(ERROR, "Hash indices valid for only one index key.");
itup_scankey = _hash_mkscankey(rel, itup, metap); itup_scankey = _hash_mkscankey(rel, itup, metap);
/* /*
@ -167,7 +167,7 @@ _hash_insertonpg(Relation rel,
if (PageGetFreeSpace(page) < itemsz) if (PageGetFreeSpace(page) < itemsz)
{ {
/* it doesn't fit on an empty page -- give up */ /* it doesn't fit on an empty page -- give up */
elog(ABORT, "hash item too large"); elog(ERROR, "hash item too large");
} }
} }
_hash_checkpage(page, LH_OVERFLOW_PAGE); _hash_checkpage(page, LH_OVERFLOW_PAGE);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.14 1998/01/05 03:29:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.15 1998/01/07 21:01:00 momjian Exp $
* *
* NOTES * NOTES
* Overflow pages look like ordinary relation pages. * Overflow pages look like ordinary relation pages.
@ -65,7 +65,7 @@ _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
oaddr = _hash_getovfladdr(rel, metabufp); oaddr = _hash_getovfladdr(rel, metabufp);
if (oaddr == InvalidOvflAddress) if (oaddr == InvalidOvflAddress)
{ {
elog(ABORT, "_hash_addovflpage: problem with _hash_getovfladdr."); elog(ERROR, "_hash_addovflpage: problem with _hash_getovfladdr.");
} }
ovflblkno = OADDR_TO_BLKNO(OADDR_OF(SPLITNUM(oaddr), OPAGENUM(oaddr))); ovflblkno = OADDR_TO_BLKNO(OADDR_OF(SPLITNUM(oaddr), OPAGENUM(oaddr)));
Assert(BlockNumberIsValid(ovflblkno)); Assert(BlockNumberIsValid(ovflblkno));
@ -172,7 +172,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
{ {
if (++splitnum >= NCACHED) if (++splitnum >= NCACHED)
{ {
elog(ABORT, OVMSG); elog(ERROR, OVMSG);
} }
metap->OVFL_POINT = splitnum; metap->OVFL_POINT = splitnum;
metap->SPARES[splitnum] = metap->SPARES[splitnum - 1]; metap->SPARES[splitnum] = metap->SPARES[splitnum - 1];
@ -190,7 +190,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
free_page++; free_page++;
if (free_page >= NCACHED) if (free_page >= NCACHED)
{ {
elog(ABORT, OVMSG); elog(ERROR, OVMSG);
} }
/* /*
@ -206,7 +206,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
if (_hash_initbitmap(rel, metap, OADDR_OF(splitnum, offset), if (_hash_initbitmap(rel, metap, OADDR_OF(splitnum, offset),
1, free_page)) 1, free_page))
{ {
elog(ABORT, "overflow_page: problem with _hash_initbitmap."); elog(ERROR, "overflow_page: problem with _hash_initbitmap.");
} }
metap->SPARES[splitnum]++; metap->SPARES[splitnum]++;
offset++; offset++;
@ -214,7 +214,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
{ {
if (++splitnum >= NCACHED) if (++splitnum >= NCACHED)
{ {
elog(ABORT, OVMSG); elog(ERROR, OVMSG);
} }
metap->OVFL_POINT = splitnum; metap->OVFL_POINT = splitnum;
metap->SPARES[splitnum] = metap->SPARES[splitnum - 1]; metap->SPARES[splitnum] = metap->SPARES[splitnum - 1];
@ -262,7 +262,7 @@ found:
offset = (i ? bit - metap->SPARES[i - 1] : bit); offset = (i ? bit - metap->SPARES[i - 1] : bit);
if (offset >= SPLITMASK) if (offset >= SPLITMASK)
{ {
elog(ABORT, OVMSG); elog(ERROR, OVMSG);
} }
/* initialize this page */ /* initialize this page */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.14 1998/01/05 03:29:22 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.15 1998/01/07 21:01:08 momjian Exp $
* *
* NOTES * NOTES
* Postgres hash pages look like ordinary relation pages. The opaque * Postgres hash pages look like ordinary relation pages. The opaque
@ -85,7 +85,7 @@ _hash_metapinit(Relation rel)
if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0) if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0)
{ {
elog(ABORT, "Cannot initialize non-empty hash table %s", elog(ERROR, "Cannot initialize non-empty hash table %s",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
@ -146,7 +146,7 @@ _hash_metapinit(Relation rel)
* created the first two buckets above. * created the first two buckets above.
*/ */
if (_hash_initbitmap(rel, metap, OADDR_OF(lg2nelem, 1), lg2nelem + 1, 0)) if (_hash_initbitmap(rel, metap, OADDR_OF(lg2nelem, 1), lg2nelem + 1, 0))
elog(ABORT, "Problem with _hash_initbitmap."); elog(ERROR, "Problem with _hash_initbitmap.");
/* all done */ /* all done */
_hash_wrtnorelbuf(rel, metabuf); _hash_wrtnorelbuf(rel, metabuf);
@ -192,7 +192,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
if (blkno == P_NEW) if (blkno == P_NEW)
{ {
elog(ABORT, "_hash_getbuf: internal error: hash AM does not use P_NEW"); elog(ERROR, "_hash_getbuf: internal error: hash AM does not use P_NEW");
} }
switch (access) switch (access)
{ {
@ -201,7 +201,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
_hash_setpagelock(rel, blkno, access); _hash_setpagelock(rel, blkno, access);
break; break;
default: default:
elog(ABORT, "_hash_getbuf: invalid access (%d) on new blk: %s", elog(ERROR, "_hash_getbuf: invalid access (%d) on new blk: %s",
access, RelationGetRelationName(rel)); access, RelationGetRelationName(rel));
break; break;
} }
@ -228,7 +228,7 @@ _hash_relbuf(Relation rel, Buffer buf, int access)
_hash_unsetpagelock(rel, blkno, access); _hash_unsetpagelock(rel, blkno, access);
break; break;
default: default:
elog(ABORT, "_hash_relbuf: invalid access (%d) on blk %x: %s", elog(ERROR, "_hash_relbuf: invalid access (%d) on blk %x: %s",
access, blkno, RelationGetRelationName(rel)); access, blkno, RelationGetRelationName(rel));
} }
@ -287,7 +287,7 @@ _hash_chgbufaccess(Relation rel,
_hash_relbuf(rel, *bufp, from_access); _hash_relbuf(rel, *bufp, from_access);
break; break;
default: default:
elog(ABORT, "_hash_chgbufaccess: invalid access (%d) on blk %x: %s", elog(ERROR, "_hash_chgbufaccess: invalid access (%d) on blk %x: %s",
from_access, blkno, RelationGetRelationName(rel)); from_access, blkno, RelationGetRelationName(rel));
break; break;
} }
@ -335,7 +335,7 @@ _hash_setpagelock(Relation rel,
RelationSetSingleRLockPage(rel, &iptr); RelationSetSingleRLockPage(rel, &iptr);
break; break;
default: default:
elog(ABORT, "_hash_setpagelock: invalid access (%d) on blk %x: %s", elog(ERROR, "_hash_setpagelock: invalid access (%d) on blk %x: %s",
access, blkno, RelationGetRelationName(rel)); access, blkno, RelationGetRelationName(rel));
break; break;
} }
@ -362,7 +362,7 @@ _hash_unsetpagelock(Relation rel,
RelationUnsetSingleRLockPage(rel, &iptr); RelationUnsetSingleRLockPage(rel, &iptr);
break; break;
default: default:
elog(ABORT, "_hash_unsetpagelock: invalid access (%d) on blk %x: %s", elog(ERROR, "_hash_unsetpagelock: invalid access (%d) on blk %x: %s",
access, blkno, RelationGetRelationName(rel)); access, blkno, RelationGetRelationName(rel));
break; break;
} }
@ -546,7 +546,7 @@ _hash_splitpage(Relation rel,
_hash_checkpage(opage, LH_OVERFLOW_PAGE); _hash_checkpage(opage, LH_OVERFLOW_PAGE);
if (PageIsEmpty(opage)) if (PageIsEmpty(opage))
{ {
elog(ABORT, "_hash_splitpage: empty overflow page %d", oblkno); elog(ERROR, "_hash_splitpage: empty overflow page %d", oblkno);
} }
oopaque = (HashPageOpaque) PageGetSpecialPointer(opage); oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
} }
@ -588,7 +588,7 @@ _hash_splitpage(Relation rel,
/* we're guaranteed that an ovfl page has at least 1 tuple */ /* we're guaranteed that an ovfl page has at least 1 tuple */
if (PageIsEmpty(opage)) if (PageIsEmpty(opage))
{ {
elog(ABORT, "_hash_splitpage: empty ovfl page %d!", elog(ERROR, "_hash_splitpage: empty ovfl page %d!",
oblkno); oblkno);
} }
ooffnum = FirstOffsetNumber; ooffnum = FirstOffsetNumber;
@ -685,7 +685,7 @@ _hash_splitpage(Relation rel,
oopaque = (HashPageOpaque) PageGetSpecialPointer(opage); oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
if (PageIsEmpty(opage)) if (PageIsEmpty(opage))
{ {
elog(ABORT, "_hash_splitpage: empty overflow page %d", elog(ERROR, "_hash_splitpage: empty overflow page %d",
oblkno); oblkno);
} }
ooffnum = FirstOffsetNumber; ooffnum = FirstOffsetNumber;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.12 1998/01/05 03:29:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.13 1998/01/07 21:01:13 momjian Exp $
* *
* NOTES * NOTES
* Because we can be doing an index scan on a relation while we * Because we can be doing an index scan on a relation while we
@ -76,7 +76,7 @@ _hash_dropscan(IndexScanDesc scan)
} }
if (chk == (HashScanList) NULL) if (chk == (HashScanList) NULL)
elog(ABORT, "hash scan list trashed; can't find 0x%lx", scan); elog(ERROR, "hash scan list trashed; can't find 0x%lx", scan);
if (last == (HashScanList) NULL) if (last == (HashScanList) NULL)
HashScans = chk->hashsl_next; HashScans = chk->hashsl_next;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.12 1998/01/05 03:29:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.13 1998/01/07 21:01:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -79,7 +79,7 @@ _hash_formitem(IndexTuple itup)
/* disallow nulls in hash keys */ /* disallow nulls in hash keys */
if (itup->t_info & INDEX_NULL_MASK) if (itup->t_info & INDEX_NULL_MASK)
elog(ABORT, "hash indices cannot include null keys"); elog(ERROR, "hash indices cannot include null keys");
/* make a copy of the index tuple with room for the sequence number */ /* make a copy of the index tuple with room for the sequence number */
tuplen = IndexTupleSize(itup); tuplen = IndexTupleSize(itup);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
@ -295,7 +295,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b)) if (!BufferIsValid(*b))
elog(ABORT, "heapgettup: failed ReadBuffer"); elog(ERROR, "heapgettup: failed ReadBuffer");
#endif #endif
dp = (Page) BufferGetPage(*b); dp = (Page) BufferGetPage(*b);
@ -334,7 +334,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b)) if (!BufferIsValid(*b))
{ {
elog(ABORT, "heapgettup: failed ReadBuffer"); elog(ERROR, "heapgettup: failed ReadBuffer");
} }
#endif #endif
@ -381,7 +381,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b)) if (!BufferIsValid(*b))
{ {
elog(ABORT, "heapgettup: failed ReadBuffer"); elog(ERROR, "heapgettup: failed ReadBuffer");
} }
#endif #endif
@ -477,7 +477,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(*b)) if (!BufferIsValid(*b))
{ {
elog(ABORT, "heapgettup: failed ReadBuffer"); elog(ERROR, "heapgettup: failed ReadBuffer");
} }
#endif #endif
dp = (Page) BufferGetPage(*b); dp = (Page) BufferGetPage(*b);
@ -545,7 +545,7 @@ heap_open(Oid relationId)
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX) 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); return (r);
@ -574,7 +574,7 @@ heap_openr(char *relationName)
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX) 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); return (r);
@ -626,7 +626,7 @@ heap_beginscan(Relation relation,
* ---------------- * ----------------
*/ */
if (RelationIsValid(relation) == false) if (RelationIsValid(relation) == false)
elog(ABORT, "heap_beginscan: !RelationIsValid(relation)"); elog(ERROR, "heap_beginscan: !RelationIsValid(relation)");
/* ---------------- /* ----------------
* set relation level read lock * set relation level read lock
@ -808,7 +808,7 @@ heap_getnext(HeapScanDesc scandesc,
* ---------------- * ----------------
*/ */
if (sdesc == NULL) if (sdesc == NULL)
elog(ABORT, "heap_getnext: NULL relscan"); elog(ERROR, "heap_getnext: NULL relscan");
/* ---------------- /* ----------------
* initialize return buffer to InvalidBuffer * initialize return buffer to InvalidBuffer
@ -1051,7 +1051,7 @@ heap_fetch(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(buffer)) 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); &relation->rd_rel->relname, (long) tid);
} }
#endif #endif
@ -1216,7 +1216,7 @@ heap_delete(Relation relation, ItemPointer tid)
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(b)) if (!BufferIsValid(b))
{ /* XXX L_SH better ??? */ { /* XXX L_SH better ??? */
elog(ABORT, "heap_delete: failed ReadBuffer"); elog(ERROR, "heap_delete: failed ReadBuffer");
} }
#endif /* NO_BUFFERISVALID */ #endif /* NO_BUFFERISVALID */
@ -1249,7 +1249,7 @@ heap_delete(Relation relation, ItemPointer tid)
/* XXX call something else */ /* XXX call something else */
ReleaseBuffer(b); 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)) if (!BufferIsValid(buffer))
{ {
/* XXX L_SH better ??? */ /* XXX L_SH better ??? */
elog(ABORT, "amreplace: failed ReadBuffer"); elog(ERROR, "amreplace: failed ReadBuffer");
} }
#endif /* NO_BUFFERISVALID */ #endif /* NO_BUFFERISVALID */
@ -1385,7 +1385,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
if (!tuple) if (!tuple)
{ {
ReleaseBuffer(buffer); ReleaseBuffer(buffer);
elog(ABORT, "heap_replace: (am)invalid otid"); elog(ERROR, "heap_replace: (am)invalid otid");
} }
/* XXX order problems if not atomic assignment ??? */ /* XXX order problems if not atomic assignment ??? */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 #ifndef NO_BUFFERISVALID
if (!BufferIsValid(buffer)) 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); blockIndex, &relation->rd_rel->relname);
} }
#endif #endif
@ -157,7 +157,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
PageInit(pageHeader, BufferGetPageSize(buffer), 0); PageInit(pageHeader, BufferGetPageSize(buffer), 0);
if (len > PageGetFreeSpace(pageHeader)) 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, offnum = PageAddItem((Page) pageHeader, (Item) tuple,

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* many of the old access method routines have been turned into * many of the old access method routines have been turned into
@ -101,7 +101,7 @@ RelationGetIndexScan(Relation relation,
IndexScanDesc scan; IndexScanDesc scan;
if (!RelationIsValid(relation)) if (!RelationIsValid(relation))
elog(ABORT, "RelationGetIndexScan: relation invalid"); elog(ERROR, "RelationGetIndexScan: relation invalid");
scan = (IndexScanDesc) palloc(sizeof(IndexScanDescData)); scan = (IndexScanDesc) palloc(sizeof(IndexScanDescData));
@ -150,7 +150,7 @@ IndexScanRestart(IndexScanDesc scan,
ScanKey key) ScanKey key)
{ {
if (!IndexScanIsValid(scan)) if (!IndexScanIsValid(scan))
elog(ABORT, "IndexScanRestart: invalid scan"); elog(ERROR, "IndexScanRestart: invalid scan");
ItemPointerSetInvalid(&scan->previousItemData); ItemPointerSetInvalid(&scan->previousItemData);
ItemPointerSetInvalid(&scan->currentItemData); ItemPointerSetInvalid(&scan->currentItemData);
@ -191,7 +191,7 @@ void
IndexScanEnd(IndexScanDesc scan) IndexScanEnd(IndexScanDesc scan)
{ {
if (!IndexScanIsValid(scan)) if (!IndexScanIsValid(scan))
elog(ABORT, "IndexScanEnd: invalid scan"); elog(ERROR, "IndexScanEnd: invalid scan");
pfree(scan); pfree(scan);
} }
@ -274,7 +274,7 @@ void
IndexScanRestorePosition(IndexScanDesc scan) IndexScanRestorePosition(IndexScanDesc scan)
{ {
if (scan->flags & ScanUnmarked) if (scan->flags & ScanUnmarked)
elog(ABORT, "IndexScanRestorePosition: no mark to restore"); elog(ERROR, "IndexScanRestorePosition: no mark to restore");
scan->previousItemData = scan->previousMarkData; scan->previousItemData = scan->previousMarkData;
scan->currentItemData = scan->currentMarkData; scan->currentItemData = scan->currentMarkData;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
* index_open - open an index relation by relationId * index_open - open an index relation by relationId
@ -103,13 +103,13 @@ Assert(RelationIsValid(relation)); \
#define GET_REL_PROCEDURE(x,y) \ #define GET_REL_PROCEDURE(x,y) \
procedure = relation->rd_am->y; \ procedure = relation->rd_am->y; \
if (! RegProcedureIsValid(procedure)) \ if (! RegProcedureIsValid(procedure)) \
elog(ABORT, "index_%s: invalid %s regproc", \ elog(ERROR, "index_%s: invalid %s regproc", \
CppAsString(x), CppAsString(y)) CppAsString(x), CppAsString(y))
#define GET_SCAN_PROCEDURE(x,y) \ #define GET_SCAN_PROCEDURE(x,y) \
procedure = scan->relation->rd_am->y; \ procedure = scan->relation->rd_am->y; \
if (! RegProcedureIsValid(procedure)) \ if (! RegProcedureIsValid(procedure)) \
elog(ABORT, "index_%s: invalid %s regproc", \ elog(ERROR, "index_%s: invalid %s regproc", \
CppAsString(x), CppAsString(y)) CppAsString(x), CppAsString(y))

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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)) 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); strategy);
/* not reached, just to make compiler happy */ /* not reached, just to make compiler happy */
@ -514,7 +514,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
tuple = heap_getnext(scan, false, (Buffer *) NULL); tuple = heap_getnext(scan, false, (Buffer *) NULL);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(ABORT, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu", elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu",
(uint32) operatorObjectId); (uint32) operatorObjectId);
} }
@ -525,7 +525,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
if (!RegProcedureIsValid(entry->sk_procedure)) if (!RegProcedureIsValid(entry->sk_procedure))
{ {
elog(ABORT, elog(ERROR,
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu", "OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu",
(uint32) operatorObjectId); (uint32) operatorObjectId);
} }
@ -567,7 +567,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
scan = heap_beginscan(relation, false, false, 1, entry); scan = heap_beginscan(relation, false, false, 1, entry);
tuple = heap_getnext(scan, 0, (Buffer *) NULL); tuple = heap_getnext(scan, 0, (Buffer *) NULL);
if (!HeapTupleIsValid(tuple)) 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 * XXX note that the following assumes the INDEX tuple is well formed
@ -583,7 +583,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
{ {
if (attributeIndex == 0) if (attributeIndex == 0)
{ {
elog(ABORT, "IndexSupportInitialize: no pg_index tuple"); elog(ERROR, "IndexSupportInitialize: no pg_index tuple");
} }
break; break;
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.23 1998/01/05 03:29:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.24 1998/01/07 21:01:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -123,7 +123,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
htup = heap_fetch(heapRel, true, &(itup->t_tid), NULL); htup = heap_fetch(heapRel, true, &(itup->t_tid), NULL);
if (htup != (HeapTuple) NULL) if (htup != (HeapTuple) NULL)
{ /* it is a duplicate */ { /* it is a duplicate */
elog(ABORT, "Cannot insert a duplicate key into a unique index"); elog(ERROR, "Cannot insert a duplicate key into a unique index");
} }
/* get next offnum */ /* get next offnum */
if (offset < maxoff) if (offset < maxoff)
@ -1442,7 +1442,7 @@ _bt_updateitem(Relation rel,
* if(IndexTupleDSize(newItem->bti_itup) > * if(IndexTupleDSize(newItem->bti_itup) >
* IndexTupleDSize(item->bti_itup)) { elog(NOTICE, "trying to * IndexTupleDSize(item->bti_itup)) { elog(NOTICE, "trying to
* overwrite a smaller value with a bigger one in _bt_updateitem"); * overwrite a smaller value with a bigger one in _bt_updateitem");
* elog(ABORT, "this is not good."); } * elog(ERROR, "this is not good."); }
*/ */
oldIndexTuple = &(item->bti_itup); oldIndexTuple = &(item->bti_itup);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.14 1998/01/05 03:29:50 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.15 1998/01/07 21:01:53 momjian Exp $
* *
* NOTES * NOTES
* Postgres btree pages look like ordinary relation pages. The opaque * Postgres btree pages look like ordinary relation pages. The opaque
@ -97,7 +97,7 @@ _bt_metapinit(Relation rel)
if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0) if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0)
{ {
elog(ABORT, "Cannot initialize non-empty btree %s", elog(ERROR, "Cannot initialize non-empty btree %s",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
@ -146,20 +146,20 @@ _bt_checkmeta(Relation rel)
op = (BTPageOpaque) PageGetSpecialPointer(metap); op = (BTPageOpaque) PageGetSpecialPointer(metap);
if (!(op->btpo_flags & BTP_META)) if (!(op->btpo_flags & BTP_META))
{ {
elog(ABORT, "Invalid metapage for index %s", elog(ERROR, "Invalid metapage for index %s",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
metad = BTPageGetMeta(metap); metad = BTPageGetMeta(metap);
if (metad->btm_magic != BTREE_MAGIC) if (metad->btm_magic != BTREE_MAGIC)
{ {
elog(ABORT, "Index %s is not a btree", elog(ERROR, "Index %s is not a btree",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
if (metad->btm_version != BTREE_VERSION) if (metad->btm_version != BTREE_VERSION)
{ {
elog(ABORT, "Version mismatch on %s: version %d file, version %d code", elog(ERROR, "Version mismatch on %s: version %d file, version %d code",
RelationGetRelationName(rel), RelationGetRelationName(rel),
metad->btm_version, BTREE_VERSION); metad->btm_version, BTREE_VERSION);
} }
@ -204,13 +204,13 @@ _bt_getroot(Relation rel, int access)
if (metad->btm_magic != BTREE_MAGIC) if (metad->btm_magic != BTREE_MAGIC)
{ {
elog(ABORT, "Index %s is not a btree", elog(ERROR, "Index %s is not a btree",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
if (metad->btm_version != BTREE_VERSION) if (metad->btm_version != BTREE_VERSION)
{ {
elog(ABORT, "Version mismatch on %s: version %d file, version %d code", elog(ERROR, "Version mismatch on %s: version %d file, version %d code",
RelationGetRelationName(rel), RelationGetRelationName(rel),
metad->btm_version, BTREE_VERSION); metad->btm_version, BTREE_VERSION);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.11 1998/01/05 03:29:52 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.12 1998/01/07 21:01:54 momjian Exp $
* *
* *
* NOTES * NOTES
@ -77,7 +77,7 @@ _bt_dropscan(IndexScanDesc scan)
} }
if (chk == (BTScanList) NULL) if (chk == (BTScanList) NULL)
elog(ABORT, "btree scan list trashed; can't find 0x%lx", scan); elog(ERROR, "btree scan list trashed; can't find 0x%lx", scan);
if (last == (BTScanList) NULL) if (last == (BTScanList) NULL)
BTScans = chk->btsl_next; BTScans = chk->btsl_next;
@ -154,7 +154,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
_bt_step(scan, &buf, BackwardScanDirection); _bt_step(scan, &buf, BackwardScanDirection);
break; break;
default: default:
elog(ABORT, "_bt_scandel: bad operation '%d'", op); elog(ERROR, "_bt_scandel: bad operation '%d'", op);
/* NOTREACHED */ /* NOTREACHED */
} }
so->btso_curbuf = buf; so->btso_curbuf = buf;
@ -179,7 +179,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
_bt_step(scan, &buf, BackwardScanDirection); _bt_step(scan, &buf, BackwardScanDirection);
break; break;
default: default:
elog(ABORT, "_bt_scandel: bad operation '%d'", op); elog(ERROR, "_bt_scandel: bad operation '%d'", op);
/* NOTREACHED */ /* NOTREACHED */
} }
so->btso_mrkbuf = buf; so->btso_mrkbuf = buf;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.28 1998/01/05 03:29:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.29 1998/01/07 21:01:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -617,7 +617,7 @@ _bt_compare(Relation rel,
*/ */
if (!P_RIGHTMOST(opaque)) if (!P_RIGHTMOST(opaque))
{ {
elog(ABORT, "_bt_compare: invalid comparison to high key"); elog(ERROR, "_bt_compare: invalid comparison to high key");
} }
#if 0 #if 0
@ -839,7 +839,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
/* _bt_orderkeys disallows it, but it's place to add some code latter */ /* _bt_orderkeys disallows it, but it's place to add some code latter */
if (so->keyData[0].sk_flags & SK_ISNULL) if (so->keyData[0].sk_flags & SK_ISNULL)
{ {
elog(ABORT, "_bt_first: btree doesn't support is(not)null, yet"); elog(ERROR, "_bt_first: btree doesn't support is(not)null, yet");
return ((RetrieveIndexResult) NULL); return ((RetrieveIndexResult) NULL);
} }
proc = index_getprocid(rel, 1, BTORDER_PROC); proc = index_getprocid(rel, 1, BTORDER_PROC);
@ -1331,7 +1331,7 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
* us up less often since they're only done by the vacuum daemon. * us up less often since they're only done by the vacuum daemon.
*/ */
elog(ABORT, "btree synchronization error: concurrent update botched scan"); elog(ERROR, "btree synchronization error: concurrent update botched scan");
return (false); return (false);
} }
@ -1416,7 +1416,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
if (ScanDirectionIsForward(dir)) if (ScanDirectionIsForward(dir))
{ {
if (!P_LEFTMOST(opaque))/* non-leftmost page ? */ if (!P_LEFTMOST(opaque))/* non-leftmost page ? */
elog(ABORT, "_bt_endpoint: leftmost page (%u) has not leftmost flag", blkno); elog(ERROR, "_bt_endpoint: leftmost page (%u) has not leftmost flag", blkno);
start = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY; start = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
/* /*
@ -1440,7 +1440,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
if (PageIsEmpty(page)) if (PageIsEmpty(page))
{ {
if (start != P_HIKEY) /* non-rightmost page */ if (start != P_HIKEY) /* non-rightmost page */
elog(ABORT, "_bt_endpoint: non-rightmost page (%u) is empty", blkno); elog(ERROR, "_bt_endpoint: non-rightmost page (%u) is empty", blkno);
/* /*
* It's left- & right- most page - root page, - and it's * It's left- & right- most page - root page, - and it's
@ -1512,7 +1512,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
} }
else else
{ {
elog(ABORT, "Illegal scan direction %d", dir); elog(ERROR, "Illegal scan direction %d", dir);
} }
btitem = (BTItem) PageGetItem(page, PageGetItemId(page, start)); btitem = (BTItem) PageGetItem(page, PageGetItemId(page, start));

View File

@ -5,7 +5,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: nbtsort.c,v 1.25 1998/01/05 03:29:55 momjian Exp $ * $Id: nbtsort.c,v 1.26 1998/01/07 21:01:59 momjian Exp $
* *
* NOTES * NOTES
* *
@ -212,7 +212,7 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
if (_bt_inspool->isunique && !equal_isnull) if (_bt_inspool->isunique && !equal_isnull)
{ {
_bt_spooldestroy((void *) _bt_inspool); _bt_spooldestroy((void *) _bt_inspool);
elog(ABORT, "Cannot create unique index. Table contains non-unique values"); elog(ERROR, "Cannot create unique index. Table contains non-unique values");
} }
return (0); /* 1 = 2 */ return (0); /* 1 = 2 */
} }
@ -333,7 +333,7 @@ _bt_pqadd(BTPriQueue *q, BTPriQueueElem *e)
if (q->btpq_nelem >= MAXELEM) if (q->btpq_nelem >= MAXELEM)
{ {
elog(ABORT, "_bt_pqadd: queue overflow"); elog(ERROR, "_bt_pqadd: queue overflow");
} }
child = q->btpq_nelem++; child = q->btpq_nelem++;
@ -426,7 +426,7 @@ _bt_tapecreate(char *fname)
if (tape == (BTTapeBlock *) NULL) if (tape == (BTTapeBlock *) NULL)
{ {
elog(ABORT, "_bt_tapecreate: out of memory"); elog(ERROR, "_bt_tapecreate: out of memory");
} }
tape->bttb_magic = BTTAPEMAGIC; tape->bttb_magic = BTTAPEMAGIC;
@ -563,7 +563,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if (btspool == (BTSpool *) NULL || fname == (char *) NULL) if (btspool == (BTSpool *) NULL || fname == (char *) NULL)
{ {
elog(ABORT, "_bt_spoolinit: out of memory"); elog(ERROR, "_bt_spoolinit: out of memory");
} }
MemSet((char *) btspool, 0, sizeof(BTSpool)); MemSet((char *) btspool, 0, sizeof(BTSpool));
btspool->bts_ntapes = ntapes; btspool->bts_ntapes = ntapes;
@ -577,7 +577,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if (btspool->bts_itape == (BTTapeBlock **) NULL || if (btspool->bts_itape == (BTTapeBlock **) NULL ||
btspool->bts_otape == (BTTapeBlock **) NULL) btspool->bts_otape == (BTTapeBlock **) NULL)
{ {
elog(ABORT, "_bt_spoolinit: out of memory"); elog(ERROR, "_bt_spoolinit: out of memory");
} }
for (i = 0; i < ntapes; ++i) for (i = 0; i < ntapes; ++i)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.16 1998/01/05 03:29:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.17 1998/01/07 21:02:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -119,7 +119,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
cur = &key[0]; cur = &key[0];
if (cur->sk_attno != 1) if (cur->sk_attno != 1)
elog(ABORT, "_bt_orderkeys: key(s) for attribute 1 missed"); elog(ERROR, "_bt_orderkeys: key(s) for attribute 1 missed");
if (numberOfKeys == 1) if (numberOfKeys == 1)
{ {
@ -159,7 +159,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
{ {
if (cur->sk_attno != attno + 1 && i < numberOfKeys) if (cur->sk_attno != attno + 1 && i < numberOfKeys)
{ {
elog(ABORT, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1); elog(ERROR, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1);
} }
/* /*
@ -296,7 +296,7 @@ _bt_formitem(IndexTuple itup)
/* /*
* see comments in btbuild * see comments in btbuild
* *
* if (itup->t_info & INDEX_NULL_MASK) elog(ABORT, "btree indices cannot * if (itup->t_info & INDEX_NULL_MASK) elog(ERROR, "btree indices cannot
* include null keys"); * include null keys");
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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; BOX *n;
if ((n = (BOX *) palloc(sizeof(*n))) == (BOX *) NULL) 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.x = Max(a->high.x, b->high.x);
n->high.y = Max(a->high.y, b->high.y); n->high.y = Max(a->high.y, b->high.y);
@ -45,7 +45,7 @@ rt_box_inter(BOX *a, BOX *b)
BOX *n; BOX *n;
if ((n = (BOX *) palloc(sizeof(*n))) == (BOX *) NULL) 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.x = Min(a->high.x, b->high.x);
n->high.y = Min(a->high.y, b->high.y); 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)); p = (POLYGON *) palloc(sizeof(POLYGON));
if (!PointerIsValid(p)) 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 */ MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
p->size = sizeof(POLYGON); p->size = sizeof(POLYGON);
@ -136,7 +136,7 @@ rt_poly_inter(POLYGON *a, POLYGON *b)
p = (POLYGON *) palloc(sizeof(POLYGON)); p = (POLYGON *) palloc(sizeof(POLYGON));
if (!PointerIsValid(p)) 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 */ MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
p->size = sizeof(POLYGON); p->size = sizeof(POLYGON);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) 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) */ /* initialize the root page (if this is a new index) */
if (oldPred == NULL) if (oldPred == NULL)
@ -664,7 +664,7 @@ rtintinsert(Relation r,
*/ */
if (IndexTupleSize(old) != IndexTupleSize(ltup)) 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 */ /* install pointer to left child */
memmove(old, ltup, IndexTupleSize(ltup)); memmove(old, ltup, IndexTupleSize(ltup));

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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)) if (!IndexScanIsValid(s))
{ {
elog(ABORT, "rtrescan: invalid scan."); elog(ERROR, "rtrescan: invalid scan.");
return; return;
} }
@ -284,7 +284,7 @@ rtdropscan(IndexScanDesc s)
} }
if (l == (RTScanList) NULL) 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) if (prev == (RTScanList) NULL)
RTScans = l->rtsl_next; RTScans = l->rtsl_next;
@ -400,7 +400,7 @@ adjustiptr(IndexScanDesc s,
break; break;
default: default:
elog(ABORT, "Bad operation in rtree scan adjust: %d", op); elog(ERROR, "Bad operation in rtree scan adjust: %d", op);
} }
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.15 1998/01/05 03:30:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.16 1998/01/07 21:02:17 momjian Exp $
* *
* NOTES * NOTES
* This file contains the high level access-method interface to the * This file contains the high level access-method interface to the
@ -183,7 +183,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */
* here the block didn't contain the information we wanted * here the block didn't contain the information we wanted
* ---------------- * ----------------
*/ */
elog(ABORT, "TransactionLogTest: failed to get xidstatus"); elog(ERROR, "TransactionLogTest: failed to get xidstatus");
/* /*
* so lint is happy... * so lint is happy...
@ -308,7 +308,7 @@ TransRecover(Relation logRelation)
*/ */
TransGetLastRecordedTransaction(logRelation, logLastXid, &fail); TransGetLastRecordedTransaction(logRelation, logLastXid, &fail);
if (fail == true) if (fail == true)
elog(ABORT, "TransRecover: failed TransGetLastRecordedTransaction"); elog(ERROR, "TransRecover: failed TransGetLastRecordedTransaction");
/* ---------------- /* ----------------
* next get the "last" and "next" variables * next get the "last" and "next" variables
@ -322,7 +322,7 @@ TransRecover(Relation logRelation)
* ---------------- * ----------------
*/ */
if (TransactionIdIsLessThan(varNextXid, logLastXid)) if (TransactionIdIsLessThan(varNextXid, logLastXid))
elog(ABORT, "TransRecover: varNextXid < logLastXid"); elog(ERROR, "TransRecover: varNextXid < logLastXid");
/* ---------------- /* ----------------
* intregity test (2) * intregity test (2)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.15 1998/01/05 03:30:10 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.16 1998/01/07 21:02:19 momjian Exp $
* *
* NOTES * NOTES
* This file contains support functions for the high * This file contains support functions for the high
@ -68,7 +68,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
if (relation == LogRelation) if (relation == LogRelation)
itemsPerBlock = TP_NumXidStatusPerBlock; itemsPerBlock = TP_NumXidStatusPerBlock;
else else
elog(ABORT, "TransComputeBlockNumber: unknown relation"); elog(ERROR, "TransComputeBlockNumber: unknown relation");
/* ---------------- /* ----------------
* warning! if the transaction id's get too large * warning! if the transaction id's get too large

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.14 1998/01/05 03:30:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.15 1998/01/07 21:02:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -69,7 +69,7 @@ VariableRelationGetNextXid(TransactionId *xidP)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(ABORT, "VariableRelationGetNextXid: ReadBuffer failed"); elog(ERROR, "VariableRelationGetNextXid: ReadBuffer failed");
} }
var = (VariableRelationContents) BufferGetBlock(buf); var = (VariableRelationContents) BufferGetBlock(buf);
@ -112,7 +112,7 @@ VariableRelationPutNextXid(TransactionId xid)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(ABORT, "VariableRelationPutNextXid: ReadBuffer failed"); elog(ERROR, "VariableRelationPutNextXid: ReadBuffer failed");
} }
var = (VariableRelationContents) BufferGetBlock(buf); var = (VariableRelationContents) BufferGetBlock(buf);
@ -164,7 +164,7 @@ VariableRelationGetNextOid(Oid *oid_return)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(ABORT, "VariableRelationGetNextXid: ReadBuffer failed"); elog(ERROR, "VariableRelationGetNextXid: ReadBuffer failed");
} }
var = (VariableRelationContents) BufferGetBlock(buf); var = (VariableRelationContents) BufferGetBlock(buf);
@ -224,7 +224,7 @@ VariableRelationPutNextOid(Oid *oidP)
if (!PointerIsValid(oidP)) if (!PointerIsValid(oidP))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(ABORT, "VariableRelationPutNextOid: invalid oid pointer"); elog(ERROR, "VariableRelationPutNextOid: invalid oid pointer");
} }
/* ---------------- /* ----------------
@ -237,7 +237,7 @@ VariableRelationPutNextOid(Oid *oidP)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(ABORT, "VariableRelationPutNextOid: ReadBuffer failed"); elog(ERROR, "VariableRelationPutNextOid: ReadBuffer failed");
} }
var = (VariableRelationContents) BufferGetBlock(buf); var = (VariableRelationContents) BufferGetBlock(buf);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.18 1998/01/05 03:30:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.19 1998/01/07 21:02:24 momjian Exp $
* *
* NOTES * NOTES
* Transaction aborts can now occur two ways: * Transaction aborts can now occur two ways:
@ -497,7 +497,7 @@ CommandCounterIncrement()
if (CurrentTransactionStateData.commandId == FirstCommandId) if (CurrentTransactionStateData.commandId == FirstCommandId)
{ {
CommandIdCounterOverflowFlag = true; CommandIdCounterOverflowFlag = true;
elog(ABORT, "You may only have 2^32-1 commands per transaction"); elog(ERROR, "You may only have 2^32-1 commands per transaction");
} }
CurrentTransactionStateData.scanCommandId = CurrentTransactionStateData.scanCommandId =

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.12 1998/01/06 18:51:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.13 1998/01/07 21:02:29 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -203,10 +203,10 @@ Boot_InsertStmt:
LPAREN boot_tuplelist RPAREN LPAREN boot_tuplelist RPAREN
{ {
if (num_tuples_read != numattr) if (num_tuples_read != numattr)
elog(ABORT,"incorrect number of values for tuple"); elog(ERROR,"incorrect number of values for tuple");
if (reldesc == (Relation)NULL) if (reldesc == (Relation)NULL)
{ {
elog(ABORT,"must OPEN RELATION before INSERT\n"); elog(ERROR,"must OPEN RELATION before INSERT\n");
err_out(); err_out();
} }
if (DebugMode) if (DebugMode)

View File

@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.31 1998/01/05 03:30:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.32 1998/01/07 21:02:30 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -572,18 +572,18 @@ closerel(char *name)
if (reldesc) if (reldesc)
{ {
if (namestrcmp(RelationGetRelationName(reldesc), name) != 0) if (namestrcmp(RelationGetRelationName(reldesc), name) != 0)
elog(ABORT, "closerel: close of '%s' when '%s' was expected", elog(ERROR, "closerel: close of '%s' when '%s' was expected",
name, relname ? relname : "(null)"); name, relname ? relname : "(null)");
} }
else else
elog(ABORT, "closerel: close of '%s' before any relation was opened", elog(ERROR, "closerel: close of '%s' before any relation was opened",
name); name);
} }
if (reldesc == NULL) if (reldesc == NULL)
{ {
elog(ABORT, "Warning: no opened relation to close.\n"); elog(ERROR, "Warning: no opened relation to close.\n");
} }
else else
{ {
@ -879,7 +879,7 @@ gettype(char *type)
heap_close(rdesc); heap_close(rdesc);
return (gettype(type)); return (gettype(type));
} }
elog(ABORT, "Error: unknown type '%s'.\n", type); elog(ERROR, "Error: unknown type '%s'.\n", type);
err_out(); err_out();
/* not reached, here to make compiler happy */ /* not reached, here to make compiler happy */
return 0; return 0;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.13 1998/01/05 03:31:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.14 1998/01/07 21:02:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -313,7 +313,7 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
break; break;
default: default:
elog(ABORT, "ExecReScan: not a seqscan or indexscan node."); elog(ERROR, "ExecReScan: not a seqscan or indexscan node.");
return; return;
} }
} }

View File

@ -26,7 +26,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.36 1998/01/05 03:31:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.37 1998/01/07 21:02:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -328,7 +328,7 @@ ExecCheckPerms(CmdType operation,
ObjectIdGetDatum(relid), ObjectIdGetDatum(relid),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(htp)) if (!HeapTupleIsValid(htp))
elog(ABORT, "ExecCheckPerms: bogus RT relid: %d", elog(ERROR, "ExecCheckPerms: bogus RT relid: %d",
relid); relid);
StrNCpy(rname.data, StrNCpy(rname.data,
((Form_pg_class) GETSTRUCT(htp))->relname.data, ((Form_pg_class) GETSTRUCT(htp))->relname.data,
@ -361,7 +361,7 @@ ExecCheckPerms(CmdType operation,
opstr = "write"; opstr = "write";
break; break;
default: default:
elog(ABORT, "ExecCheckPerms: bogus operation %d", elog(ERROR, "ExecCheckPerms: bogus operation %d",
operation); operation);
} }
} }
@ -377,7 +377,7 @@ ExecCheckPerms(CmdType operation,
} }
if (!ok) if (!ok)
{ {
elog(ABORT, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]); elog(ERROR, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]);
} }
} }
@ -447,7 +447,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
resultRelationDesc = heap_open(resultRelationOid); resultRelationDesc = heap_open(resultRelationOid);
if (resultRelationDesc->rd_rel->relkind == RELKIND_SEQUENCE) if (resultRelationDesc->rd_rel->relkind == RELKIND_SEQUENCE)
elog(ABORT, "You can't change sequence relation %s", elog(ERROR, "You can't change sequence relation %s",
resultRelationDesc->rd_rel->relname.data); resultRelationDesc->rd_rel->relname.data);
/* /*
@ -778,10 +778,10 @@ ExecutePlan(EState *estate,
"ctid", "ctid",
&datum, &datum,
&isNull)) &isNull))
elog(ABORT, "ExecutePlan: NO (junk) `ctid' was found!"); elog(ERROR, "ExecutePlan: NO (junk) `ctid' was found!");
if (isNull) if (isNull)
elog(ABORT, "ExecutePlan: (junk) `ctid' is NULL!"); elog(ERROR, "ExecutePlan: (junk) `ctid' is NULL!");
tupleid = (ItemPointer) DatumGetPointer(datum); tupleid = (ItemPointer) DatumGetPointer(datum);
tuple_ctid = *tupleid; /* make sure we don't free the tuple_ctid = *tupleid; /* make sure we don't free the
@ -1376,7 +1376,7 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
for (attrChk = 1; attrChk <= rel->rd_att->natts; attrChk++) for (attrChk = 1; attrChk <= rel->rd_att->natts; attrChk++)
{ {
if (rel->rd_att->attrs[attrChk - 1]->attnotnull && heap_attisnull(tuple, attrChk)) if (rel->rd_att->attrs[attrChk - 1]->attnotnull && heap_attisnull(tuple, attrChk))
elog(ABORT, "%s: Fail to add null value in not null attribute %s", elog(ERROR, "%s: Fail to add null value in not null attribute %s",
caller, rel->rd_att->attrs[attrChk - 1]->attname.data); caller, rel->rd_att->attrs[attrChk - 1]->attname.data);
} }
} }
@ -1386,7 +1386,7 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
char *failed; char *failed;
if ((failed = ExecRelCheck(rel, tuple)) != NULL) if ((failed = ExecRelCheck(rel, tuple)) != NULL)
elog(ABORT, "%s: rejected due to CHECK constraint %s", caller, failed); elog(ERROR, "%s: rejected due to CHECK constraint %s", caller, failed);
} }
return (newtuple); return (newtuple);

View File

@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.6 1998/01/05 03:31:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.7 1998/01/07 21:02:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -368,7 +368,7 @@ ExecCountSlotsNode(Plan *node)
return ExecCountSlotsTee((Tee *) node); return ExecCountSlotsTee((Tee *) node);
default: default:
elog(ABORT, "ExecCountSlotsNode: node not yet supported: %d", elog(ERROR, "ExecCountSlotsNode: node not yet supported: %d",
nodeTag(node)); nodeTag(node));
break; break;
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.21 1998/01/05 03:31:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.22 1998/01/07 21:02:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -148,7 +148,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
return (Datum) NULL; return (Datum) NULL;
} }
if (i != j) if (i != j)
elog(ABORT, elog(ERROR,
"ExecEvalArrayRef: upper and lower indices mismatch"); "ExecEvalArrayRef: upper and lower indices mismatch");
lIndex = lower.indx; lIndex = lower.indx;
} }
@ -429,7 +429,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
*/ */
if (strcmp(paramList->name, thisParameterName) != 0) if (strcmp(paramList->name, thisParameterName) != 0)
{ {
elog(ABORT, elog(ERROR,
"ExecEvalParam: new/old params with same id & diff names"); "ExecEvalParam: new/old params with same id & diff names");
} }
} }
@ -439,7 +439,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
/* /*
* oops! this is not supposed to happen! * oops! this is not supposed to happen!
*/ */
elog(ABORT, "ExecEvalParam: invalid paramkind %d", elog(ERROR, "ExecEvalParam: invalid paramkind %d",
thisParameterKind); thisParameterKind);
} }
if (!matchFound) if (!matchFound)
@ -456,7 +456,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
* ooops! we couldn't find this parameter in the parameter list. * ooops! we couldn't find this parameter in the parameter list.
* Signal an error * Signal an error
*/ */
elog(ABORT, "ExecEvalParam: Unknown value for parameter %s", elog(ERROR, "ExecEvalParam: Unknown value for parameter %s",
thisParameterName); thisParameterName);
} }
@ -510,13 +510,13 @@ GetAttributeByNum(TupleTableSlot *slot,
Datum retval; Datum retval;
if (!AttributeNumberIsValid(attrno)) if (!AttributeNumberIsValid(attrno))
elog(ABORT, "GetAttributeByNum: Invalid attribute number"); elog(ERROR, "GetAttributeByNum: Invalid attribute number");
if (!AttrNumberIsForUserDefinedAttr(attrno)) if (!AttrNumberIsForUserDefinedAttr(attrno))
elog(ABORT, "GetAttributeByNum: cannot access system attributes here"); elog(ERROR, "GetAttributeByNum: cannot access system attributes here");
if (isNull == (bool *) NULL) if (isNull == (bool *) NULL)
elog(ABORT, "GetAttributeByNum: a NULL isNull flag was passed"); elog(ERROR, "GetAttributeByNum: a NULL isNull flag was passed");
if (TupIsNull(slot)) if (TupIsNull(slot))
{ {
@ -557,10 +557,10 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
int i; int i;
if (attname == NULL) if (attname == NULL)
elog(ABORT, "GetAttributeByName: Invalid attribute name"); elog(ERROR, "GetAttributeByName: Invalid attribute name");
if (isNull == (bool *) NULL) if (isNull == (bool *) NULL)
elog(ABORT, "GetAttributeByName: a NULL isNull flag was passed"); elog(ERROR, "GetAttributeByName: a NULL isNull flag was passed");
if (TupIsNull(slot)) if (TupIsNull(slot))
{ {
@ -584,7 +584,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
} }
if (attrno == InvalidAttrNumber) if (attrno == InvalidAttrNumber)
elog(ABORT, "GetAttributeByName: attribute %s not found", attname); elog(ERROR, "GetAttributeByName: attribute %s not found", attname);
retval = heap_getattr(slot->val, retval = heap_getattr(slot->val,
slot->ttc_buffer, slot->ttc_buffer,
@ -696,7 +696,7 @@ ExecMakeFunctionResult(Node *node,
bool argDone; bool argDone;
if (fcache->nargs > MAXFMGRARGS) if (fcache->nargs > MAXFMGRARGS)
elog(ABORT, "ExecMakeFunctionResult: too many arguments"); elog(ERROR, "ExecMakeFunctionResult: too many arguments");
/* /*
* If the setArg in the fcache is set we have an argument * If the setArg in the fcache is set we have an argument
@ -1232,13 +1232,13 @@ ExecEvalExpr(Node *expression,
retDatum = (Datum) ExecEvalNot(expr, econtext, isNull); retDatum = (Datum) ExecEvalNot(expr, econtext, isNull);
break; break;
default: default:
elog(ABORT, "ExecEvalExpr: unknown expression type"); elog(ERROR, "ExecEvalExpr: unknown expression type");
break; break;
} }
break; break;
} }
default: default:
elog(ABORT, "ExecEvalExpr: unknown expression type"); elog(ERROR, "ExecEvalExpr: unknown expression type");
break; break;
} }

View File

@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.14 1998/01/05 03:31:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.15 1998/01/07 21:02:48 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -315,7 +315,7 @@ ExecAllocTableSlot(TupleTable table)
* table->size = newsize; * table->size = newsize;
*/ */
elog(NOTICE, "Plan requires more slots than are available"); elog(NOTICE, "Plan requires more slots than are available");
elog(ABORT, "send mail to your local executor guru to fix this"); elog(ERROR, "send mail to your local executor guru to fix this");
} }
/* ---------------- /* ----------------
@ -859,7 +859,7 @@ NodeGetResultTupleSlot(Plan *node)
* should never get here * should never get here
* ---------------- * ----------------
*/ */
elog(ABORT, "NodeGetResultTupleSlot: node not yet supported: %d ", elog(ERROR, "NodeGetResultTupleSlot: node not yet supported: %d ",
nodeTag(node)); nodeTag(node));
return NULL; return NULL;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.22 1998/01/05 03:31:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.23 1998/01/07 21:02:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -499,7 +499,7 @@ ExecSetTypeInfo(int index,
*/ */
att = typeInfo[index]; att = typeInfo[index];
if (att == NULL) if (att == NULL)
elog(ABORT, "ExecSetTypeInfo: trying to assign through NULL"); elog(ERROR, "ExecSetTypeInfo: trying to assign through NULL");
/* ---------------- /* ----------------
* assign values to the tuple descriptor, being careful not * assign values to the tuple descriptor, being careful not
@ -1219,7 +1219,7 @@ setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
heap_close(rd); heap_close(rd);
} }
else else
elog(ABORT, "setVarAttrLenForCreateTable: can't get length for variable-length field"); elog(ERROR, "setVarAttrLenForCreateTable: can't get length for variable-length field");
} }
tl = lnext(tl); tl = lnext(tl);
} }

View File

@ -170,7 +170,7 @@ ExecAgg(Agg *node)
ObjectIdGetDatum(agg->basetype), ObjectIdGetDatum(agg->basetype),
0, 0); 0, 0);
if (!HeapTupleIsValid(aggTuple)) if (!HeapTupleIsValid(aggTuple))
elog(ABORT, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)", elog(ERROR, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)",
aggname, aggname,
typeidTypeName(agg->basetype)); typeidTypeName(agg->basetype));
aggp = (Form_pg_aggregate) GETSTRUCT(aggTuple); aggp = (Form_pg_aggregate) GETSTRUCT(aggTuple);
@ -204,7 +204,7 @@ ExecAgg(Agg *node)
* ------------------------------------------ * ------------------------------------------
*/ */
if (isNull2) if (isNull2)
elog(ABORT, "ExecAgg: agginitval2 is null"); elog(ERROR, "ExecAgg: agginitval2 is null");
} }
if (OidIsValid(xfn1_oid)) if (OidIsValid(xfn1_oid))
@ -305,7 +305,7 @@ ExecAgg(Agg *node)
&isNull, &isDone); &isNull, &isDone);
break; break;
default: default:
elog(ABORT, "ExecAgg: Bad Agg->Target for Agg %d", i); elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
} }
if (isNull && !aggregates[i]->usenulls) if (isNull && !aggregates[i]->usenulls)
@ -355,7 +355,7 @@ ExecAgg(Agg *node)
break; break;
default: default:
elog(ABORT, "ExecAgg: Bad Agg->Target for Agg %d", i); elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
} }
if (attlen == -1) if (attlen == -1)
{ {
@ -443,7 +443,7 @@ ExecAgg(Agg *node)
args[0] = (char *) value2[i]; args[0] = (char *) value2[i];
} }
else else
elog(ABORT, "ExecAgg: no valid transition functions??"); elog(ERROR, "ExecAgg: no valid transition functions??");
value1[i] = value1[i] =
(Datum) fmgr_c(aggfns->finalfn, aggfns->finalfn_oid, (Datum) fmgr_c(aggfns->finalfn, aggfns->finalfn_oid,
aggfns->finalfn_nargs, (FmgrValues *) args, aggfns->finalfn_nargs, (FmgrValues *) args,
@ -462,7 +462,7 @@ ExecAgg(Agg *node)
value1[i] = value2[i]; value1[i] = value2[i];
} }
else else
elog(ABORT, "ExecAgg: no valid transition functions??"); elog(ERROR, "ExecAgg: no valid transition functions??");
} }
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.14 1998/01/05 03:31:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.15 1998/01/07 21:02:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -90,7 +90,7 @@ ExecHash(Hash *node)
hashtable = node->hashtable; hashtable = node->hashtable;
if (hashtable == NULL) if (hashtable == NULL)
elog(ABORT, "ExecHash: hash table is NULL."); elog(ERROR, "ExecHash: hash table is NULL.");
nbatch = hashtable->nbatch; nbatch = hashtable->nbatch;
@ -359,7 +359,7 @@ ExecHashTableCreate(Hash *node)
if (hashtable == NULL) if (hashtable == NULL)
{ {
elog(ABORT, "not enough memory for hashjoin."); elog(ERROR, "not enough memory for hashjoin.");
} }
/* ---------------- /* ----------------
* initialize the hash table header * initialize the hash table header
@ -635,7 +635,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
if (hashtable == NULL) if (hashtable == NULL)
{ {
perror("repalloc"); perror("repalloc");
elog(ABORT, "can't expand hashtable."); elog(ERROR, "can't expand hashtable.");
} }
#else #else
/* ------------------ /* ------------------
@ -644,7 +644,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
* - Chris Dunlop, <chris@onthe.net.au> * - Chris Dunlop, <chris@onthe.net.au>
* ------------------ * ------------------
*/ */
elog(ABORT, "hash table out of memory. Use -B parameter to increase buffers."); elog(ERROR, "hash table out of memory. Use -B parameter to increase buffers.");
#endif #endif
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.12 1998/01/05 03:31:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.13 1998/01/07 21:02:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -641,7 +641,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
op = (Oper *) clause->oper; op = (Oper *) clause->oper;
if (!IsA(op, Oper)) if (!IsA(op, Oper))
elog(ABORT, "ExecInitIndexScan: op not an Oper!"); elog(ERROR, "ExecInitIndexScan: op not an Oper!");
opid = op->opid; opid = op->opid;
@ -757,7 +757,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ---------------- * ----------------
*/ */
if (scanvar == LEFT_OP) if (scanvar == LEFT_OP)
elog(ABORT, "ExecInitIndexScan: %s", elog(ERROR, "ExecInitIndexScan: %s",
"both left and right op's are rel-vars"); "both left and right op's are rel-vars");
/* ---------------- /* ----------------
@ -810,7 +810,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ---------------- * ----------------
*/ */
if (scanvar == LEFT_OP) if (scanvar == LEFT_OP)
elog(ABORT, "ExecInitIndexScan: %s", elog(ERROR, "ExecInitIndexScan: %s",
"both left and right ops are rel-vars"); "both left and right ops are rel-vars");
varattno = 1; varattno = 1;
@ -836,7 +836,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ---------------- * ----------------
*/ */
if (scanvar == NO_OP) if (scanvar == NO_OP)
elog(ABORT, "ExecInitIndexScan: %s", elog(ERROR, "ExecInitIndexScan: %s",
"neither leftop nor rightop refer to scan relation"); "neither leftop nor rightop refer to scan relation");
/* ---------------- /* ----------------

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.11 1998/01/05 03:31:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.12 1998/01/07 21:02:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ FormSortKeys(Sort *sortnode)
* ---------------- * ----------------
*/ */
if (keycount <= 0) if (keycount <= 0)
elog(ABORT, "FormSortKeys: keycount <= 0"); elog(ERROR, "FormSortKeys: keycount <= 0");
sortkeys = (ScanKey) palloc(keycount * sizeof(ScanKeyData)); sortkeys = (ScanKey) palloc(keycount * sizeof(ScanKeyData));
/* ---------------- /* ----------------

View File

@ -15,7 +15,7 @@
* ExecEndTee * ExecEndTee
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.14 1998/01/05 03:31:21 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.15 1998/01/07 21:02:58 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -329,7 +329,7 @@ ExecTee(Tee *node, Plan *parent)
} }
else else
{ {
elog(ABORT, "A Tee node can only be executed from its left or right parent\n"); elog(ERROR, "A Tee node can only be executed from its left or right parent\n");
return NULL; return NULL;
} }

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.8 1998/01/07 15:32:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.9 1998/01/07 21:03:04 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -36,14 +36,14 @@ makeStringInfo()
res = (StringInfo) palloc(sizeof(StringInfoData)); res = (StringInfo) palloc(sizeof(StringInfoData));
if (res == NULL) if (res == NULL)
{ {
elog(ABORT, "makeStringInfo: Out of memory!"); elog(ERROR, "makeStringInfo: Out of memory!");
} }
size = 100; size = 100;
res->data = palloc(size); res->data = palloc(size);
if (res->data == NULL) if (res->data == NULL)
{ {
elog(ABORT, elog(ERROR,
"makeStringInfo: Out of memory! (%ld bytes requested)", size); "makeStringInfo: Out of memory! (%ld bytes requested)", size);
} }
res->maxlen = size; res->maxlen = size;
@ -105,7 +105,7 @@ appendStringInfo(StringInfo str, char *buffer)
s = palloc(newlen); s = palloc(newlen);
if (s == NULL) if (s == NULL)
{ {
elog(ABORT, elog(ERROR,
"appendStringInfo: Out of memory (%d bytes requested)", "appendStringInfo: Out of memory (%d bytes requested)",
newlen); newlen);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.18 1998/01/05 03:31:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.19 1998/01/07 21:03:12 momjian Exp $
* *
* NOTES * NOTES
* This should be moved to a more appropriate place. It is here * This should be moved to a more appropriate place. It is here
@ -100,12 +100,12 @@ lo_close(int fd)
if (fd >= MAX_LOBJ_FDS) if (fd >= MAX_LOBJ_FDS)
{ {
elog(ABORT, "lo_close: large obj descriptor (%d) out of range", fd); elog(ERROR, "lo_close: large obj descriptor (%d) out of range", fd);
return -2; return -2;
} }
if (cookies[fd] == NULL) if (cookies[fd] == NULL)
{ {
elog(ABORT, "lo_close: invalid large obj descriptor (%d)", fd); elog(ERROR, "lo_close: invalid large obj descriptor (%d)", fd);
return -3; return -3;
} }
#if FSDB #if FSDB
@ -150,7 +150,7 @@ lo_lseek(int fd, int offset, int whence)
if (fd >= MAX_LOBJ_FDS) if (fd >= MAX_LOBJ_FDS)
{ {
elog(ABORT, "lo_seek: large obj descriptor (%d) out of range", fd); elog(ERROR, "lo_seek: large obj descriptor (%d) out of range", fd);
return -2; return -2;
} }
@ -200,12 +200,12 @@ lo_tell(int fd)
{ {
if (fd >= MAX_LOBJ_FDS) if (fd >= MAX_LOBJ_FDS)
{ {
elog(ABORT, "lo_tell: large object descriptor (%d) out of range", fd); elog(ERROR, "lo_tell: large object descriptor (%d) out of range", fd);
return -2; return -2;
} }
if (cookies[fd] == NULL) if (cookies[fd] == NULL)
{ {
elog(ABORT, "lo_tell: invalid large object descriptor (%d)", fd); elog(ERROR, "lo_tell: invalid large object descriptor (%d)", fd);
return -3; return -3;
} }
return inv_tell(cookies[fd]); return inv_tell(cookies[fd]);
@ -273,7 +273,7 @@ lo_import(text *filename)
fd = open(fnamebuf, O_RDONLY, 0666); fd = open(fnamebuf, O_RDONLY, 0666);
if (fd < 0) if (fd < 0)
{ /* error */ { /* error */
elog(ABORT, "be_lo_import: can't open unix file\"%s\"\n", elog(ERROR, "be_lo_import: can't open unix file\"%s\"\n",
fnamebuf); fnamebuf);
} }
@ -283,7 +283,7 @@ lo_import(text *filename)
lobj = inv_create(INV_READ | INV_WRITE); lobj = inv_create(INV_READ | INV_WRITE);
if (lobj == NULL) if (lobj == NULL)
{ {
elog(ABORT, "lo_import: can't create inv object for \"%s\"", elog(ERROR, "lo_import: can't create inv object for \"%s\"",
fnamebuf); fnamebuf);
} }
@ -301,7 +301,7 @@ lo_import(text *filename)
tmp = inv_write(lobj, buf, nbytes); tmp = inv_write(lobj, buf, nbytes);
if (tmp < nbytes) if (tmp < nbytes)
{ {
elog(ABORT, "lo_import: error while reading \"%s\"", elog(ERROR, "lo_import: error while reading \"%s\"",
fnamebuf); fnamebuf);
} }
} }
@ -335,7 +335,7 @@ lo_export(Oid lobjId, text *filename)
lobj = inv_open(lobjId, INV_READ); lobj = inv_open(lobjId, INV_READ);
if (lobj == NULL) if (lobj == NULL)
{ {
elog(ABORT, "lo_export: can't open inv object %d", elog(ERROR, "lo_export: can't open inv object %d",
lobjId); lobjId);
} }
@ -348,7 +348,7 @@ lo_export(Oid lobjId, text *filename)
umask(oumask); umask(oumask);
if (fd < 0) if (fd < 0)
{ /* error */ { /* error */
elog(ABORT, "lo_export: can't open unix file\"%s\"", elog(ERROR, "lo_export: can't open unix file\"%s\"",
fnamebuf); fnamebuf);
} }
@ -360,7 +360,7 @@ lo_export(Oid lobjId, text *filename)
tmp = write(fd, buf, nbytes); tmp = write(fd, buf, nbytes);
if (tmp < nbytes) if (tmp < nbytes)
{ {
elog(ABORT, "lo_export: error while writing \"%s\"", elog(ERROR, "lo_export: error while writing \"%s\"",
fnamebuf); fnamebuf);
} }
} }

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.12 1998/01/05 03:31:28 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.13 1998/01/07 21:03:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -82,7 +82,7 @@ PQfn(int fnid,
} }
else if (args[i].len > sizeof(int4)) else if (args[i].len > sizeof(int4))
{ {
elog(ABORT, "arg_length of argument %d too long", i); elog(ERROR, "arg_length of argument %d too long", i);
} }
else else
{ {
@ -125,7 +125,7 @@ PQfn(int fnid,
* If a query is does not return tuples, return "C query-command". * If a query is does not return tuples, return "C query-command".
* If there is an error: return "E error-message". * If there is an error: return "E error-message".
* *
* Note: if we get a serious error or an elog(ABORT), then PQexec never * Note: if we get a serious error or an elog(ERROR), then PQexec never
* returns because the system longjmp's back to the main loop. * returns because the system longjmp's back to the main loop.
* ---------------- * ----------------
*/ */
@ -211,7 +211,7 @@ pqtest_PQexec(char *q)
case 'P': case 'P':
a = PQparray(&res[1]); a = PQparray(&res[1]);
if (a == NULL) if (a == NULL)
elog(ABORT, "pqtest_PQexec: PQparray could not find portal %s", elog(ERROR, "pqtest_PQexec: PQparray could not find portal %s",
res); res);
t = PQntuples(a); t = PQntuples(a);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.32 1998/01/05 03:31:30 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.33 1998/01/07 21:03:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -694,7 +694,7 @@ StreamConnection(int server_fd, Port *port)
(struct sockaddr *) & port->raddr, (struct sockaddr *) & port->raddr,
&addrlen)) < 0) &addrlen)) < 0)
{ {
elog(ABORT, "postmaster: StreamConnection: accept: %m"); elog(ERROR, "postmaster: StreamConnection: accept: %m");
return (STATUS_ERROR); return (STATUS_ERROR);
} }
@ -703,7 +703,7 @@ StreamConnection(int server_fd, Port *port)
if (getsockname(port->sock, (struct sockaddr *) & port->laddr, if (getsockname(port->sock, (struct sockaddr *) & port->laddr,
&addrlen) < 0) &addrlen) < 0)
{ {
elog(ABORT, "postmaster: StreamConnection: getsockname: %m"); elog(ERROR, "postmaster: StreamConnection: getsockname: %m");
return (STATUS_ERROR); return (STATUS_ERROR);
} }
if (family == AF_INET) if (family == AF_INET)
@ -714,13 +714,13 @@ StreamConnection(int server_fd, Port *port)
pe = getprotobyname("TCP"); pe = getprotobyname("TCP");
if (pe == NULL) if (pe == NULL)
{ {
elog(ABORT, "postmaster: getprotobyname failed"); elog(ERROR, "postmaster: getprotobyname failed");
return (STATUS_ERROR); return (STATUS_ERROR);
} }
if (setsockopt(port->sock, pe->p_proto, TCP_NODELAY, if (setsockopt(port->sock, pe->p_proto, TCP_NODELAY,
&on, sizeof(on)) < 0) &on, sizeof(on)) < 0)
{ {
elog(ABORT, "postmaster: setsockopt failed"); elog(ERROR, "postmaster: setsockopt failed");
return (STATUS_ERROR); return (STATUS_ERROR);
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.11 1998/01/05 03:31:34 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.12 1998/01/07 21:03:26 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -243,7 +243,7 @@ _equalParam(Param *a, Param *b)
return (true); return (true);
break; break;
default: default:
elog(ABORT, "_equalParam: Invalid paramkind value: %d", elog(ERROR, "_equalParam: Invalid paramkind value: %d",
a->paramkind); a->paramkind);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.9 1998/01/05 03:31:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.10 1998/01/07 21:03:29 momjian Exp $
* *
* NOTES * NOTES
* XXX a few of the following functions are duplicated to handle * XXX a few of the following functions are duplicated to handle
@ -237,7 +237,7 @@ nconc(List *l1, List *l2)
if (l2 == NIL) if (l2 == NIL)
return l1; return l1;
if (l1 == l2) if (l1 == l2)
elog(ABORT, "tryout to nconc a list to itself"); elog(ERROR, "tryout to nconc a list to itself");
for (temp = l1; lnext(temp) != NULL; temp = lnext(temp)) for (temp = l1; lnext(temp) != NULL; temp = lnext(temp))
; ;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.9 1998/01/07 15:32:31 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.10 1998/01/07 21:03:34 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -283,7 +283,7 @@ nodeRead(bool read_car_only)
make_dotted_pair_cell = true; make_dotted_pair_cell = true;
break; break;
default: default:
elog(ABORT, "nodeRead: Bad type %d", type); elog(ERROR, "nodeRead: Bad type %d", type);
break; break;
} }
if (make_dotted_pair_cell) if (make_dotted_pair_cell)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.16 1998/01/07 08:08:02 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.17 1998/01/07 21:03:37 momjian Exp $
* *
* NOTES * NOTES
* Most of the read functions for plan nodes are tested. (In fact, they * Most of the read functions for plan nodes are tested. (In fact, they
@ -2114,7 +2114,7 @@ parsePlanString(void)
} }
else else
{ {
elog(ABORT, "badly formatted planstring \"%.10s\"...\n", token); elog(ERROR, "badly formatted planstring \"%.10s\"...\n", token);
} }
return ((Node *) return_value); return ((Node *) return_value);
@ -2153,7 +2153,7 @@ readDatum(Oid type)
{ {
if (length > sizeof(Datum)) if (length > sizeof(Datum))
{ {
elog(ABORT, "readValue: byval & length = %d", length); elog(ERROR, "readValue: byval & length = %d", length);
} }
s = (char *) (&res); s = (char *) (&res);
for (i = 0; i < sizeof(Datum); i++) for (i = 0; i < sizeof(Datum); i++)
@ -2181,7 +2181,7 @@ readDatum(Oid type)
token = lsptok(NULL, &tokenLength); /* skip the ']' */ token = lsptok(NULL, &tokenLength); /* skip the ']' */
if (token[0] != ']') if (token[0] != ']')
{ {
elog(ABORT, "readValue: ']' expected, length =%d", length); elog(ERROR, "readValue: ']' expected, length =%d", length);
} }
return (res); return (res);

View File

@ -3,7 +3,7 @@
* geqo_erx.c-- * geqo_erx.c--
* edge recombination crossover [ER] * edge recombination crossover [ER]
* *
* $Id: geqo_erx.c,v 1.6 1998/01/05 03:31:48 momjian Exp $ * $Id: geqo_erx.c,v 1.7 1998/01/07 21:03:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -353,7 +353,7 @@ gimme_gene(Edge edge, Edge *edge_table)
minimum_count = 1; minimum_count = 1;
} }
else if (minimum_count == -1) else if (minimum_count == -1)
elog(ABORT, "gimme_gene: Internal error - minimum_count not set"); elog(ERROR, "gimme_gene: Internal error - minimum_count not set");
else if (edge_table[(int) friend].unused_edges == minimum_edges) else if (edge_table[(int) friend].unused_edges == minimum_edges)
minimum_count++; minimum_count++;
@ -379,7 +379,7 @@ gimme_gene(Edge edge, Edge *edge_table)
} }
/* ... should never be reached */ /* ... should never be reached */
elog(ABORT, "gimme_gene: neither shared nor minimum number nor random edge found"); elog(ERROR, "gimme_gene: neither shared nor minimum number nor random edge found");
return 0; /* to keep the compiler quiet */ return 0; /* to keep the compiler quiet */
} }
@ -487,6 +487,6 @@ edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene)
/* ... should never be reached */ /* ... should never be reached */
elog(ABORT, "edge_failure: no edge detected"); elog(ERROR, "edge_failure: no edge detected");
return 0; /* to keep the compiler quiet */ return 0; /* to keep the compiler quiet */
} }

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_eval.c,v 1.16 1998/01/05 03:31:49 momjian Exp $ * $Id: geqo_eval.c,v 1.17 1998/01/07 21:03:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -737,6 +737,6 @@ geqo_nth(int stop, List *rels)
return lfirst(r); return lfirst(r);
i++; i++;
} }
elog(ABORT, "geqo_nth: Internal error - ran off end of list"); elog(ERROR, "geqo_nth: Internal error - ran off end of list");
return NULL; /* to keep compiler happy */ return NULL; /* to keep compiler happy */
} }

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_misc.c,v 1.6 1998/01/05 03:31:51 momjian Exp $ * $Id: geqo_misc.c,v 1.7 1998/01/07 21:03:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -53,7 +53,7 @@ avg_pool(Pool *pool)
double cumulative = 0.0; double cumulative = 0.0;
if (pool->size == 0) if (pool->size == 0)
elog(ABORT, "avg_pool: pool_size of zero"); elog(ERROR, "avg_pool: pool_size of zero");
for (i = 0; i < pool->size; i++) for (i = 0; i < pool->size; i++)
cumulative = cumulative + pool->data[i].worth; cumulative = cumulative + pool->data[i].worth;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.7 1998/01/05 03:31:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.8 1998/01/07 21:03:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -133,7 +133,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */
/* sanity check */ /* sanity check */
if ((!streamroot && laststream) || if ((!streamroot && laststream) ||
(streamroot && !laststream)) (streamroot && !laststream))
elog(ABORT, "called xfunc_predmig with bad inputs"); elog(ERROR, "called xfunc_predmig with bad inputs");
if (streamroot) if (streamroot)
Assert(xfunc_check_stream(streamroot)); Assert(xfunc_check_stream(streamroot));
@ -333,7 +333,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
orignode = (Stream) get_downstream(orignode)) orignode = (Stream) get_downstream(orignode))
/* empty body in for loop */ ; /* empty body in for loop */ ;
if (!orignode) if (!orignode)
elog(ABORT, "Didn't find matching node in original stream"); elog(ERROR, "Didn't find matching node in original stream");
/* pull up this node as far as it should go */ /* pull up this node as far as it should go */
@ -790,14 +790,14 @@ xfunc_check_stream(Stream node)
{ {
if ((Stream) get_upstream((Stream) get_downstream(temp)) != temp) if ((Stream) get_upstream((Stream) get_downstream(temp)) != temp)
{ {
elog(ABORT, "bad pointers in stream"); elog(ERROR, "bad pointers in stream");
return (false); return (false);
} }
if (!is_clause(temp)) if (!is_clause(temp))
{ {
if ((tmp = xfunc_num_relids(temp)) >= numrelids) if ((tmp = xfunc_num_relids(temp)) >= numrelids)
{ {
elog(ABORT, "Joins got reordered!"); elog(ERROR, "Joins got reordered!");
return (false); return (false);
} }
numrelids = tmp; numrelids = tmp;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.10 1998/01/06 18:52:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.11 1998/01/07 21:03:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -130,7 +130,7 @@ prune_rel_paths(List *rel_list)
rel->size = compute_joinrel_size(cheapest); rel->size = compute_joinrel_size(cheapest);
} }
else else
elog(ABORT, "non JoinPath called"); elog(ERROR, "non JoinPath called");
} }
} }

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.10 1998/01/05 03:31:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.11 1998/01/07 21:03:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -461,7 +461,7 @@ xfunc_local_expense(LispValue clause)
} }
else else
{ {
elog(ABORT, "Clause node of undetermined type"); elog(ERROR, "Clause node of undetermined type");
return (-1); return (-1);
} }
} }
@ -497,7 +497,7 @@ xfunc_func_expense(LispValue node, LispValue args)
{ {
/* don't trust the opid in the Oper node. Use the opno. */ /* don't trust the opid in the Oper node. Use the opno. */
if (!(funcid = get_opcode(get_opno((Oper) node)))) if (!(funcid = get_opcode(get_opno((Oper) node))))
elog(ABORT, "Oper's function is undefined"); elog(ERROR, "Oper's function is undefined");
} }
else else
{ {
@ -507,7 +507,7 @@ xfunc_func_expense(LispValue node, LispValue args)
/* look up tuple in cache */ /* look up tuple in cache */
tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0); tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0);
if (!HeapTupleIsValid(tupl)) if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d", funcid); elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl); proc = (Form_pg_proc) GETSTRUCT(tupl);
/* /*
@ -622,7 +622,7 @@ xfunc_width(LispValue clause)
PointerGetDatum(get_vartype((Var) clause)), PointerGetDatum(get_vartype((Var) clause)),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tupl)) if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for type %d", elog(ERROR, "Cache lookup failed for type %d",
get_vartype((Var) clause)); get_vartype((Var) clause));
type = (TypeTupleForm) GETSTRUCT(tupl); type = (TypeTupleForm) GETSTRUCT(tupl);
if (get_varattno((Var) clause) == 0) if (get_varattno((Var) clause) == 0)
@ -686,7 +686,7 @@ xfunc_width(LispValue clause)
ObjectIdGetDatum(get_opno((Oper) get_op(clause))), ObjectIdGetDatum(get_opno((Oper) get_op(clause))),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tupl)) if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d", elog(ERROR, "Cache lookup failed for procedure %d",
get_opno((Oper) get_op(clause))); get_opno((Oper) get_op(clause)));
return (xfunc_func_width return (xfunc_func_width
((RegProcedure) (((OperatorTupleForm) (GETSTRUCT(tupl)))->oprcode), ((RegProcedure) (((OperatorTupleForm) (GETSTRUCT(tupl)))->oprcode),
@ -717,7 +717,7 @@ xfunc_width(LispValue clause)
} }
else else
{ {
elog(ABORT, "Clause node of undetermined type"); elog(ERROR, "Clause node of undetermined type");
return (-1); return (-1);
} }
@ -855,7 +855,7 @@ xfunc_find_references(LispValue clause)
} }
else else
{ {
elog(ABORT, "Clause node of undetermined type"); elog(ERROR, "Clause node of undetermined type");
return ((List) LispNil); return ((List) LispNil);
} }
} }
@ -1192,7 +1192,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
xfunc_fixvars(lfirst(tmpclause), rel, varno); xfunc_fixvars(lfirst(tmpclause), rel, varno);
else else
{ {
elog(ABORT, "Clause node of undetermined type"); elog(ERROR, "Clause node of undetermined type");
} }
} }
@ -1320,7 +1320,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
Assert(RegProcedureIsValid(funcid)); Assert(RegProcedureIsValid(funcid));
tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0); tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0);
if (!HeapTupleIsValid(tupl)) if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d", funcid); elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl); proc = (Form_pg_proc) GETSTRUCT(tupl);
/* if function returns a tuple, get the width of that */ /* if function returns a tuple, get the width of that */
@ -1338,7 +1338,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
ObjectIdGetDatum(proc->prorettype), ObjectIdGetDatum(proc->prorettype),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tupl)) if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for type %d", proc->prorettype); elog(ERROR, "Cache lookup failed for type %d", proc->prorettype);
type = (TypeTupleForm) GETSTRUCT(tupl); type = (TypeTupleForm) GETSTRUCT(tupl);
/* if the type length is known, return that */ /* if the type length is known, return that */
if (type->typlen != -1) if (type->typlen != -1)
@ -1421,7 +1421,7 @@ xfunc_LispRemove(LispValue foo, List bar)
sanity = true; /* found a matching item to remove! */ sanity = true; /* found a matching item to remove! */
if (!sanity) if (!sanity)
elog(ABORT, "xfunc_LispRemove: didn't find a match!"); elog(ERROR, "xfunc_LispRemove: didn't find a match!");
return (result); return (result);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.21 1998/01/05 03:31:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.22 1998/01/07 21:04:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -185,7 +185,7 @@ create_scan_node(Path *best_path, List *tlist)
break; break;
default: default:
elog(ABORT, "create_scan_node: unknown node type", elog(ERROR, "create_scan_node: unknown node type",
best_path->pathtype); best_path->pathtype);
break; break;
} }
@ -252,7 +252,7 @@ create_join_node(JoinPath *best_path, List *tlist)
break; break;
default: default:
/* do nothing */ /* do nothing */
elog(ABORT, "create_join_node: unknown node type", elog(ERROR, "create_join_node: unknown node type",
best_path->path.pathtype); best_path->path.pathtype);
} }
@ -294,7 +294,7 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses)
temp = best_path->parent->relids; temp = best_path->parent->relids;
if (temp == NULL) if (temp == NULL)
elog(ABORT, "scanrelid is empty"); elog(ERROR, "scanrelid is empty");
else else
scan_relid = (Index) lfirsti(temp); /* ??? who takes care of scan_relid = (Index) lfirsti(temp); /* ??? who takes care of
* lnext? - ay */ * lnext? - ay */
@ -364,7 +364,7 @@ create_indexscan_node(IndexPath *best_path,
ObjectIdGetDatum(lfirsti(ixid)), ObjectIdGetDatum(lfirsti(ixid)),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(indexTuple)) if (!HeapTupleIsValid(indexTuple))
elog(ABORT, "create_plan: index %d not found", elog(ERROR, "create_plan: index %d not found",
lfirsti(ixid)); lfirsti(ixid));
index = (IndexTupleForm) GETSTRUCT(indexTuple); index = (IndexTupleForm) GETSTRUCT(indexTuple);
if (index->indislossy) if (index->indislossy)
@ -915,7 +915,7 @@ make_temp(List *tlist,
break; break;
default: default:
elog(ABORT, "make_temp: unknown temp type %d", temptype); elog(ERROR, "make_temp: unknown temp type %d", temptype);
} }
return (retval); return (retval);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.14 1998/01/05 03:32:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.15 1998/01/07 21:04:04 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -407,7 +407,7 @@ make_groupPlan(List **tlist,
if (length(glc) != 0) if (length(glc) != 0)
{ {
elog(ABORT, "group attribute disappeared from target list"); elog(ERROR, "group attribute disappeared from target list");
} }
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.19 1998/01/05 03:32:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.20 1998/01/07 21:04:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -279,7 +279,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if (rettype == InvalidOid) if (rettype == InvalidOid)
return; return;
else else
elog(ABORT, "return type mismatch in function decl: final query is a catalog utility"); elog(ERROR, "return type mismatch in function decl: final query is a catalog utility");
} }
/* okay, it's an ordinary query */ /* okay, it's an ordinary query */
@ -294,7 +294,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if (rettype == InvalidOid) if (rettype == InvalidOid)
{ {
if (cmd == CMD_SELECT) if (cmd == CMD_SELECT)
elog(ABORT, elog(ERROR,
"function declared with no return type, but final query is a retrieve"); "function declared with no return type, but final query is a retrieve");
else else
return; return;
@ -302,14 +302,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
/* by here, the function is declared to return some type */ /* by here, the function is declared to return some type */
if ((typ = typeidType(rettype)) == NULL) if ((typ = typeidType(rettype)) == NULL)
elog(ABORT, "can't find return type %d for function\n", rettype); elog(ERROR, "can't find return type %d for function\n", rettype);
/* /*
* test 3: if the function is declared to return a value, then the * test 3: if the function is declared to return a value, then the
* final query had better be a retrieve. * final query had better be a retrieve.
*/ */
if (cmd != CMD_SELECT) if (cmd != CMD_SELECT)
elog(ABORT, "function declared to return type %s, but final query is not a retrieve", typeTypeName(typ)); elog(ERROR, "function declared to return type %s, but final query is not a retrieve", typeTypeName(typ));
/* /*
* test 4: for base type returns, the target list should have exactly * test 4: for base type returns, the target list should have exactly
@ -319,11 +319,11 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if (typeTypeRelid(typ) == InvalidOid) if (typeTypeRelid(typ) == InvalidOid)
{ {
if (exec_tlist_length(tlist) > 1) if (exec_tlist_length(tlist) > 1)
elog(ABORT, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ)); elog(ERROR, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ));
resnode = (Resdom *) ((TargetEntry *) lfirst(tlist))->resdom; resnode = (Resdom *) ((TargetEntry *) lfirst(tlist))->resdom;
if (resnode->restype != rettype) if (resnode->restype != rettype)
elog(ABORT, "return type mismatch in function: declared to return %s, returns %s", typeTypeName(typ), typeidTypeName(resnode->restype)); elog(ERROR, "return type mismatch in function: declared to return %s, returns %s", typeTypeName(typ), typeidTypeName(resnode->restype));
/* by here, base return types match */ /* by here, base return types match */
return; return;
@ -352,13 +352,13 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
reln = heap_open(typeTypeRelid(typ)); reln = heap_open(typeTypeRelid(typ));
if (!RelationIsValid(reln)) if (!RelationIsValid(reln))
elog(ABORT, "cannot open relation relid %d", typeTypeRelid(typ)); elog(ERROR, "cannot open relation relid %d", typeTypeRelid(typ));
relid = reln->rd_id; relid = reln->rd_id;
relnatts = reln->rd_rel->relnatts; relnatts = reln->rd_rel->relnatts;
if (exec_tlist_length(tlist) != relnatts) if (exec_tlist_length(tlist) != relnatts)
elog(ABORT, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ)); elog(ERROR, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ));
/* expect attributes 1 .. n in order */ /* expect attributes 1 .. n in order */
for (i = 1; i <= relnatts; i++) for (i = 1; i <= relnatts; i++)
@ -388,14 +388,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
else if (IsA(thenode, Func)) else if (IsA(thenode, Func))
tletype = (Oid) get_functype((Func *) thenode); tletype = (Oid) get_functype((Func *) thenode);
else else
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ERROR, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
} }
else else
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ERROR, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
#endif #endif
/* reach right in there, why don't you? */ /* reach right in there, why don't you? */
if (tletype != reln->rd_att->attrs[i - 1]->atttypid) if (tletype != reln->rd_att->attrs[i - 1]->atttypid)
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ERROR, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
} }
heap_close(reln); heap_close(reln);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.11 1998/01/05 03:32:05 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.12 1998/01/07 21:04:13 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -201,7 +201,7 @@ set_temp_tlist_references(Temp *temp)
} }
else else
{ {
elog(ABORT, "calling set_temp_tlist_references with empty lefttree"); elog(ERROR, "calling set_temp_tlist_references with empty lefttree");
} }
} }
@ -651,7 +651,7 @@ replace_result_clause(List *clause,
/* /*
* Ooops! we can not handle that! * Ooops! we can not handle that!
*/ */
elog(ABORT, "replace_result_clause: Can not handle this tlist!\n"); elog(ERROR, "replace_result_clause: Can not handle this tlist!\n");
} }
} }
@ -809,7 +809,7 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
/* /*
* Ooops! we can not handle that! * Ooops! we can not handle that!
*/ */
elog(ABORT, "replace_agg_clause: Can not handle this tlist!\n"); elog(ERROR, "replace_agg_clause: Can not handle this tlist!\n");
} }
} }
@ -902,7 +902,7 @@ del_agg_clause(Node *clause)
/* /*
* Ooops! we can not handle that! * Ooops! we can not handle that!
*/ */
elog(ABORT, "del_agg_clause: Can not handle this tlist!\n"); elog(ERROR, "del_agg_clause: Can not handle this tlist!\n");
} }
return NULL; return NULL;
} }

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.12 1998/01/05 03:32:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.13 1998/01/07 21:04:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -77,7 +77,7 @@ relation_info(Query *root, Index relid,
} }
else else
{ {
elog(ABORT, "RelationCatalogInformation: Relation %d not found", elog(ERROR, "RelationCatalogInformation: Relation %d not found",
relationObjectId); relationObjectId);
} }
@ -152,7 +152,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
1, &indexKey); 1, &indexKey);
} }
if (!HeapScanIsValid(scan)) if (!HeapScanIsValid(scan))
elog(ABORT, "index_info: scan not started"); elog(ERROR, "index_info: scan not started");
indexTuple = heap_getnext(scan, 0, (Buffer *) NULL); indexTuple = heap_getnext(scan, 0, (Buffer *) NULL);
if (!HeapTupleIsValid(indexTuple)) if (!HeapTupleIsValid(indexTuple))
{ {
@ -218,7 +218,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
UInt16GetDatum(amstrategy), UInt16GetDatum(amstrategy),
0); 0);
if (!HeapTupleIsValid(amopTuple)) if (!HeapTupleIsValid(amopTuple))
elog(ABORT, "index_info: no amop %d %d %d", elog(ERROR, "index_info: no amop %d %d %d",
relam, index->indclass[i], amstrategy); relam, index->indclass[i], amstrategy);
info->orderOprs[i] = info->orderOprs[i] =
((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr; ((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr;
@ -349,10 +349,10 @@ restriction_selectivity(Oid functionObjectId,
(char *) constFlag, (char *) constFlag,
NULL); NULL);
if (!PointerIsValid(result)) if (!PointerIsValid(result))
elog(ABORT, "RestrictionClauseSelectivity: bad pointer"); elog(ERROR, "RestrictionClauseSelectivity: bad pointer");
if (*result < 0.0 || *result > 1.0) if (*result < 0.0 || *result > 1.0)
elog(ABORT, "RestrictionClauseSelectivity: bad value %lf", elog(ERROR, "RestrictionClauseSelectivity: bad value %lf",
*result); *result);
return ((Cost) *result); return ((Cost) *result);
@ -388,10 +388,10 @@ join_selectivity(Oid functionObjectId,
(char *) (int) attributeNumber2, (char *) (int) attributeNumber2,
NULL); NULL);
if (!PointerIsValid(result)) if (!PointerIsValid(result))
elog(ABORT, "JoinClauseSelectivity: bad pointer"); elog(ERROR, "JoinClauseSelectivity: bad pointer");
if (*result < 0.0 || *result > 1.0) if (*result < 0.0 || *result > 1.0)
elog(ABORT, "JoinClauseSelectivity: bad value %lf", elog(ERROR, "JoinClauseSelectivity: bad value %lf",
*result); *result);
return ((Cost) *result); return ((Cost) *result);
@ -532,7 +532,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum(indexrelid), ObjectIdGetDatum(indexrelid),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(indRel)) if (!HeapTupleIsValid(indRel))
elog(ABORT, "IndexSelectivity: index %d not found", elog(ERROR, "IndexSelectivity: index %d not found",
indexrelid); indexrelid);
relam = ((Form_pg_class) GETSTRUCT(indRel))->relam; relam = ((Form_pg_class) GETSTRUCT(indRel))->relam;
@ -540,7 +540,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum(indexrelid), ObjectIdGetDatum(indexrelid),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(indexTuple)) if (!HeapTupleIsValid(indexTuple))
elog(ABORT, "IndexSelectivity: index %d not found", elog(ERROR, "IndexSelectivity: index %d not found",
indexrelid); indexrelid);
index = (IndexTupleForm) GETSTRUCT(indexTuple); index = (IndexTupleForm) GETSTRUCT(indexTuple);
@ -595,7 +595,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum(relam), ObjectIdGetDatum(relam),
0); 0);
if (!HeapTupleIsValid(amopTuple)) if (!HeapTupleIsValid(amopTuple))
elog(ABORT, "IndexSelectivity: no amop %d %d", elog(ERROR, "IndexSelectivity: no amop %d %d",
indclass, operatorObjectIds[n]); indclass, operatorObjectIds[n]);
amop = (Form_pg_amop) GETSTRUCT(amopTuple); amop = (Form_pg_amop) GETSTRUCT(amopTuple);

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.5 1998/01/05 03:32:39 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.6 1998/01/07 21:04:23 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -32,7 +32,7 @@ void *
pg_dlopen(char *filename) pg_dlopen(char *filename)
{ {
#ifndef HAVE_DLD_H #ifndef HAVE_DLD_H
elog(ABORT, "dynamic load not supported"); elog(ERROR, "dynamic load not supported");
return (NULL); return (NULL);
#else #else
static int dl_initialized = 0; static int dl_initialized = 0;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.12 1998/01/07 15:32:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.13 1998/01/07 21:04:32 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -98,7 +98,7 @@ InsertRule(char *rulname,
eventrel = heap_openr(evobj); eventrel = heap_openr(evobj);
if (eventrel == NULL) if (eventrel == NULL)
{ {
elog(ABORT, "rules cannot be defined on relations not in schema"); elog(ERROR, "rules cannot be defined on relations not in schema");
} }
eventrel_oid = RelationGetRelationId(eventrel); eventrel_oid = RelationGetRelationId(eventrel);
@ -118,7 +118,7 @@ InsertRule(char *rulname,
evqual = "<>"; evqual = "<>";
if (IsDefinedRewriteRule(rulname)) if (IsDefinedRewriteRule(rulname))
elog(ABORT, "Attempt to insert rule '%s' failed: already exists", elog(ERROR, "Attempt to insert rule '%s' failed: already exists",
rulname); rulname);
strcpyq(actionbuf, actiontree); strcpyq(actionbuf, actiontree);
strcpyq(qualbuf, evqual); strcpyq(qualbuf, evqual);
@ -130,7 +130,7 @@ InsertRule(char *rulname,
if (strlen(template) + strlen(rulname) + strlen(actionbuf) + if (strlen(template) + strlen(rulname) + strlen(actionbuf) +
strlen(qualbuf) + 20 /* fudge fac */ > RULE_PLAN_SIZE) strlen(qualbuf) + 20 /* fudge fac */ > RULE_PLAN_SIZE)
{ {
elog(ABORT, "DefineQueryRewrite: rule plan string too big."); elog(ERROR, "DefineQueryRewrite: rule plan string too big.");
} }
sprintf(rulebuf, template, sprintf(rulebuf, template,
rulname, evtype, eventrel_oid, evslot_index, actionbuf, rulname, evtype, eventrel_oid, evslot_index, actionbuf,
@ -156,12 +156,12 @@ ValidateRule(int event_type,
if (((event_type == CMD_INSERT) || (event_type == CMD_DELETE)) && if (((event_type == CMD_INSERT) || (event_type == CMD_DELETE)) &&
eslot_string) eslot_string)
{ {
elog(ABORT, elog(ERROR,
"rules not allowed for insert or delete events to an attribute"); "rules not allowed for insert or delete events to an attribute");
} }
if (event_qual && !*action && is_instead) if (event_qual && !*action && is_instead)
elog(ABORT, elog(ERROR,
"event_quals on 'instead nothing' rules not currently supported"); "event_quals on 'instead nothing' rules not currently supported");
#if 0 #if 0
@ -211,7 +211,7 @@ DefineQueryRewrite(RuleStmt *stmt)
event_relation = heap_openr(event_obj->relname); event_relation = heap_openr(event_obj->relname);
if (event_relation == NULL) if (event_relation == NULL)
{ {
elog(ABORT, "virtual relations not supported yet"); elog(ERROR, "virtual relations not supported yet");
} }
ev_relid = RelationGetRelationId(event_relation); ev_relid = RelationGetRelationId(event_relation);
@ -265,7 +265,7 @@ DefineQueryRewrite(RuleStmt *stmt)
/* what is the max size of type text? XXX -- glass */ /* what is the max size of type text? XXX -- glass */
if (length(action) > 15) if (length(action) > 15)
elog(ABORT, "max # of actions exceeded"); elog(ERROR, "max # of actions exceeded");
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, prs2_addToRelation(ev_relid, ruleId, event_type, event_attno,
is_instead, event_qual, action); is_instead, event_qual, action);
} }

View File

@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.8 1998/01/05 03:32:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.9 1998/01/07 21:04:37 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -647,7 +647,7 @@ deepRewriteQuery(Query *parsetree)
if (++numQueryRewriteInvoked > REWRITE_INVOKE_MAX) if (++numQueryRewriteInvoked > REWRITE_INVOKE_MAX)
{ {
elog(ABORT, "query rewritten %d times, may contain cycles", elog(ERROR, "query rewritten %d times, may contain cycles",
numQueryRewriteInvoked - 1); numQueryRewriteInvoked - 1);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.8 1998/01/05 03:32:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.9 1998/01/07 21:04:41 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -39,13 +39,13 @@ RewriteGetRuleEventRel(char *rulename)
htp = SearchSysCacheTuple(REWRITENAME, PointerGetDatum(rulename), htp = SearchSysCacheTuple(REWRITENAME, PointerGetDatum(rulename),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(htp)) if (!HeapTupleIsValid(htp))
elog(ABORT, "RewriteGetRuleEventRel: rule \"%s\" not found", elog(ERROR, "RewriteGetRuleEventRel: rule \"%s\" not found",
rulename); rulename);
eventrel = ((Form_pg_rewrite) GETSTRUCT(htp))->ev_class; eventrel = ((Form_pg_rewrite) GETSTRUCT(htp))->ev_class;
htp = SearchSysCacheTuple(RELOID, PointerGetDatum(eventrel), htp = SearchSysCacheTuple(RELOID, PointerGetDatum(eventrel),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(htp)) if (!HeapTupleIsValid(htp))
elog(ABORT, "RewriteGetRuleEventRel: class %d not found", elog(ERROR, "RewriteGetRuleEventRel: class %d not found",
eventrel); eventrel);
return ((Form_pg_class) GETSTRUCT(htp))->relname.data; return ((Form_pg_class) GETSTRUCT(htp))->relname.data;
} }
@ -99,7 +99,7 @@ RemoveRewriteRule(char *ruleName)
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
heap_close(RewriteRelation); heap_close(RewriteRelation);
elog(ABORT, "No rule with name = '%s' was found.\n", ruleName); elog(ERROR, "No rule with name = '%s' was found.\n", ruleName);
} }
/* /*
@ -116,7 +116,7 @@ RemoveRewriteRule(char *ruleName)
if (isNull) if (isNull)
{ {
/* XXX strange!!! */ /* XXX strange!!! */
elog(ABORT, "RemoveRewriteRule: null event target relation!"); elog(ERROR, "RemoveRewriteRule: null event target relation!");
} }
eventRelationOid = DatumGetObjectId(eventRelationOidDatum); eventRelationOid = DatumGetObjectId(eventRelationOidDatum);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.13 1998/01/05 03:32:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.14 1998/01/07 21:04:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
ObjectIdGetDatum(ruleoid), ObjectIdGetDatum(ruleoid),
0, 0, 0); 0, 0, 0);
if (ruletuple == NULL) if (ruletuple == NULL)
elog(ABORT, "rule %u isn't in rewrite system relation", ruleoid); elog(ERROR, "rule %u isn't in rewrite system relation", ruleoid);
ruleaction = (char *)heap_getattr(ruletuple, ruleaction = (char *)heap_getattr(ruletuple,
InvalidBuffer, InvalidBuffer,
@ -72,7 +72,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
if (action_is_null || instead_is_null) if (action_is_null || instead_is_null)
{ {
elog(ABORT, "internal error: rewrite rule not properly set up"); elog(ERROR, "internal error: rewrite rule not properly set up");
} }
ruleaction = textout((struct varlena *) ruleaction); ruleaction = textout((struct varlena *) ruleaction);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.16 1998/01/05 03:32:51 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.17 1998/01/07 21:04:46 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -155,10 +155,10 @@ InitBufferPool(IPCKey key)
*/ */
if (sizeof(struct sbufdesc) != PADDED_SBUFDESC_SIZE || if (sizeof(struct sbufdesc) != PADDED_SBUFDESC_SIZE ||
sizeof(struct sbufdesc_unpadded) > PADDED_SBUFDESC_SIZE) sizeof(struct sbufdesc_unpadded) > PADDED_SBUFDESC_SIZE)
elog(ABORT, "Internal error: sbufdesc does not have the proper size, " elog(ERROR, "Internal error: sbufdesc does not have the proper size, "
"contact the Postgres developers"); "contact the Postgres developers");
if (sizeof(struct sbufdesc_unpadded) <= PADDED_SBUFDESC_SIZE / 2) if (sizeof(struct sbufdesc_unpadded) <= PADDED_SBUFDESC_SIZE / 2)
elog(ABORT, "Internal error: sbufdesc is greatly over-sized, " elog(ERROR, "Internal error: sbufdesc is greatly over-sized, "
"contact the Postgres developers"); "contact the Postgres developers");
Data_Descriptors = NBuffers; Data_Descriptors = NBuffers;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.9 1998/01/05 03:32:52 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.10 1998/01/07 21:04:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -87,7 +87,7 @@ BufTableLookup(BufferTag *tagPtr)
if (!result) if (!result)
{ {
elog(ABORT, "BufTableLookup: BufferLookup table corrupted"); elog(ERROR, "BufTableLookup: BufferLookup table corrupted");
return (NULL); return (NULL);
} }
if (!found) if (!found)
@ -122,7 +122,7 @@ BufTableDelete(BufferDesc *buf)
if (!(result && found)) if (!(result && found))
{ {
elog(ABORT, "BufTableDelete: BufferLookup table corrupted"); elog(ERROR, "BufTableDelete: BufferLookup table corrupted");
return (FALSE); return (FALSE);
} }
@ -145,14 +145,14 @@ BufTableInsert(BufferDesc *buf)
if (!result) if (!result)
{ {
Assert(0); Assert(0);
elog(ABORT, "BufTableInsert: BufferLookup table corrupted"); elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
return (FALSE); return (FALSE);
} }
/* found something else in the table ! */ /* found something else in the table ! */
if (found) if (found)
{ {
Assert(0); Assert(0);
elog(ABORT, "BufTableInsert: BufferLookup table corrupted"); elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
return (FALSE); return (FALSE);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.30 1998/01/05 03:32:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.31 1998/01/07 21:04:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -444,7 +444,7 @@ BufferAlloc(Relation reln,
/* /*
* But it can return buf == NULL if we are in aborting transaction * But it can return buf == NULL if we are in aborting transaction
* now and so elog(ABORT,...) in GetFreeBuffer will not abort * now and so elog(ERROR,...) in GetFreeBuffer will not abort
* again. * again.
*/ */
if (buf == NULL) if (buf == NULL)
@ -834,7 +834,7 @@ FlushBuffer(Buffer buffer, bool release)
if (status == SM_FAIL) if (status == SM_FAIL)
{ {
elog(ABORT, "FlushBuffer: cannot flush block %u of the relation %s", elog(ERROR, "FlushBuffer: cannot flush block %u of the relation %s",
bufHdr->tag.blockNum, bufHdr->sb_relname); bufHdr->tag.blockNum, bufHdr->sb_relname);
return (STATUS_ERROR); return (STATUS_ERROR);
} }
@ -1009,7 +1009,7 @@ BufferSync()
UnpinBuffer(bufHdr); UnpinBuffer(bufHdr);
if (bufHdr->flags & BM_IO_ERROR) if (bufHdr->flags & BM_IO_ERROR)
{ {
elog(ABORT, "BufferSync: write error %u for %s", elog(ERROR, "BufferSync: write error %u for %s",
bufHdr->tag.blockNum, bufHdr->sb_relname); bufHdr->tag.blockNum, bufHdr->sb_relname);
} }
if (reln != (Relation) NULL) if (reln != (Relation) NULL)
@ -1054,7 +1054,7 @@ BufferSync()
if (status == SM_FAIL) if (status == SM_FAIL)
{ {
bufHdr->flags |= BM_IO_ERROR; bufHdr->flags |= BM_IO_ERROR;
elog(ABORT, "BufferSync: cannot write %u for %s", elog(ERROR, "BufferSync: cannot write %u for %s",
bufHdr->tag.blockNum, bufHdr->sb_relname); bufHdr->tag.blockNum, bufHdr->sb_relname);
} }
BufferFlushCount++; BufferFlushCount++;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.8 1998/01/05 03:32:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.9 1998/01/07 21:04:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -189,7 +189,7 @@ GetFreeBuffer()
{ {
/* queue is empty. All buffers in the buffer pool are pinned. */ /* queue is empty. All buffers in the buffer pool are pinned. */
elog(ABORT, "out of free buffers: time to abort !\n"); elog(ERROR, "out of free buffers: time to abort !\n");
return (NULL); return (NULL);
} }
buf = &(BufferDescriptors[SharedFreeList->freeNext]); buf = &(BufferDescriptors[SharedFreeList->freeNext]);

View File

@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.15 1998/01/05 03:32:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.16 1998/01/07 21:04:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -110,7 +110,7 @@ LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
} }
} }
if (bufHdr == NULL) if (bufHdr == NULL)
elog(ABORT, "no empty local buffer."); elog(ERROR, "no empty local buffer.");
/* /*
* this buffer is not referenced but it might still be dirty (the last * this buffer is not referenced but it might still be dirty (the last

View File

@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: fd.c,v 1.28 1998/01/05 03:33:00 momjian Exp $ * $Id: fd.c,v 1.29 1998/01/07 21:04:58 momjian Exp $
* *
* NOTES: * NOTES:
* *
@ -586,7 +586,7 @@ tryAgain:
if (fileName == NULL) if (fileName == NULL)
{ {
elog(ABORT, "fileNameOpenFile: NULL fname"); elog(ERROR, "fileNameOpenFile: NULL fname");
} }
vfdP->fileName = malloc(strlen(fileName) + 1); vfdP->fileName = malloc(strlen(fileName) + 1);
strcpy(vfdP->fileName, fileName); strcpy(vfdP->fileName, fileName);
@ -763,7 +763,7 @@ FileSeek(File file, long offset, int whence)
lseek(VfdCache[file].fd, offset, whence); lseek(VfdCache[file].fd, offset, whence);
return returnCode; return returnCode;
default: default:
elog(ABORT, "FileSeek: invalid whence: %d", whence); elog(ERROR, "FileSeek: invalid whence: %d", whence);
break; break;
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.17 1998/01/05 03:33:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.18 1998/01/07 21:05:03 momjian Exp $
* *
* NOTES * NOTES
* *
@ -89,7 +89,7 @@ PrivateMemoryCreate(IpcMemoryKey memKey,
IpcPrivateMem[memid].id = memid; IpcPrivateMem[memid].id = memid;
IpcPrivateMem[memid].memptr = malloc(size); IpcPrivateMem[memid].memptr = malloc(size);
if (IpcPrivateMem[memid].memptr == NULL) if (IpcPrivateMem[memid].memptr == NULL)
elog(ABORT, "PrivateMemoryCreate: not enough memory to malloc"); elog(ERROR, "PrivateMemoryCreate: not enough memory to malloc");
MemSet(IpcPrivateMem[memid].memptr, 0, size); /* XXX PURIFY */ MemSet(IpcPrivateMem[memid].memptr, 0, size); /* XXX PURIFY */
return (memid++); return (memid++);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.15 1998/01/05 03:33:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.16 1998/01/07 21:05:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -418,7 +418,7 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
{ {
SpinRelease(BindingLock); SpinRelease(BindingLock);
elog(ABORT, "ShmemInitPID: BindingTable corrupted"); elog(ERROR, "ShmemInitPID: BindingTable corrupted");
return (FALSE); return (FALSE);
} }
@ -469,7 +469,7 @@ ShmemPIDDestroy(int pid)
if (!result) if (!result)
{ {
elog(ABORT, "ShmemPIDDestroy: PID table corrupted"); elog(ERROR, "ShmemPIDDestroy: PID table corrupted");
return (INVALID_OFFSET); return (INVALID_OFFSET);
} }
@ -555,7 +555,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
SpinRelease(BindingLock); SpinRelease(BindingLock);
elog(ABORT, "ShmemInitStruct: Binding Table corrupted"); elog(ERROR, "ShmemInitStruct: Binding Table corrupted");
return (NULL); return (NULL);
} }
@ -640,6 +640,6 @@ TransactionIdIsInProgress(TransactionId xid)
} }
SpinRelease(BindingLock); SpinRelease(BindingLock);
elog(ABORT, "TransactionIdIsInProgress: BindingTable corrupted"); elog(ERROR, "TransactionIdIsInProgress: BindingTable corrupted");
return (false); return (false);
} }

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.25 1998/01/05 03:33:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.26 1998/01/07 21:05:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -111,14 +111,14 @@ inv_create(int flags)
if (SearchSysCacheTuple(RELNAME, PointerGetDatum(objname), if (SearchSysCacheTuple(RELNAME, PointerGetDatum(objname),
0, 0, 0) != NULL) 0, 0, 0) != NULL)
{ {
elog(ABORT, elog(ERROR,
"internal error: %s already exists -- cannot create large obj", "internal error: %s already exists -- cannot create large obj",
objname); objname);
} }
if (SearchSysCacheTuple(RELNAME, PointerGetDatum(indname), if (SearchSysCacheTuple(RELNAME, PointerGetDatum(indname),
0, 0, 0) != NULL) 0, 0, 0) != NULL)
{ {
elog(ABORT, elog(ERROR,
"internal error: %s already exists -- cannot create large obj", "internal error: %s already exists -- cannot create large obj",
indname); indname);
} }
@ -147,7 +147,7 @@ inv_create(int flags)
if (!RelationIsValid(r)) if (!RelationIsValid(r))
{ {
elog(ABORT, "cannot create large object on %s under inversion", elog(ERROR, "cannot create large object on %s under inversion",
smgrout(DEFAULT_SMGR)); smgrout(DEFAULT_SMGR));
} }
@ -172,7 +172,7 @@ inv_create(int flags)
if (!RelationIsValid(indr)) if (!RelationIsValid(indr))
{ {
elog(ABORT, "cannot create index for large obj on %s under inversion", elog(ERROR, "cannot create index for large obj on %s under inversion",
smgrout(DEFAULT_SMGR)); smgrout(DEFAULT_SMGR));
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.10 1998/01/05 03:33:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.11 1998/01/07 21:05:28 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -434,7 +434,7 @@ RelationUnsetLockForRead(Relation relation)
*/ */
if (!LockInfoIsValid(linfo)) if (!LockInfoIsValid(linfo))
{ {
elog(ABORT, elog(ERROR,
"Releasing a lock on %s with invalid lock information", "Releasing a lock on %s with invalid lock information",
RelationGetRelationName(relation)); RelationGetRelationName(relation));
} }
@ -527,7 +527,7 @@ RelationUnsetLockForWrite(Relation relation)
if (!LockInfoIsValid(linfo)) if (!LockInfoIsValid(linfo))
{ {
elog(ABORT, elog(ERROR,
"Releasing a lock on %s with invalid lock information", "Releasing a lock on %s with invalid lock information",
RelationGetRelationName(relation)); RelationGetRelationName(relation));
} }
@ -769,7 +769,7 @@ RelationUnsetSingleWLockPage(Relation relation,
return; return;
if (!LockInfoIsValid(relation->lockInfo)) if (!LockInfoIsValid(relation->lockInfo))
elog(ABORT, elog(ERROR,
"Releasing a lock on %s with invalid lock information", "Releasing a lock on %s with invalid lock information",
RelationGetRelationName(relation)); RelationGetRelationName(relation));
@ -816,7 +816,7 @@ RelationUnsetSingleRLockPage(Relation relation,
return; return;
if (!LockInfoIsValid(relation->lockInfo)) if (!LockInfoIsValid(relation->lockInfo))
elog(ABORT, elog(ERROR,
"Releasing a lock on %s with invalid lock information", "Releasing a lock on %s with invalid lock information",
RelationGetRelationName(relation)); RelationGetRelationName(relation));

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.17 1998/01/05 03:33:22 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.18 1998/01/07 21:05:32 momjian Exp $
* *
* NOTES * NOTES
* Outside modules can create a lock table and acquire/release * Outside modules can create a lock table and acquire/release
@ -802,7 +802,7 @@ WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
lock->holders[lockt]--; lock->holders[lockt]--;
LOCK_DUMP_AUX("WaitOnLock: aborting on lock", lock, lockt); LOCK_DUMP_AUX("WaitOnLock: aborting on lock", lock, lockt);
SpinRelease(ltable->ctl->masterLock); SpinRelease(ltable->ctl->masterLock);
elog(ABORT, "WaitOnLock: error on wakeup - Aborting this transaction"); elog(ERROR, "WaitOnLock: error on wakeup - Aborting this transaction");
} }
LOCK_DUMP_AUX("WaitOnLock: wakeup on lock", lock, lockt); LOCK_DUMP_AUX("WaitOnLock: wakeup on lock", lock, lockt);
@ -887,7 +887,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
#endif #endif
/* /*
* let the caller print its own error message, too. Do not elog(ABORT). * let the caller print its own error message, too. Do not elog(ERROR).
*/ */
if (!lock) if (!lock)
{ {

View File

@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.9 1998/01/05 03:33:25 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.10 1998/01/07 21:05:35 momjian Exp $
* *
* NOTES: * NOTES:
* (1) The lock.c module assumes that the caller here is doing * (1) The lock.c module assumes that the caller here is doing
@ -100,14 +100,14 @@ InitMultiLevelLockm()
MultiTableId = tableId; MultiTableId = tableId;
if (!(MultiTableId)) if (!(MultiTableId))
{ {
elog(ABORT, "InitMultiLockm: couldnt initialize lock table"); elog(ERROR, "InitMultiLockm: couldnt initialize lock table");
} }
/* ----------------------- /* -----------------------
* No short term lock table for now. -Jeff 15 July 1991 * No short term lock table for now. -Jeff 15 July 1991
* *
* ShortTermTableId = LockTabRename(tableId); * ShortTermTableId = LockTabRename(tableId);
* if (! (ShortTermTableId)) { * if (! (ShortTermTableId)) {
* elog(ABORT,"InitMultiLockm: couldnt rename lock table"); * elog(ERROR,"InitMultiLockm: couldnt rename lock table");
* } * }
* ----------------------- * -----------------------
*/ */
@ -237,7 +237,7 @@ MultiAcquire(LockTableId tableId,
locks[2] = lockt; locks[2] = lockt;
break; break;
default: default:
elog(ABORT, "MultiAcquire: bad lock level"); elog(ERROR, "MultiAcquire: bad lock level");
return (FALSE); return (FALSE);
} }
@ -390,7 +390,7 @@ MultiRelease(LockTableId tableId,
locks[2] = lockt; locks[2] = lockt;
break; break;
default: default:
elog(ABORT, "MultiRelease: bad lockt"); elog(ERROR, "MultiRelease: bad lockt");
} }
/* /*
@ -435,7 +435,7 @@ MultiRelease(LockTableId tableId,
status = LockRelease(tableId, tmpTag, locks[i]); status = LockRelease(tableId, tmpTag, locks[i]);
if (!status) if (!status)
{ {
elog(ABORT, "MultiRelease: couldn't release after error"); elog(ERROR, "MultiRelease: couldn't release after error");
} }
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.24 1998/01/05 03:33:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.25 1998/01/07 21:05:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore * This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95 * sets run out pretty fast.) -ay 4/95
* *
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.24 1998/01/05 03:33:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.25 1998/01/07 21:05:36 momjian Exp $
*/ */
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
@ -163,13 +163,13 @@ InitProcess(IPCKey key)
if (!found) if (!found)
{ {
/* this should not happen. InitProcGlobal() is called before this. */ /* this should not happen. InitProcGlobal() is called before this. */
elog(ABORT, "InitProcess: Proc Header uninitialized"); elog(ERROR, "InitProcess: Proc Header uninitialized");
} }
if (MyProc != NULL) if (MyProc != NULL)
{ {
SpinRelease(ProcStructLock); SpinRelease(ProcStructLock);
elog(ABORT, "ProcInit: you already exist"); elog(ERROR, "ProcInit: you already exist");
return; return;
} }
@ -803,7 +803,7 @@ ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum)
} }
/* if we reach here, all the semaphores are in use. */ /* if we reach here, all the semaphores are in use. */
elog(ABORT, "InitProc: cannot allocate a free semaphore"); elog(ERROR, "InitProc: cannot allocate a free semaphore");
} }
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.12 1998/01/05 03:33:29 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.13 1998/01/07 21:05:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -134,7 +134,7 @@ PageAddItem(Page page,
if (((*itemId).lp_flags & LP_USED) || if (((*itemId).lp_flags & LP_USED) ||
((*itemId).lp_len != 0)) ((*itemId).lp_len != 0))
{ {
elog(ABORT, "PageAddItem: tried overwrite of used ItemId"); elog(ERROR, "PageAddItem: tried overwrite of used ItemId");
return (InvalidOffsetNumber); return (InvalidOffsetNumber);
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.25 1998/01/05 03:33:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.26 1998/01/07 21:05:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -568,7 +568,7 @@ mdnblocks(Relation reln)
{ {
v->mdfd_chain = _mdfd_openseg(reln, segno, O_CREAT); v->mdfd_chain = _mdfd_openseg(reln, segno, O_CREAT);
if (v->mdfd_chain == (MdfdVec *) NULL) if (v->mdfd_chain == (MdfdVec *) NULL)
elog(ABORT, "cannot count blocks for %.16s -- open failed", elog(ERROR, "cannot count blocks for %.16s -- open failed",
RelationGetRelationName(reln)); RelationGetRelationName(reln));
} }
@ -808,7 +808,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
if (fd < 0) if (fd < 0)
{ {
if ((fd = mdopen(reln)) < 0) if ((fd = mdopen(reln)) < 0)
elog(ABORT, "cannot open relation %.16s", elog(ERROR, "cannot open relation %.16s",
RelationGetRelationName(reln)); RelationGetRelationName(reln));
reln->rd_fd = fd; reln->rd_fd = fd;
} }
@ -823,7 +823,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
v->mdfd_chain = _mdfd_openseg(reln, i, oflag); v->mdfd_chain = _mdfd_openseg(reln, i, oflag);
if (v->mdfd_chain == (MdfdVec *) NULL) if (v->mdfd_chain == (MdfdVec *) NULL)
elog(ABORT, "cannot open segment %d of relation %.16s", elog(ERROR, "cannot open segment %d of relation %.16s",
i, RelationGetRelationName(reln)); i, RelationGetRelationName(reln));
} }
v = v->mdfd_chain; v = v->mdfd_chain;

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.12 1998/01/05 03:33:33 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.13 1998/01/07 21:05:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -132,7 +132,7 @@ smgrcreate(int16 which, Relation reln)
int fd; int fd;
if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0) if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0)
elog(ABORT, "cannot open %s", elog(ERROR, "cannot open %s",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (fd); return (fd);
@ -149,7 +149,7 @@ smgrunlink(int16 which, Relation reln)
int status; int status;
if ((status = (*(smgrsw[which].smgr_unlink)) (reln)) == SM_FAIL) if ((status = (*(smgrsw[which].smgr_unlink)) (reln)) == SM_FAIL)
elog(ABORT, "cannot unlink %s", elog(ERROR, "cannot unlink %s",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (status); return (status);
@ -169,7 +169,7 @@ smgrextend(int16 which, Relation reln, char *buffer)
status = (*(smgrsw[which].smgr_extend)) (reln, buffer); status = (*(smgrsw[which].smgr_extend)) (reln, buffer);
if (status == SM_FAIL) if (status == SM_FAIL)
elog(ABORT, "%s: cannot extend", elog(ERROR, "%s: cannot extend",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (status); return (status);
@ -187,7 +187,7 @@ smgropen(int16 which, Relation reln)
int fd; int fd;
if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0) if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
elog(ABORT, "cannot open %s", elog(ERROR, "cannot open %s",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (fd); return (fd);
@ -209,7 +209,7 @@ int
smgrclose(int16 which, Relation reln) smgrclose(int16 which, Relation reln)
{ {
if ((*(smgrsw[which].smgr_close)) (reln) == SM_FAIL) if ((*(smgrsw[which].smgr_close)) (reln) == SM_FAIL)
elog(ABORT, "cannot close %s", elog(ERROR, "cannot close %s",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (SM_SUCCESS); return (SM_SUCCESS);
@ -233,7 +233,7 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status = (*(smgrsw[which].smgr_read)) (reln, blocknum, buffer); status = (*(smgrsw[which].smgr_read)) (reln, blocknum, buffer);
if (status == SM_FAIL) if (status == SM_FAIL)
elog(ABORT, "cannot read block %d of %s", elog(ERROR, "cannot read block %d of %s",
blocknum, &(reln->rd_rel->relname.data[0])); blocknum, &(reln->rd_rel->relname.data[0]));
return (status); return (status);
@ -255,7 +255,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status = (*(smgrsw[which].smgr_write)) (reln, blocknum, buffer); status = (*(smgrsw[which].smgr_write)) (reln, blocknum, buffer);
if (status == SM_FAIL) if (status == SM_FAIL)
elog(ABORT, "cannot write block %d of %s", elog(ERROR, "cannot write block %d of %s",
blocknum, &(reln->rd_rel->relname.data[0])); blocknum, &(reln->rd_rel->relname.data[0]));
return (status); return (status);
@ -272,7 +272,7 @@ smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status = (*(smgrsw[which].smgr_flush)) (reln, blocknum, buffer); status = (*(smgrsw[which].smgr_flush)) (reln, blocknum, buffer);
if (status == SM_FAIL) if (status == SM_FAIL)
elog(ABORT, "cannot flush block %d of %s to stable store", elog(ERROR, "cannot flush block %d of %s to stable store",
blocknum, &(reln->rd_rel->relname.data[0])); blocknum, &(reln->rd_rel->relname.data[0]));
return (status); return (status);
@ -310,7 +310,7 @@ smgrblindwrt(int16 which,
blkno, buffer); blkno, buffer);
if (status == SM_FAIL) if (status == SM_FAIL)
elog(ABORT, "cannot write block %d of %s [%s] blind", elog(ERROR, "cannot write block %d of %s [%s] blind",
blkno, relstr, dbstr); blkno, relstr, dbstr);
pfree(dbstr); pfree(dbstr);
@ -332,7 +332,7 @@ smgrnblocks(int16 which, Relation reln)
int nblocks; int nblocks;
if ((nblocks = (*(smgrsw[which].smgr_nblocks)) (reln)) < 0) if ((nblocks = (*(smgrsw[which].smgr_nblocks)) (reln)) < 0)
elog(ABORT, "cannot count blocks for %s", elog(ERROR, "cannot count blocks for %s",
&(reln->rd_rel->relname.data[0])); &(reln->rd_rel->relname.data[0]));
return (nblocks); return (nblocks);
@ -354,7 +354,7 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
if (smgrsw[which].smgr_truncate) if (smgrsw[which].smgr_truncate)
{ {
if ((newblks = (*(smgrsw[which].smgr_truncate)) (reln, nblocks)) < 0) if ((newblks = (*(smgrsw[which].smgr_truncate)) (reln, nblocks)) < 0)
elog(ABORT, "cannot truncate %s to %d blocks", elog(ERROR, "cannot truncate %s to %d blocks",
&(reln->rd_rel->relname.data[0]), nblocks); &(reln->rd_rel->relname.data[0]), nblocks);
} }
@ -406,7 +406,7 @@ bool
smgriswo(int16 smgrno) smgriswo(int16 smgrno)
{ {
if (smgrno < 0 || smgrno >= NSmgr) if (smgrno < 0 || smgrno >= NSmgr)
elog(ABORT, "illegal storage manager number %d", smgrno); elog(ERROR, "illegal storage manager number %d", smgrno);
return (smgrwo[smgrno]); return (smgrwo[smgrno]);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.6 1998/01/05 03:33:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.7 1998/01/07 21:05:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -49,7 +49,7 @@ smgrin(char *s)
if (strcmp(s, StorageManager[i].smgr_name) == 0) if (strcmp(s, StorageManager[i].smgr_name) == 0)
return ((int2) i); return ((int2) i);
} }
elog(ABORT, "smgrin: illegal storage manager name %s", s); elog(ERROR, "smgrin: illegal storage manager name %s", s);
return 0; return 0;
} }
@ -59,7 +59,7 @@ smgrout(int2 i)
char *s; char *s;
if (i >= NStorageManagers || i < 0) if (i >= NStorageManagers || i < 0)
elog(ABORT, "Illegal storage manager id %d", i); elog(ERROR, "Illegal storage manager id %d", i);
s = (char *) palloc(strlen(StorageManager[i].smgr_name) + 1); s = (char *) palloc(strlen(StorageManager[i].smgr_name) + 1);
strcpy(s, StorageManager[i].smgr_name); strcpy(s, StorageManager[i].smgr_name);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.9 1998/01/05 03:33:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.10 1998/01/07 21:05:54 momjian Exp $
* *
* NOTES * NOTES
* This cruft is the server side of PQfn. * This cruft is the server side of PQfn.
@ -199,7 +199,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
* Since the validity of this structure is determined by whether the * Since the validity of this structure is determined by whether the
* funcid is OK, we clear the funcid here. It must not be set to the * funcid is OK, we clear the funcid here. It must not be set to the
* correct value until we are about to return with a good struct * correct value until we are about to return with a good struct
* fp_info, since we can be interrupted (i.e., with an elog(ABORT, * fp_info, since we can be interrupted (i.e., with an elog(ERROR,
* ...)) at any time. * ...)) at any time.
*/ */
MemSet((char *) fip, 0, (int) sizeof(struct fp_info)); MemSet((char *) fip, 0, (int) sizeof(struct fp_info));
@ -209,7 +209,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(func_htp)) if (!HeapTupleIsValid(func_htp))
{ {
elog(ABORT, "update_fp_info: cache lookup for function %d failed", elog(ERROR, "update_fp_info: cache lookup for function %d failed",
func_id); func_id);
} }
pp = (Form_pg_proc) GETSTRUCT(func_htp); pp = (Form_pg_proc) GETSTRUCT(func_htp);
@ -226,7 +226,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_htp)) if (!HeapTupleIsValid(type_htp))
{ {
elog(ABORT, "update_fp_info: bad argument type %d for %d", elog(ERROR, "update_fp_info: bad argument type %d for %d",
argtypes[i], func_id); argtypes[i], func_id);
} }
tp = (TypeTupleForm) GETSTRUCT(type_htp); tp = (TypeTupleForm) GETSTRUCT(type_htp);
@ -241,7 +241,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_htp)) if (!HeapTupleIsValid(type_htp))
{ {
elog(ABORT, "update_fp_info: bad return type %d for %d", elog(ERROR, "update_fp_info: bad return type %d for %d",
rettype, func_id); rettype, func_id);
} }
tp = (TypeTupleForm) GETSTRUCT(type_htp); tp = (TypeTupleForm) GETSTRUCT(type_htp);
@ -267,7 +267,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
* *
* RETURNS: * RETURNS:
* nothing of significance. * nothing of significance.
* All errors result in elog(ABORT,...). * All errors result in elog(ERROR,...).
*/ */
int int
HandleFunctionRequest() HandleFunctionRequest()
@ -297,7 +297,7 @@ HandleFunctionRequest()
if (fip->nargs != nargs) if (fip->nargs != nargs)
{ {
elog(ABORT, "HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)", elog(ERROR, "HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)",
nargs, fip->nargs); nargs, fip->nargs);
} }
@ -328,7 +328,7 @@ HandleFunctionRequest()
{ /* ... varlena */ { /* ... varlena */
if (!(p = palloc(argsize + VARHDRSZ))) if (!(p = palloc(argsize + VARHDRSZ)))
{ {
elog(ABORT, "HandleFunctionRequest: palloc failed"); elog(ERROR, "HandleFunctionRequest: palloc failed");
} }
VARSIZE(p) = argsize + VARHDRSZ; VARSIZE(p) = argsize + VARHDRSZ;
pq_getnchar(VARDATA(p), 0, argsize); pq_getnchar(VARDATA(p), 0, argsize);
@ -338,7 +338,7 @@ HandleFunctionRequest()
/* XXX cross our fingers and trust "argsize" */ /* XXX cross our fingers and trust "argsize" */
if (!(p = palloc(argsize))) if (!(p = palloc(argsize)))
{ {
elog(ABORT, "HandleFunctionRequest: palloc failed"); elog(ERROR, "HandleFunctionRequest: palloc failed");
} }
pq_getnchar(p, 0, argsize); pq_getnchar(p, 0, argsize);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.58 1998/01/05 03:33:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.59 1998/01/07 21:06:00 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
@ -125,7 +125,7 @@ jmp_buf Warn_restart;
sigjmp_buf Warn_restart; sigjmp_buf Warn_restart;
#endif /* defined(nextstep) */ #endif /* defined(nextstep) */
int InErrorOrAbort; int InError;
extern int NBuffers; extern int NBuffers;
@ -728,7 +728,7 @@ pg_exec_query_dest(char *query_string,/* string to execute */
* signal handler routines used in PostgresMain() * signal handler routines used in PostgresMain()
* *
* handle_warn() is used to catch kill(getpid(),1) which * handle_warn() is used to catch kill(getpid(),1) which
* occurs when elog(ABORT) is called. * occurs when elog(ERROR) is called.
* *
* quickdie() occurs when signalled by the postmaster. * quickdie() occurs when signalled by the postmaster.
* Some backend has bought the farm, * Some backend has bought the farm,
@ -774,7 +774,7 @@ die(SIGNAL_ARGS)
static void static void
FloatExceptionHandler(SIGNAL_ARGS) FloatExceptionHandler(SIGNAL_ARGS)
{ {
elog(ABORT, "floating point exception!" elog(ERROR, "floating point exception!"
" The last floating point operation either exceeded legal ranges" " The last floating point operation either exceeded legal ranges"
" or was a divide by zero"); " or was a divide by zero");
} }
@ -1343,7 +1343,7 @@ PostgresMain(int argc, char *argv[])
* so that the slaves signal the master to abort the transaction * so that the slaves signal the master to abort the transaction
* rather than calling AbortCurrentTransaction() themselves. * rather than calling AbortCurrentTransaction() themselves.
* *
* Note: elog(ABORT) causes a kill(getpid(),1) to occur sending * Note: elog(ERROR) causes a kill(getpid(),1) to occur sending
* us back here. * us back here.
* ---------------- * ----------------
*/ */
@ -1352,7 +1352,7 @@ PostgresMain(int argc, char *argv[])
if (sigsetjmp(Warn_restart, 1) != 0) if (sigsetjmp(Warn_restart, 1) != 0)
{ {
InErrorOrAbort = 1; InError = 1;
time(&tim); time(&tim);
@ -1363,7 +1363,7 @@ PostgresMain(int argc, char *argv[])
AbortCurrentTransaction(); AbortCurrentTransaction();
} }
InErrorOrAbort = 0; InError = 0;
/* ---------------- /* ----------------
* POSTGRES main processing loop begins here * POSTGRES main processing loop begins here
@ -1372,7 +1372,7 @@ PostgresMain(int argc, char *argv[])
if (IsUnderPostmaster == false) if (IsUnderPostmaster == false)
{ {
puts("\nPOSTGRES backend interactive interface"); puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.58 $ $Date: 1998/01/05 03:33:46 $"); puts("$Revision: 1.59 $ $Date: 1998/01/07 21:06:00 $");
} }
/* ---------------- /* ----------------
@ -1565,7 +1565,7 @@ PostgresMain(int argc, char *argv[])
break; break;
default: default:
elog(ABORT, "unknown frontend message was recieved"); elog(ERROR, "unknown frontend message was recieved");
} }
/* ---------------- /* ----------------

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.12 1998/01/05 03:33:48 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.13 1998/01/07 21:06:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -166,7 +166,7 @@ ProcessPortal(char *portalName,
*/ */
if (PortalNameIsSpecial(portalName)) if (PortalNameIsSpecial(portalName))
elog(ABORT, elog(ERROR,
"The portal name %s is reserved for internal use", "The portal name %s is reserved for internal use",
portalName); portalName);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.19 1998/01/05 03:34:22 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.20 1998/01/07 21:06:08 momjian Exp $
* *
* Notes: * Notes:
* XXX This needs to use exception.h to handle recovery when * XXX This needs to use exception.h to handle recovery when
@ -568,7 +568,7 @@ ResetSystemCache()
CACHE1_elog(DEBUG, "ResetSystemCache called"); CACHE1_elog(DEBUG, "ResetSystemCache called");
if (DisableCache) if (DisableCache)
{ {
elog(ABORT, "ResetSystemCache: Called while cache disabled"); elog(ERROR, "ResetSystemCache: Called while cache disabled");
return; return;
} }
@ -605,7 +605,7 @@ ResetSystemCache()
nextelt = DLGetSucc(elt); nextelt = DLGetSucc(elt);
CatCacheRemoveCTup(cache, elt); CatCacheRemoveCTup(cache, elt);
if (cache->cc_ntup == -1) if (cache->cc_ntup == -1)
elog(ABORT, "ResetSystemCache: cc_ntup<0 (software error)"); elog(ERROR, "ResetSystemCache: cc_ntup<0 (software error)");
} }
} }
cache->cc_ntup = 0; /* in case of WARN error above */ cache->cc_ntup = 0; /* in case of WARN error above */
@ -892,7 +892,7 @@ SearchSysCache(struct catcache * cache,
if (DisableCache) if (DisableCache)
{ {
elog(ABORT, "SearchSysCache: Called while cache disabled"); elog(ERROR, "SearchSysCache: Called while cache disabled");
return ((HeapTuple) NULL); return ((HeapTuple) NULL);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.8 1998/01/05 03:34:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.9 1998/01/07 21:06:11 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -71,7 +71,7 @@ GetDynamicFuncArgType(Var *arg, ExprContext *econtext)
tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(relname), tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(relname),
0, 0, 0); 0, 0, 0);
if (!tup) if (!tup)
elog(ABORT, "Lookup failed on type tuple for class %s", elog(ERROR, "Lookup failed on type tuple for class %s",
relname); relname);
return tup->t_oid; return tup->t_oid;
@ -100,14 +100,14 @@ init_fcache(Oid foid,
retval = (FunctionCachePtr) palloc(sizeof(FunctionCache)); retval = (FunctionCachePtr) palloc(sizeof(FunctionCache));
if (!use_syscache) if (!use_syscache)
elog(ABORT, "what the ????, init the fcache without the catalogs?"); elog(ERROR, "what the ????, init the fcache without the catalogs?");
procedureTuple = SearchSysCacheTuple(PROOID, procedureTuple = SearchSysCacheTuple(PROOID,
ObjectIdGetDatum(foid), ObjectIdGetDatum(foid),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(procedureTuple)) if (!HeapTupleIsValid(procedureTuple))
elog(ABORT, elog(ERROR,
"init_fcache: %s %d", "init_fcache: %s %d",
"Cache lookup failed for procedure", foid); "Cache lookup failed for procedure", foid);
@ -128,7 +128,7 @@ init_fcache(Oid foid,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(typeTuple)) if (!HeapTupleIsValid(typeTuple))
elog(ABORT, elog(ERROR,
"init_fcache: %s %d", "init_fcache: %s %d",
"Cache lookup failed for type", "Cache lookup failed for type",
(procedureStruct)->prorettype); (procedureStruct)->prorettype);
@ -311,6 +311,6 @@ setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext)
} }
else else
{ {
elog(ABORT, "init_fcache: node must be Oper or Func!"); elog(ERROR, "init_fcache: node must be Oper or Func!");
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.8 1998/01/05 03:34:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.9 1998/01/07 21:06:12 momjian Exp $
* *
* NOTES * NOTES
* Eventually, the index information should go through here, too. * Eventually, the index information should go through here, too.
@ -148,7 +148,7 @@ get_attisset(Oid relid, char *attname)
PointerGetDatum(attname), PointerGetDatum(attname),
0, 0); 0, 0);
if (!HeapTupleIsValid(htup)) if (!HeapTupleIsValid(htup))
elog(ABORT, "get_attisset: no attribute %s in relation %d", elog(ERROR, "get_attisset: no attribute %s in relation %d",
attname, relid); attname, relid);
if (heap_attisnull(htup, attno)) if (heap_attisnull(htup, attno))
return (false); return (false);
@ -203,7 +203,7 @@ get_opname(Oid opno)
return (pstrdup(optup.oprname.data)); return (pstrdup(optup.oprname.data));
else else
{ {
elog(ABORT, "can't look up operator %d\n", opno); elog(ERROR, "can't look up operator %d\n", opno);
return NULL; return NULL;
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.31 1998/01/05 03:34:29 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.32 1998/01/07 21:06:13 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -371,7 +371,7 @@ scan_pg_rel_seq(RelationBuildDescInfo buildinfo)
break; break;
default: default:
elog(ABORT, "ScanPgRelation: bad buildinfo"); elog(ERROR, "ScanPgRelation: bad buildinfo");
return NULL; return NULL;
} }
@ -441,7 +441,7 @@ scan_pg_rel_ind(RelationBuildDescInfo buildinfo)
break; break;
default: default:
elog(ABORT, "ScanPgRelation: bad buildinfo"); elog(ERROR, "ScanPgRelation: bad buildinfo");
/* /*
* XXX I hope this is right. It seems better than returning * XXX I hope this is right. It seems better than returning
@ -583,7 +583,7 @@ build_tupdesc_seq(RelationBuildDescInfo buildinfo,
} }
if (need > 0) if (need > 0)
elog(ABORT, "catalog is missing %d attribute%s for relid %d", elog(ERROR, "catalog is missing %d attribute%s for relid %d",
need, (need == 1 ? "" : "s"), relation->rd_id); need, (need == 1 ? "" : "s"), relation->rd_id);
/* ---------------- /* ----------------
@ -617,7 +617,7 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
atttup = (HeapTuple) AttributeNumIndexScan(attrel, relation->rd_id, i); atttup = (HeapTuple) AttributeNumIndexScan(attrel, relation->rd_id, i);
if (!HeapTupleIsValid(atttup)) if (!HeapTupleIsValid(atttup))
elog(ABORT, "cannot find attribute %d of relation %.*s", i, elog(ERROR, "cannot find attribute %d of relation %.*s", i,
NAMEDATALEN, &(relation->rd_rel->relname.data[0])); NAMEDATALEN, &(relation->rd_rel->relname.data[0]));
attp = (AttributeTupleForm) GETSTRUCT(atttup); attp = (AttributeTupleForm) GETSTRUCT(atttup);
@ -1738,7 +1738,7 @@ AttrDefaultFetch(Relation relation)
if (adform->adnum != attrdef[i].adnum) if (adform->adnum != attrdef[i].adnum)
continue; continue;
if (attrdef[i].adsrc != NULL) if (attrdef[i].adsrc != NULL)
elog(ABORT, "AttrDefaultFetch: second record found for attr %.*s in rel %.*s", elog(ERROR, "AttrDefaultFetch: second record found for attr %.*s in rel %.*s",
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
@ -1746,7 +1746,7 @@ AttrDefaultFetch(Relation relation)
Anum_pg_attrdef_adbin, Anum_pg_attrdef_adbin,
adrel->rd_att, &isnull); adrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(ABORT, "AttrDefaultFetch: adbin IS NULL for attr %.*s in rel %.*s", elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %.*s in rel %.*s",
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
attrdef[i].adbin = textout(val); attrdef[i].adbin = textout(val);
@ -1754,7 +1754,7 @@ AttrDefaultFetch(Relation relation)
Anum_pg_attrdef_adsrc, Anum_pg_attrdef_adsrc,
adrel->rd_att, &isnull); adrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(ABORT, "AttrDefaultFetch: adsrc IS NULL for attr %.*s in rel %.*s", elog(ERROR, "AttrDefaultFetch: adsrc IS NULL for attr %.*s in rel %.*s",
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
attrdef[i].adsrc = textout(val); attrdef[i].adsrc = textout(val);
@ -1762,14 +1762,14 @@ AttrDefaultFetch(Relation relation)
} }
if (i >= ndef) if (i >= ndef)
elog(ABORT, "AttrDefaultFetch: unexpected record found for attr %d in rel %.*s", elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %.*s",
adform->adnum, adform->adnum,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
ReleaseBuffer(buffer); ReleaseBuffer(buffer);
} }
if (found < ndef) if (found < ndef)
elog(ABORT, "AttrDefaultFetch: %d record not found for rel %.*s", elog(ERROR, "AttrDefaultFetch: %d record not found for rel %.*s",
ndef - found, ndef - found,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
@ -1821,28 +1821,28 @@ RelCheckFetch(Relation relation)
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
continue; continue;
if (found == ncheck) if (found == ncheck)
elog(ABORT, "RelCheckFetch: unexpected record found for rel %.*s", elog(ERROR, "RelCheckFetch: unexpected record found for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
rcname = (Name) fastgetattr(tuple, rcname = (Name) fastgetattr(tuple,
Anum_pg_relcheck_rcname, Anum_pg_relcheck_rcname,
rcrel->rd_att, &isnull); rcrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(ABORT, "RelCheckFetch: rcname IS NULL for rel %.*s", elog(ERROR, "RelCheckFetch: rcname IS NULL for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
check[found].ccname = nameout(rcname); check[found].ccname = nameout(rcname);
val = (struct varlena *) fastgetattr(tuple, val = (struct varlena *) fastgetattr(tuple,
Anum_pg_relcheck_rcbin, Anum_pg_relcheck_rcbin,
rcrel->rd_att, &isnull); rcrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(ABORT, "RelCheckFetch: rcbin IS NULL for rel %.*s", elog(ERROR, "RelCheckFetch: rcbin IS NULL for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
check[found].ccbin = textout(val); check[found].ccbin = textout(val);
val = (struct varlena *) fastgetattr(tuple, val = (struct varlena *) fastgetattr(tuple,
Anum_pg_relcheck_rcsrc, Anum_pg_relcheck_rcsrc,
rcrel->rd_att, &isnull); rcrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(ABORT, "RelCheckFetch: rcsrc IS NULL for rel %.*s", elog(ERROR, "RelCheckFetch: rcsrc IS NULL for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
check[found].ccsrc = textout(val); check[found].ccsrc = textout(val);
found++; found++;
@ -1851,7 +1851,7 @@ RelCheckFetch(Relation relation)
} }
if (found < ncheck) if (found < ncheck)
elog(ABORT, "RelCheckFetch: %d record not found for rel %.*s", elog(ERROR, "RelCheckFetch: %d record not found for rel %.*s",
ncheck - found, ncheck - found,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.11 1998/01/05 03:34:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.12 1998/01/07 21:06:15 momjian Exp $
* *
* NOTES * NOTES
* These routines allow the parser/planner/executor to perform * These routines allow the parser/planner/executor to perform
@ -371,7 +371,7 @@ InitCatalogCache()
cacheinfo[cacheId].iScanFunc); cacheinfo[cacheId].iScanFunc);
if (!PointerIsValid((char *) SysCache[cacheId])) if (!PointerIsValid((char *) SysCache[cacheId]))
{ {
elog(ABORT, elog(ERROR,
"InitCatalogCache: Can't init cache %.16s(%d)", "InitCatalogCache: Can't init cache %.16s(%d)",
cacheinfo[cacheId].name, cacheinfo[cacheId].name,
cacheId); cacheId);
@ -402,7 +402,7 @@ SearchSysCacheTuple(int cacheId, /* cache selection code */
if (cacheId < 0 || cacheId >= SysCacheSize) if (cacheId < 0 || cacheId >= SysCacheSize)
{ {
elog(ABORT, "SearchSysCacheTuple: Bad cache id %d", cacheId); elog(ERROR, "SearchSysCacheTuple: Bad cache id %d", cacheId);
return ((HeapTuple) NULL); return ((HeapTuple) NULL);
} }
@ -423,7 +423,7 @@ SearchSysCacheTuple(int cacheId, /* cache selection code */
cacheinfo[cacheId].iScanFunc); cacheinfo[cacheId].iScanFunc);
if (!PointerIsValid(SysCache[cacheId])) if (!PointerIsValid(SysCache[cacheId]))
{ {
elog(ABORT, elog(ERROR,
"InitCatalogCache: Can't init cache %.16s(%d)", "InitCatalogCache: Can't init cache %.16s(%d)",
cacheinfo[cacheId].name, cacheinfo[cacheId].name,
cacheId); cacheId);
@ -469,7 +469,7 @@ SearchSysCacheStruct(int cacheId, /* cache selection code */
if (!PointerIsValid(returnStruct)) if (!PointerIsValid(returnStruct))
{ {
elog(ABORT, "SearchSysCacheStruct: No receiving struct"); elog(ERROR, "SearchSysCacheStruct: No receiving struct");
return (0); return (0);
} }
tp = SearchSysCacheTuple(cacheId, key1, key2, key3, key4); tp = SearchSysCacheTuple(cacheId, key1, key2, key3, key4);
@ -537,7 +537,7 @@ SearchSysCacheGetAttribute(int cacheId,
} }
else else
{ {
elog(ABORT, elog(ERROR,
"SearchSysCacheGetAttribute: Bad attr # %d in %s(%d)", "SearchSysCacheGetAttribute: Bad attr # %d in %s(%d)",
attributeNumber, cacheName, cacheId); attributeNumber, cacheName, cacheId);
return (NULL); return (NULL);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.23 1998/01/05 04:10:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.24 1998/01/07 21:06:23 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -90,9 +90,6 @@ elog(int lev, const char *fmt,...)
case ERROR: case ERROR:
cp = "ERROR: "; cp = "ERROR: ";
break; break;
case ABORT:
cp = "ABORT: ";
break;
default: default:
sprintf(line, "FATAL %d: ", lev); sprintf(line, "FATAL %d: ", lev);
cp = line; cp = line;
@ -173,12 +170,12 @@ elog(int lev, const char *fmt,...)
} }
#endif /* !PG_STANDALONE */ #endif /* !PG_STANDALONE */
if (lev == ERROR || lev == ABORT) if (lev == ERROR)
{ {
extern int InErrorOrAbort; extern int InError;
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */ ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
if (!InErrorOrAbort) if (!InError)
{ {
kill(getpid(), 1); /* abort to traffic cop */ kill(getpid(), 1); /* abort to traffic cop */
pause(); pause();

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.15 1998/01/05 03:34:41 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.16 1998/01/07 21:06:26 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -75,7 +75,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(procedureTuple)) if (!HeapTupleIsValid(procedureTuple))
{ {
elog(ABORT, "fmgr: Cache lookup failed for procedure %d\n", elog(ERROR, "fmgr: Cache lookup failed for procedure %d\n",
procedureId); procedureId);
return ((func_ptr) NULL); return ((func_ptr) NULL);
} }
@ -95,7 +95,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
rdesc = heap_openr(ProcedureRelationName); rdesc = heap_openr(ProcedureRelationName);
if (!RelationIsValid(rdesc)) if (!RelationIsValid(rdesc))
{ {
elog(ABORT, "fmgr: Could not open relation %s", elog(ERROR, "fmgr: Could not open relation %s",
ProcedureRelationName); ProcedureRelationName);
return ((func_ptr) NULL); return ((func_ptr) NULL);
} }
@ -105,7 +105,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
if (!PointerIsValid(probinattr) /* || isnull */ ) if (!PointerIsValid(probinattr) /* || isnull */ )
{ {
heap_close(rdesc); heap_close(rdesc);
elog(ABORT, "fmgr: Could not extract probin for %d from %s", elog(ERROR, "fmgr: Could not extract probin for %d from %s",
procedureId, ProcedureRelationName); procedureId, ProcedureRelationName);
return ((func_ptr) NULL); return ((func_ptr) NULL);
} }
@ -150,7 +150,7 @@ handle_load(char *filename, char *funcname)
{ {
if (stat(filename, &stat_buf) == -1) if (stat(filename, &stat_buf) == -1)
{ {
elog(ABORT, "stat failed on file %s", filename); elog(ERROR, "stat failed on file %s", filename);
} }
for (file_scanner = file_list; for (file_scanner = file_list;
@ -211,7 +211,7 @@ handle_load(char *filename, char *funcname)
} }
free((char *) file_scanner); free((char *) file_scanner);
elog(ABORT, "Load of file %s failed: %s", filename, load_error); elog(ERROR, "Load of file %s failed: %s", filename, load_error);
} }
/* /*
@ -227,7 +227,7 @@ handle_load(char *filename, char *funcname)
if (retval == (func_ptr) NULL) if (retval == (func_ptr) NULL)
{ {
elog(ABORT, "Can't find function %s in file %s", funcname, filename); elog(ERROR, "Can't find function %s in file %s", funcname, filename);
} }
return (retval); return (retval);
@ -255,7 +255,7 @@ load_file(char *filename)
if (stat(filename, &stat_buf) == -1) if (stat(filename, &stat_buf) == -1)
{ {
elog(ABORT, "stat failed on file %s", filename); elog(ERROR, "stat failed on file %s", filename);
} }
if (file_list != (DynamicFileList *) NULL if (file_list != (DynamicFileList *) NULL

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.8 1998/01/05 03:34:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.9 1998/01/07 21:06:28 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -51,7 +51,7 @@ fmgr_pl(Oid func_id,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(procedureTuple)) if (!HeapTupleIsValid(procedureTuple))
{ {
elog(ABORT, "fmgr_pl(): Cache lookup of procedure %ld failed.", elog(ERROR, "fmgr_pl(): Cache lookup of procedure %ld failed.",
ObjectIdGetDatum(func_id)); ObjectIdGetDatum(func_id));
} }
procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple); procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple);
@ -62,7 +62,7 @@ fmgr_pl(Oid func_id,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(languageTuple)) if (!HeapTupleIsValid(languageTuple))
{ {
elog(ABORT, "fmgr_pl(): Cache lookup of language %ld for procedure %ld failed.", elog(ERROR, "fmgr_pl(): Cache lookup of language %ld for procedure %ld failed.",
ObjectIdGetDatum(procedureStruct->prolang), ObjectIdGetDatum(procedureStruct->prolang),
ObjectIdGetDatum(func_id)); ObjectIdGetDatum(func_id));
} }
@ -72,7 +72,7 @@ fmgr_pl(Oid func_id,
fmgr_info(languageStruct->lanplcallfoid, &plcall_fn, &plcall_nargs); fmgr_info(languageStruct->lanplcallfoid, &plcall_fn, &plcall_nargs);
if (plcall_fn == NULL) if (plcall_fn == NULL)
{ {
elog(ABORT, "fmgr_pl(): failed to load PL handler for procedure %ld.", elog(ERROR, "fmgr_pl(): failed to load PL handler for procedure %ld.",
ObjectIdGetDatum(func_id)); ObjectIdGetDatum(func_id));
} }
@ -163,7 +163,7 @@ fmgr_c(func_ptr user_fn,
values->data[8]); values->data[8]);
break; break;
default: default:
elog(ABORT, "fmgr_c: function %d: too many arguments (%d > %d)", elog(ERROR, "fmgr_c: function %d: too many arguments (%d > %d)",
func_id, n_arguments, MAXFMGRARGS); func_id, n_arguments, MAXFMGRARGS);
break; break;
} }
@ -188,7 +188,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(procedureTuple)) if (!HeapTupleIsValid(procedureTuple))
{ {
elog(ABORT, "fmgr_info: function %d: cache lookup failed\n", elog(ERROR, "fmgr_info: function %d: cache lookup failed\n",
procedureId); procedureId);
} }
procedureStruct = (FormData_pg_proc *) procedureStruct = (FormData_pg_proc *)
@ -205,7 +205,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
case INTERNALlanguageId: case INTERNALlanguageId:
user_fn = fmgr_lookupByName(procedureStruct->proname.data); user_fn = fmgr_lookupByName(procedureStruct->proname.data);
if (!user_fn) if (!user_fn)
elog(ABORT, "fmgr_info: function %s: not in internal table", elog(ERROR, "fmgr_info: function %s: not in internal table",
procedureStruct->proname.data); procedureStruct->proname.data);
break; break;
case ClanguageId: case ClanguageId:
@ -228,7 +228,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(languageTuple)) if (!HeapTupleIsValid(languageTuple))
{ {
elog(ABORT, "fmgr_info: %s %ld", elog(ERROR, "fmgr_info: %s %ld",
"Cache lookup for language %d failed", "Cache lookup for language %d failed",
ObjectIdGetDatum(procedureStruct->prolang)); ObjectIdGetDatum(procedureStruct->prolang));
} }
@ -241,7 +241,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
} }
else else
{ {
elog(ABORT, "fmgr_info: function %d: unknown language %d", elog(ERROR, "fmgr_info: function %d: unknown language %d",
procedureId, language); procedureId, language);
} }
break; break;
@ -282,7 +282,7 @@ fmgr(Oid procedureId,...)
if (pronargs > MAXFMGRARGS) if (pronargs > MAXFMGRARGS)
{ {
elog(ABORT, "fmgr: function %d: too many arguments (%d > %d)", elog(ERROR, "fmgr: function %d: too many arguments (%d > %d)",
procedureId, pronargs, MAXFMGRARGS); procedureId, pronargs, MAXFMGRARGS);
} }
for (i = 0; i < pronargs; ++i) for (i = 0; i < pronargs; ++i)
@ -317,7 +317,7 @@ fmgr_ptr(func_ptr user_fn, Oid func_id,...)
n_arguments = va_arg(pvar, int); n_arguments = va_arg(pvar, int);
if (n_arguments > MAXFMGRARGS) if (n_arguments > MAXFMGRARGS)
{ {
elog(ABORT, "fmgr_ptr: function %d: too many arguments (%d > %d)", elog(ERROR, "fmgr_ptr: function %d: too many arguments (%d > %d)",
func_id, n_arguments, MAXFMGRARGS); func_id, n_arguments, MAXFMGRARGS);
} }
for (i = 0; i < n_arguments; ++i) for (i = 0; i < n_arguments; ++i)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.4 1998/01/05 03:34:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.5 1998/01/07 21:06:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -61,7 +61,7 @@ GetDatabaseInfo(char *name, Oid *owner, char *path)
scan = heap_beginscan(dbrel, 0, false, 1, &scanKey); scan = heap_beginscan(dbrel, 0, false, 1, &scanKey);
if (!HeapScanIsValid(scan)) if (!HeapScanIsValid(scan))
elog(ABORT, "GetDatabaseInfo: cannot begin scan of %s", DatabaseRelationName); elog(ERROR, "GetDatabaseInfo: cannot begin scan of %s", DatabaseRelationName);
/* /*
* Since we're going to close the relation, copy the tuple. * Since we're going to close the relation, copy the tuple.

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.29 1998/01/05 03:34:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.30 1998/01/07 21:06:39 momjian Exp $
* *
* NOTES * NOTES
* Sorts the first relation into the second relation. * Sorts the first relation into the second relation.
@ -205,7 +205,7 @@ inittapes(Sort * node)
PS(node)->Tape[0].tp_prev = tp; PS(node)->Tape[0].tp_prev = tp;
if (PS(node)->TapeRange <= 1) if (PS(node)->TapeRange <= 1)
elog(ABORT, "inittapes: Could only allocate %d < 3 tapes\n", elog(ERROR, "inittapes: Could only allocate %d < 3 tapes\n",
PS(node)->TapeRange + 1); PS(node)->TapeRange + 1);
PS(node)->Level = 1; PS(node)->Level = 1;
@ -1009,7 +1009,7 @@ gettape()
file = AllocateFile(tp->tl_name, "w+"); file = AllocateFile(tp->tl_name, "w+");
if (file == NULL) if (file == NULL)
elog(ABORT, "Open: %s in %s line %d, %s", tp->tl_name, elog(ERROR, "Open: %s in %s line %d, %s", tp->tl_name,
__FILE__, __LINE__, strerror(errno)); __FILE__, __LINE__, strerror(errno));
tp->tl_fd = fileno(file); tp->tl_fd = fileno(file);
@ -1034,7 +1034,7 @@ resettape(FILE * file)
for (tp = Tapes; tp != NULL && tp->tl_fd != fd; tp = tp->tl_next) for (tp = Tapes; tp != NULL && tp->tl_fd != fd; tp = tp->tl_next)
; ;
if (tp == NULL) if (tp == NULL)
elog(ABORT, "resettape: tape not found"); elog(ERROR, "resettape: tape not found");
file = freopen(tp->tl_name, "w+", file); file = freopen(tp->tl_name, "w+", file);
if (file == NULL) if (file == NULL)

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: elog.h,v 1.6 1998/01/05 03:35:05 momjian Exp $ * $Id: elog.h,v 1.7 1998/01/07 21:06:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -14,11 +14,10 @@
#define ELOG_H #define ELOG_H
#define NOTICE 0 /* random info - no special action */ #define NOTICE 0 /* random info - no special action */
#define ERROR -2 /* user error - return to known state */ #define ERROR -1 /* user error - return to known state */
#define ABORT -1 /* system error - return to known state */
#define FATAL 1 /* Fatal error - abort process */ #define FATAL 1 /* Fatal error - abort process */
#define DEBUG -3 /* debug message */ #define DEBUG -2 /* debug message */
#define NOIND -4 /* debug message, don't indent as far */ #define NOIND -3 /* debug message, don't indent as far */
#ifdef NOT_USED #ifdef NOT_USED
#define PTIME 0x100 /* prepend time to message */ #define PTIME 0x100 /* prepend time to message */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.4 1998/01/05 03:35:52 momjian Exp $ * $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.5 1998/01/07 21:07:03 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -34,10 +34,10 @@ beard(Oid picture)
int cc; int cc;
if ((pic_fd = lo_open(picture, INV_READ)) == -1) if ((pic_fd = lo_open(picture, INV_READ)) == -1)
elog(ABORT, "Cannot access picture large object"); elog(ERROR, "Cannot access picture large object");
if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr)) if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr))
elog(ABORT, "Picture large object corrupted"); elog(ERROR, "Picture large object corrupted");
beardOffset = (ihdr.size / 3) * 2; beardOffset = (ihdr.size / 3) * 2;
@ -45,16 +45,16 @@ beard(Oid picture)
* new large object * new large object
*/ */
if ((beard = lo_creat(INV_MD)) == 0) /* ?? is this right? */ if ((beard = lo_creat(INV_MD)) == 0) /* ?? is this right? */
elog(ABORT, "Cannot create new large object"); elog(ERROR, "Cannot create new large object");
if ((beard_fd = lo_open(beard, INV_WRITE)) == -1) if ((beard_fd = lo_open(beard, INV_WRITE)) == -1)
elog(ABORT, "Cannot access beard large object"); elog(ERROR, "Cannot access beard large object");
lo_lseek(pic_fd, beardOffset, SET_CUR); lo_lseek(pic_fd, beardOffset, SET_CUR);
while ((cc = lo_read(pic_fd, buf, BUFSIZE)) > 0) while ((cc = lo_read(pic_fd, buf, BUFSIZE)) > 0)
{ {
if (lo_write(beard_fd, buf, cc) != cc) if (lo_write(beard_fd, buf, cc) != cc)
elog(ABORT, "error while writing large object"); elog(ERROR, "error while writing large object");
} }
lo_close(pic_fd); lo_close(pic_fd);

View File

@ -45,7 +45,7 @@ complex_in(char *str)
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2)
{ {
elog(ABORT, "complex_in: error in parsing \"%s\"", str); elog(ERROR, "complex_in: error in parsing \"%s\"", str);
return NULL; return NULL;
} }
result = (Complex *) palloc(sizeof(Complex)); result = (Complex *) palloc(sizeof(Complex));