1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Change elog(WARN) to elog(ERROR) and elog(ABORT).

This commit is contained in:
Bruce Momjian
1998-01-05 03:35:55 +00:00
parent 0af9137f14
commit 0d9fc5afd6
188 changed files with 1436 additions and 1433 deletions

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.28 1997/11/02 15:24:09 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.29 1998/01/05 03:28:57 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(WARN, "ComputeDataSize: attribute %d has len %d", elog(ABORT, "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(WARN, "DataFill: attribute %d has len %d", elog(ABORT, "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(WARN, "heap_attisnull: zero attnum disallowed"); elog(ABORT, "heap_attisnull: zero attnum disallowed");
default: default:
elog(WARN, "heap_attisnull: undefined negative attnum"); elog(ABORT, "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(WARN, "sysattrlen: System attribute number %d unknown.", attno); elog(ABORT, "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(WARN, "sysattrbyval: System attribute number %d unknown.", elog(ABORT, "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(WARN, "heap_getsysattr: undefined attnum %d", attnum); elog(ABORT, "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(WARN, elog(ABORT,
"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(WARN, elog(ABORT,
"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(WARN, "fastgetattr3: attribute %d has len %d", elog(ABORT, "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(WARN, "palloctup: cannot handle length %d tuples", elog(ABORT, "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(WARN, "heap_formtuple: numberOfAttributes of %d > %d", elog(ABORT, "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(WARN, "heap_modifytuple: repl is \\%3d", repl[attoff]); elog(ABORT, "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.20 1997/11/02 15:24:11 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.21 1998/01/05 03:28:59 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(WARN, "index_formtuple: numberOfAttributes of %d > %d", elog(ABORT, "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(WARN, "index_formtuple: data takes %d bytes: too big", size); elog(ABORT, "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(WARN, "fastgetiattr: attribute %d has len %d", elog(ABORT, "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(WARN, "fastgetiattr2: attribute %d has len %d", elog(ABORT, "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(WARN, "fastgetattr3: attribute %d has len %d", elog(ABORT, "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.20 1997/12/08 04:42:43 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.21 1998/01/05 03:29:00 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -45,7 +45,7 @@ typtoout(Oid type)
return ((Oid) return ((Oid)
((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput); ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
elog(WARN, "typtoout: Cache lookup of type %d failed", type); elog(ABORT, "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(WARN, "typtoout: Cache lookup of type %d failed", type); elog(ABORT, "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.29 1997/11/25 21:58:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.30 1998/01/05 03:29:01 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(WARN) we just leave that information * then doing a elog(ABORT) 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(WARN, "DefineRelation: no such type %s", elog(ABORT, "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(WARN, "%.16s already contains data", &(index->rd_rel->relname.data[0])); elog(ABORT, "%.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(WARN, "initGISTstate: index %d not found", index->rd_id); elog(ABORT, "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(WARN, "initGISTstate: no attribute tuple %d %d", elog(ABORT, "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(WARN, "gistrescan: invalid scan."); elog(ABORT, "gistrescan: invalid scan.");
return; return;
} }
@ -281,7 +281,7 @@ gistdropscan(IndexScanDesc s)
} }
if (l == (GISTScanList) NULL) if (l == (GISTScanList) NULL)
elog(WARN, "GiST scan list corrupted -- cannot find 0x%lx", s); elog(ABORT, "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(WARN, "Bad operation in GiST scan adjust: %d", op); elog(ABORT, "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.10 1997/09/08 02:20:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.11 1998/01/05 03:29:15 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(WARN, "Hash indices valid for only one index key."); elog(ABORT, "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(WARN, "hash item too large"); elog(ABORT, "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.13 1997/09/18 20:19:43 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.14 1998/01/05 03:29:20 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(WARN, "_hash_addovflpage: problem with _hash_getovfladdr."); elog(ABORT, "_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(WARN, OVMSG); elog(ABORT, 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(WARN, OVMSG); elog(ABORT, 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(WARN, "overflow_page: problem with _hash_initbitmap."); elog(ABORT, "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(WARN, OVMSG); elog(ABORT, 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(WARN, OVMSG); elog(ABORT, 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.13 1997/09/18 20:19:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.14 1998/01/05 03:29:22 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(WARN, "Cannot initialize non-empty hash table %s", elog(ABORT, "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(WARN, "Problem with _hash_initbitmap."); elog(ABORT, "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(WARN, "_hash_getbuf: internal error: hash AM does not use P_NEW"); elog(ABORT, "_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(WARN, "_hash_getbuf: invalid access (%d) on new blk: %s", elog(ABORT, "_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(WARN, "_hash_relbuf: invalid access (%d) on blk %x: %s", elog(ABORT, "_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(WARN, "_hash_chgbufaccess: invalid access (%d) on blk %x: %s", elog(ABORT, "_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(WARN, "_hash_setpagelock: invalid access (%d) on blk %x: %s", elog(ABORT, "_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(WARN, "_hash_unsetpagelock: invalid access (%d) on blk %x: %s", elog(ABORT, "_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(WARN, "_hash_splitpage: empty overflow page %d", oblkno); elog(ABORT, "_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(WARN, "_hash_splitpage: empty ovfl page %d!", elog(ABORT, "_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(WARN, "_hash_splitpage: empty overflow page %d", elog(ABORT, "_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.11 1997/09/08 21:40:48 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.12 1998/01/05 03:29:24 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(WARN, "hash scan list trashed; can't find 0x%lx", scan); elog(ABORT, "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.11 1997/09/08 02:20:25 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.12 1998/01/05 03:29:26 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(WARN, "hash indices cannot include null keys"); elog(ABORT, "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.23 1997/11/21 18:03:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.24 1998/01/05 03:29:29 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(WARN, "heapgettup: failed ReadBuffer"); elog(ABORT, "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(WARN, "heapgettup: failed ReadBuffer"); elog(ABORT, "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(WARN, "heapgettup: failed ReadBuffer"); elog(ABORT, "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(WARN, "heapgettup: failed ReadBuffer"); elog(ABORT, "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(WARN, "%s is an index relation", r->rd_rel->relname.data); elog(ABORT, "%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(WARN, "%s is an index relation", r->rd_rel->relname.data); elog(ABORT, "%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(WARN, "heap_beginscan: !RelationIsValid(relation)"); elog(ABORT, "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(WARN, "heap_getnext: NULL relscan"); elog(ABORT, "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(WARN, "heap_fetch: %s relation: ReadBuffer(%lx) failed", elog(ABORT, "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(WARN, "heap_delete: failed ReadBuffer"); elog(ABORT, "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(WARN, "heap_delete: (am)invalid tid"); elog(ABORT, "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(WARN, "amreplace: failed ReadBuffer"); elog(ABORT, "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(WARN, "heap_replace: (am)invalid otid"); elog(ABORT, "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.11 1997/09/08 02:20:30 momjian Exp $ * $Id: hio.c,v 1.12 1998/01/05 03:29:30 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -60,7 +60,7 @@ RelationPutHeapTuple(Relation relation,
#ifndef NO_BUFFERISVALID #ifndef NO_BUFFERISVALID
if (!BufferIsValid(buffer)) if (!BufferIsValid(buffer))
{ {
elog(WARN, "RelationPutHeapTuple: no buffer for %ld in %s", elog(ABORT, "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(WARN, "Tuple is too big: size %d", len); elog(ABORT, "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.9 1997/09/08 02:20:33 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.10 1998/01/05 03:29:32 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(WARN, "RelationGetIndexScan: relation invalid"); elog(ABORT, "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(WARN, "IndexScanRestart: invalid scan"); elog(ABORT, "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(WARN, "IndexScanEnd: invalid scan"); elog(ABORT, "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(WARN, "IndexScanRestorePosition: no mark to restore"); elog(ABORT, "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.17 1997/09/12 04:07:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.18 1998/01/05 03:29:34 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(WARN, "index_%s: invalid %s regproc", \ elog(ABORT, "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(WARN, "index_%s: invalid %s regproc", \ elog(ABORT, "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.13 1997/11/20 23:20:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.14 1998/01/05 03:29:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -349,7 +349,7 @@ RelationGetStrategy(Relation relation,
{ {
if (!StrategyNumberIsValid(strategy)) if (!StrategyNumberIsValid(strategy))
{ {
elog(WARN, "RelationGetStrategy: corrupted evaluation"); elog(ABORT, "RelationGetStrategy: corrupted evaluation");
} }
} }
@ -481,7 +481,7 @@ RelationInvokeStrategy(Relation relation,
} }
} }
elog(WARN, "RelationInvokeStrategy: cannot evaluate strategy %d", elog(ABORT, "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(WARN, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu", elog(ABORT, "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(WARN, elog(ABORT,
"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(WARN, "IndexSupportInitialize: corrupted catalogs"); elog(ABORT, "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(WARN, "IndexSupportInitialize: no pg_index tuple"); elog(ABORT, "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.22 1997/12/09 01:40:30 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.23 1998/01/05 03:29:45 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(WARN, "Cannot insert a duplicate key into a unique index"); elog(ABORT, "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(WARN, "this is not good."); } * elog(ABORT, "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.13 1997/09/18 20:19:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.14 1998/01/05 03:29:50 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(WARN, "Cannot initialize non-empty btree %s", elog(ABORT, "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(WARN, "Invalid metapage for index %s", elog(ABORT, "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(WARN, "Index %s is not a btree", elog(ABORT, "Index %s is not a btree",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
if (metad->btm_version != BTREE_VERSION) if (metad->btm_version != BTREE_VERSION)
{ {
elog(WARN, "Version mismatch on %s: version %d file, version %d code", elog(ABORT, "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(WARN, "Index %s is not a btree", elog(ABORT, "Index %s is not a btree",
RelationGetRelationName(rel)); RelationGetRelationName(rel));
} }
if (metad->btm_version != BTREE_VERSION) if (metad->btm_version != BTREE_VERSION)
{ {
elog(WARN, "Version mismatch on %s: version %d file, version %d code", elog(ABORT, "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.10 1997/09/08 20:54:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.11 1998/01/05 03:29:52 momjian Exp $
* *
* *
* NOTES * NOTES
@ -77,7 +77,7 @@ _bt_dropscan(IndexScanDesc scan)
} }
if (chk == (BTScanList) NULL) if (chk == (BTScanList) NULL)
elog(WARN, "btree scan list trashed; can't find 0x%lx", scan); elog(ABORT, "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(WARN, "_bt_scandel: bad operation '%d'", op); elog(ABORT, "_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(WARN, "_bt_scandel: bad operation '%d'", op); elog(ABORT, "_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.27 1997/10/22 19:02:52 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.28 1998/01/05 03:29:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -617,7 +617,7 @@ _bt_compare(Relation rel,
*/ */
if (!P_RIGHTMOST(opaque)) if (!P_RIGHTMOST(opaque))
{ {
elog(WARN, "_bt_compare: invalid comparison to high key"); elog(ABORT, "_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(WARN, "_bt_first: btree doesn't support is(not)null, yet"); elog(ABORT, "_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(WARN, "btree synchronization error: concurrent update botched scan"); elog(ABORT, "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(WARN, "_bt_endpoint: leftmost page (%u) has not leftmost flag", blkno); elog(ABORT, "_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(WARN, "_bt_endpoint: non-rightmost page (%u) is empty", blkno); elog(ABORT, "_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(WARN, "Illegal scan direction %d", dir); elog(ABORT, "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.24 1997/09/18 20:19:53 momjian Exp $ * $Id: nbtsort.c,v 1.25 1998/01/05 03:29:55 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(WARN, "Cannot create unique index. Table contains non-unique values"); elog(ABORT, "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(WARN, "_bt_pqadd: queue overflow"); elog(ABORT, "_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(WARN, "_bt_tapecreate: out of memory"); elog(ABORT, "_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(WARN, "_bt_spoolinit: out of memory"); elog(ABORT, "_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(WARN, "_bt_spoolinit: out of memory"); elog(ABORT, "_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.15 1997/09/18 20:19:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.16 1998/01/05 03:29:56 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(WARN, "_bt_orderkeys: key(s) for attribute 1 missed"); elog(ABORT, "_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(WARN, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1); elog(ABORT, "_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(WARN, "btree indices cannot * if (itup->t_info & INDEX_NULL_MASK) elog(ABORT, "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.12 1997/09/18 20:19:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.13 1998/01/05 03:29:59 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(WARN, "Cannot allocate box for union"); elog(ABORT, "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(WARN, "Cannot allocate box for union"); elog(ABORT, "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 *) PALLOCTYPE(POLYGON); p = (POLYGON *) PALLOCTYPE(POLYGON);
if (!PointerIsValid(p)) if (!PointerIsValid(p))
elog(WARN, "Cannot allocate polygon for union"); elog(ABORT, "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 *) PALLOCTYPE(POLYGON); p = (POLYGON *) PALLOCTYPE(POLYGON);
if (!PointerIsValid(p)) if (!PointerIsValid(p))
elog(WARN, "Cannot allocate polygon for intersection"); elog(ABORT, "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.19 1997/11/20 23:20:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.20 1998/01/05 03:30:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -125,7 +125,7 @@ rtbuild(Relation heap,
*/ */
if (oldPred == NULL && (nb = RelationGetNumberOfBlocks(index)) != 0) if (oldPred == NULL && (nb = RelationGetNumberOfBlocks(index)) != 0)
elog(WARN, "%s already contains data", index->rd_rel->relname.data); elog(ABORT, "%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(WARN, "Variable-length rtree keys are not supported."); elog(ABORT, "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.13 1997/09/08 21:41:40 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.14 1998/01/05 03:30:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -85,7 +85,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
if (!IndexScanIsValid(s)) if (!IndexScanIsValid(s))
{ {
elog(WARN, "rtrescan: invalid scan."); elog(ABORT, "rtrescan: invalid scan.");
return; return;
} }
@ -284,7 +284,7 @@ rtdropscan(IndexScanDesc s)
} }
if (l == (RTScanList) NULL) if (l == (RTScanList) NULL)
elog(WARN, "rtree scan list corrupted -- cannot find 0x%lx", s); elog(ABORT, "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(WARN, "Bad operation in rtree scan adjust: %d", op); elog(ABORT, "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.14 1997/11/02 15:24:42 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.15 1998/01/05 03:30:07 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(WARN, "TransactionLogTest: failed to get xidstatus"); elog(ABORT, "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(WARN, "TransRecover: failed TransGetLastRecordedTransaction"); elog(ABORT, "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(WARN, "TransRecover: varNextXid < logLastXid"); elog(ABORT, "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.14 1997/11/02 15:24:44 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.15 1998/01/05 03:30:10 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(WARN, "TransComputeBlockNumber: unknown relation"); elog(ABORT, "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.13 1997/11/02 15:24:45 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.14 1998/01/05 03:30:12 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -69,7 +69,7 @@ VariableRelationGetNextXid(TransactionId *xidP)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(WARN, "VariableRelationGetNextXid: ReadBuffer failed"); elog(ABORT, "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(WARN, "VariableRelationPutNextXid: ReadBuffer failed"); elog(ABORT, "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(WARN, "VariableRelationGetNextXid: ReadBuffer failed"); elog(ABORT, "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(WARN, "VariableRelationPutNextOid: invalid oid pointer"); elog(ABORT, "VariableRelationPutNextOid: invalid oid pointer");
} }
/* ---------------- /* ----------------
@ -237,7 +237,7 @@ VariableRelationPutNextOid(Oid *oidP)
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
{ {
SpinRelease(OidGenLockId); SpinRelease(OidGenLockId);
elog(WARN, "VariableRelationPutNextOid: ReadBuffer failed"); elog(ABORT, "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.17 1997/11/02 15:24:46 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.18 1998/01/05 03:30:13 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(WARN, "You may only have 2^32-1 commands per transaction"); elog(ABORT, "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.10 1997/12/17 18:21:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.11 1998/01/05 03:30:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -203,10 +203,10 @@ InsertStmt:
LPAREN tuplelist RPAREN LPAREN tuplelist RPAREN
{ {
if (num_tuples_read != numattr) if (num_tuples_read != numattr)
elog(WARN,"incorrect number of values for tuple"); elog(ABORT,"incorrect number of values for tuple");
if (reldesc == (Relation)NULL) if (reldesc == (Relation)NULL)
{ {
elog(WARN,"must OPEN RELATION before INSERT\n"); elog(ABORT,"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.30 1998/01/01 05:40:28 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.31 1998/01/05 03:30:18 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(WARN, "closerel: close of '%s' when '%s' was expected", elog(ABORT, "closerel: close of '%s' when '%s' was expected",
name, relname ? relname : "(null)"); name, relname ? relname : "(null)");
} }
else else
elog(WARN, "closerel: close of '%s' before any relation was opened", elog(ABORT, "closerel: close of '%s' before any relation was opened",
name); name);
} }
if (reldesc == NULL) if (reldesc == NULL)
{ {
elog(WARN, "Warning: no opened relation to close.\n"); elog(ABORT, "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(WARN, "Error: unknown type '%s'.\n", type); elog(ABORT, "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/catalog/catalog.c,v 1.10 1997/09/08 21:42:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.11 1998/01/05 03:30:22 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -132,7 +132,7 @@ newoid()
GetNewObjectId(&lastoid); GetNewObjectId(&lastoid);
if (!OidIsValid(lastoid)) if (!OidIsValid(lastoid))
elog(WARN, "newoid: GetNewObjectId returns invalid oid"); elog(ABORT, "newoid: GetNewObjectId returns invalid oid");
return lastoid; return lastoid;
} }
@ -162,7 +162,7 @@ fillatt(TupleDesc tupleDesc)
AttributeTupleForm *att = tupleDesc->attrs; AttributeTupleForm *att = tupleDesc->attrs;
if (natts < 0 || natts > MaxHeapAttributeNumber) if (natts < 0 || natts > MaxHeapAttributeNumber)
elog(WARN, "fillatt: %d attributes is too large", natts); elog(ABORT, "fillatt: %d attributes is too large", natts);
if (natts == 0) if (natts == 0)
{ {
elog(DEBUG, "fillatt: called with natts == 0"); elog(DEBUG, "fillatt: called with natts == 0");
@ -178,7 +178,7 @@ fillatt(TupleDesc tupleDesc)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "fillatt: unknown atttypid %ld", elog(ABORT, "fillatt: unknown atttypid %ld",
(*attributeP)->atttypid); (*attributeP)->atttypid);
} }
else else

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.41 1997/12/11 17:35:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.42 1998/01/05 03:30:27 momjian Exp $
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation * heap_create() - Create an uncataloged heap relation
@ -194,7 +194,7 @@ heap_create(char *name,
if (IsSystemRelationName(relname) && IsNormalProcessingMode()) if (IsSystemRelationName(relname) && IsNormalProcessingMode())
{ {
elog(WARN, elog(ABORT,
"Illegal class name: %s -- pg_ is reserved for system catalogs", "Illegal class name: %s -- pg_ is reserved for system catalogs",
relname); relname);
} }
@ -396,7 +396,7 @@ heap_create(char *name,
* *
* this is used to make certain the tuple descriptor contains a * this is used to make certain the tuple descriptor contains a
* valid set of attribute names. a problem simply generates * valid set of attribute names. a problem simply generates
* elog(WARN) which aborts the current transaction. * elog(ABORT) which aborts the current transaction.
* -------------------------------- * --------------------------------
*/ */
static void static void
@ -421,7 +421,7 @@ CheckAttributeNames(TupleDesc tupdesc)
if (nameeq(&(HeapAtt[j]->attname), if (nameeq(&(HeapAtt[j]->attname),
&(tupdesc->attrs[i]->attname))) &(tupdesc->attrs[i]->attname)))
{ {
elog(WARN, elog(ABORT,
"create: system attribute named \"%s\"", "create: system attribute named \"%s\"",
HeapAtt[j]->attname.data); HeapAtt[j]->attname.data);
} }
@ -445,7 +445,7 @@ CheckAttributeNames(TupleDesc tupdesc)
if (nameeq(&(tupdesc->attrs[j]->attname), if (nameeq(&(tupdesc->attrs[j]->attname),
&(tupdesc->attrs[i]->attname))) &(tupdesc->attrs[i]->attname)))
{ {
elog(WARN, elog(ABORT,
"create: repeated attribute \"%s\"", "create: repeated attribute \"%s\"",
tupdesc->attrs[j]->attname.data); tupdesc->attrs[j]->attname.data);
} }
@ -762,7 +762,7 @@ heap_create_with_catalog(char relname[],
*/ */
AssertState(IsNormalProcessingMode() || IsBootstrapProcessingMode()); AssertState(IsNormalProcessingMode() || IsBootstrapProcessingMode());
if (natts == 0 || natts > MaxHeapAttributeNumber) if (natts == 0 || natts > MaxHeapAttributeNumber)
elog(WARN, "amcreate: from 1 to %d attributes must be specified", elog(ABORT, "amcreate: from 1 to %d attributes must be specified",
MaxHeapAttributeNumber); MaxHeapAttributeNumber);
CheckAttributeNames(tupdesc); CheckAttributeNames(tupdesc);
@ -777,7 +777,7 @@ heap_create_with_catalog(char relname[],
if (RelationAlreadyExists(pg_class_desc, relname)) if (RelationAlreadyExists(pg_class_desc, relname))
{ {
heap_close(pg_class_desc); heap_close(pg_class_desc);
elog(WARN, "amcreate: %s relation already exists", relname); elog(ABORT, "amcreate: %s relation already exists", relname);
} }
/* ---------------- /* ----------------
@ -910,7 +910,7 @@ RelationRemoveInheritance(Relation relation)
heap_endscan(scan); heap_endscan(scan);
heap_close(catalogRelation); heap_close(catalogRelation);
elog(WARN, "relation <%d> inherits \"%s\"", elog(ABORT, "relation <%d> inherits \"%s\"",
((InheritsTupleForm) GETSTRUCT(tuple))->inhrel, ((InheritsTupleForm) GETSTRUCT(tuple))->inhrel,
RelationGetRelationName(relation)); RelationGetRelationName(relation));
} }
@ -1054,7 +1054,7 @@ DeletePgRelationTuple(Relation rdesc)
{ {
heap_endscan(pg_class_scan); heap_endscan(pg_class_scan);
heap_close(pg_class_desc); heap_close(pg_class_desc);
elog(WARN, "DeletePgRelationTuple: %s relation nonexistent", elog(ABORT, "DeletePgRelationTuple: %s relation nonexistent",
&rdesc->rd_rel->relname); &rdesc->rd_rel->relname);
} }
@ -1187,7 +1187,7 @@ DeletePgTypeTuple(Relation rdesc)
{ {
heap_endscan(pg_type_scan); heap_endscan(pg_type_scan);
heap_close(pg_type_desc); heap_close(pg_type_desc);
elog(WARN, "DeletePgTypeTuple: %s type nonexistent", elog(ABORT, "DeletePgTypeTuple: %s type nonexistent",
&rdesc->rd_rel->relname); &rdesc->rd_rel->relname);
} }
@ -1229,7 +1229,7 @@ DeletePgTypeTuple(Relation rdesc)
heap_endscan(pg_attribute_scan); heap_endscan(pg_attribute_scan);
heap_close(pg_attribute_desc); heap_close(pg_attribute_desc);
elog(WARN, "DeletePgTypeTuple: att of type %s exists in relation %d", elog(ABORT, "DeletePgTypeTuple: att of type %s exists in relation %d",
&rdesc->rd_rel->relname, relid); &rdesc->rd_rel->relname, relid);
} }
heap_endscan(pg_attribute_scan); heap_endscan(pg_attribute_scan);
@ -1265,7 +1265,7 @@ heap_destroy_with_catalog(char *relname)
*/ */
rdesc = heap_openr(relname); rdesc = heap_openr(relname);
if (rdesc == NULL) if (rdesc == NULL)
elog(WARN, "Relation %s Does Not Exist!", relname); elog(ABORT, "Relation %s Does Not Exist!", relname);
RelationSetLockForWrite(rdesc); RelationSetLockForWrite(rdesc);
rid = rdesc->rd_id; rid = rdesc->rd_id;
@ -1275,7 +1275,7 @@ heap_destroy_with_catalog(char *relname)
* ---------------- * ----------------
*/ */
if (IsSystemRelationName(RelationGetRelationName(rdesc)->data)) if (IsSystemRelationName(RelationGetRelationName(rdesc)->data))
elog(WARN, "amdestroy: cannot destroy %s relation", elog(ABORT, "amdestroy: cannot destroy %s relation",
&rdesc->rd_rel->relname); &rdesc->rd_rel->relname);
/* ---------------- /* ----------------
@ -1516,7 +1516,7 @@ start:;
if (length(query->rtable) > 1 || if (length(query->rtable) > 1 ||
flatten_tlist(query->targetList) != NIL) flatten_tlist(query->targetList) != NIL)
elog(WARN, "DEFAULT: cannot use attribute(s)"); elog(ABORT, "DEFAULT: cannot use attribute(s)");
te = (TargetEntry *) lfirst(query->targetList); te = (TargetEntry *) lfirst(query->targetList);
resdom = te->resdom; resdom = te->resdom;
expr = te->expr; expr = te->expr;
@ -1526,13 +1526,13 @@ start:;
if (((Const *) expr)->consttype != atp->atttypid) if (((Const *) expr)->consttype != atp->atttypid)
{ {
if (*cast != 0) if (*cast != 0)
elog(WARN, "DEFAULT: const type mismatched"); elog(ABORT, "DEFAULT: const type mismatched");
sprintf(cast, ":: %s", typeidTypeName(atp->atttypid)); sprintf(cast, ":: %s", typeidTypeName(atp->atttypid));
goto start; goto start;
} }
} }
else if (exprType(expr) != atp->atttypid) else if (exprType(expr) != atp->atttypid)
elog(WARN, "DEFAULT: type mismatched"); elog(ABORT, "DEFAULT: type mismatched");
adbin = nodeToString(expr); adbin = nodeToString(expr);
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt); oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
@ -1585,7 +1585,7 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
query = (Query *) (queryTree_list->qtrees[0]); query = (Query *) (queryTree_list->qtrees[0]);
if (length(query->rtable) > 1) if (length(query->rtable) > 1)
elog(WARN, "CHECK: only relation %.*s can be referenced", elog(ABORT, "CHECK: only relation %.*s can be referenced",
NAMEDATALEN, rel->rd_rel->relname.data); NAMEDATALEN, rel->rd_rel->relname.data);
plan = (Plan *) lfirst(planTree_list); plan = (Plan *) lfirst(planTree_list);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.31 1997/11/28 04:39:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.32 1998/01/05 03:30:30 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
@ -237,7 +237,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName)
false); false);
if (OidIsValid(indoid)) if (OidIsValid(indoid))
elog(WARN, "Cannot create index: '%s' already exists", elog(ABORT, "Cannot create index: '%s' already exists",
indexRelationName); indexRelationName);
/* ---------------- /* ----------------
@ -253,7 +253,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName)
* ---------------- * ----------------
*/ */
if (!OidIsValid(heapoid)) if (!OidIsValid(heapoid))
elog(WARN, "Cannot create index on '%s': relation does not exist", elog(ABORT, "Cannot create index on '%s': relation does not exist",
heapRelationName); heapRelationName);
/* ---------------- /* ----------------
@ -306,7 +306,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
ObjectIdGetDatum(retType), ObjectIdGetDatum(retType),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
elog(WARN, "Function %s return type does not exist", FIgetname(funcInfo)); elog(ABORT, "Function %s return type does not exist", FIgetname(funcInfo));
/* /*
* Assign some of the attributes values. Leave the rest as 0. * Assign some of the attributes values. Leave the rest as 0.
@ -374,7 +374,7 @@ ConstructTupleDescriptor(Oid heapoid,
*/ */
atnum = attNums[i]; atnum = attNums[i];
if (atnum > natts) if (atnum > natts)
elog(WARN, "Cannot create index: attribute %d does not exist", elog(ABORT, "Cannot create index: attribute %d does not exist",
atnum); atnum);
if (attributeList) if (attributeList)
{ {
@ -404,7 +404,7 @@ ConstructTupleDescriptor(Oid heapoid,
* ---------------- * ----------------
*/ */
if (atnum <= FirstLowInvalidHeapAttributeNumber || atnum >= 0) if (atnum <= FirstLowInvalidHeapAttributeNumber || atnum >= 0)
elog(WARN, "Cannot create index on system attribute: attribute number out of range (%d)", atnum); elog(ABORT, "Cannot create index on system attribute: attribute number out of range (%d)", atnum);
atind = (-atnum) - 1; atind = (-atnum) - 1;
from = (char *) (&sysatts[atind]); from = (char *) (&sysatts[atind]);
@ -450,7 +450,7 @@ ConstructTupleDescriptor(Oid heapoid,
PointerGetDatum(IndexKeyType->name), PointerGetDatum(IndexKeyType->name),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "create index: type '%s' undefined", elog(ABORT, "create index: type '%s' undefined",
IndexKeyType->name); IndexKeyType->name);
((AttributeTupleForm) to)->atttypid = tup->t_oid; ((AttributeTupleForm) to)->atttypid = tup->t_oid;
((AttributeTupleForm) to)->attbyval = ((AttributeTupleForm) to)->attbyval =
@ -1082,7 +1082,7 @@ index_create(char *heapRelationName,
* ---------------- * ----------------
*/ */
if (numatts < 1) if (numatts < 1)
elog(WARN, "must index at least one attribute"); elog(ABORT, "must index at least one attribute");
/* ---------------- /* ----------------
* get heap relation oid and open the heap relation * get heap relation oid and open the heap relation
@ -1297,7 +1297,7 @@ index_destroy(Oid indexId)
* physically remove the file * physically remove the file
*/ */
if (FileNameUnlink(relpath(indexRelation->rd_rel->relname.data)) < 0) if (FileNameUnlink(relpath(indexRelation->rd_rel->relname.data)) < 0)
elog(WARN, "amdestroyr: unlink: %m"); elog(ABORT, "amdestroyr: unlink: %m");
index_close(indexRelation); index_close(indexRelation);
} }
@ -1398,7 +1398,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
whichRel = RelationIdGetRelation(relid); whichRel = RelationIdGetRelation(relid);
if (!RelationIsValid(whichRel)) if (!RelationIsValid(whichRel))
elog(WARN, "UpdateStats: cannot open relation id %d", relid); elog(ABORT, "UpdateStats: cannot open relation id %d", relid);
/* ---------------- /* ----------------
* Find the RELATION relation tuple for the given relation. * Find the RELATION relation tuple for the given relation.
@ -1407,7 +1407,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
pg_class = heap_openr(RelationRelationName); pg_class = heap_openr(RelationRelationName);
if (!RelationIsValid(pg_class)) if (!RelationIsValid(pg_class))
{ {
elog(WARN, "UpdateStats: could not open RELATION relation"); elog(ABORT, "UpdateStats: could not open RELATION relation");
} }
key[0].sk_argument = ObjectIdGetDatum(relid); key[0].sk_argument = ObjectIdGetDatum(relid);
@ -1417,7 +1417,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
if (!HeapScanIsValid(pg_class_scan)) if (!HeapScanIsValid(pg_class_scan))
{ {
heap_close(pg_class); heap_close(pg_class);
elog(WARN, "UpdateStats: cannot scan RELATION relation"); elog(ABORT, "UpdateStats: cannot scan RELATION relation");
} }
/* if the heap_open above succeeded, then so will this heap_getnext() */ /* if the heap_open above succeeded, then so will this heap_getnext() */
@ -1784,7 +1784,7 @@ IndexIsUnique(Oid indexId)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "IndexIsUnique: can't find index id %d", elog(ABORT, "IndexIsUnique: can't find index id %d",
indexId); indexId);
} }
index = (IndexTupleForm) GETSTRUCT(tuple); index = (IndexTupleForm) GETSTRUCT(tuple);
@ -1827,7 +1827,7 @@ IndexIsUniqueNoCache(Oid indexId)
tuple = heap_getnext(scandesc, 0, NULL); tuple = heap_getnext(scandesc, 0, NULL);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "IndexIsUniqueNoCache: can't find index id %d", elog(ABORT, "IndexIsUniqueNoCache: can't find index id %d",
indexId); indexId);
} }
index = (IndexTupleForm) GETSTRUCT(tuple); index = (IndexTupleForm) GETSTRUCT(tuple);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.9 1997/09/18 20:20:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.10 1998/01/05 03:30:32 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -84,16 +84,16 @@ AggregateCreate(char *aggName,
/* sanity checks */ /* sanity checks */
if (!aggName) if (!aggName)
elog(WARN, "AggregateCreate: no aggregate name supplied"); elog(ABORT, "AggregateCreate: no aggregate name supplied");
if (!aggtransfn1Name && !aggtransfn2Name) if (!aggtransfn1Name && !aggtransfn2Name)
elog(WARN, "AggregateCreate: aggregate must have at least one transition function"); elog(ABORT, "AggregateCreate: aggregate must have at least one transition function");
tup = SearchSysCacheTuple(TYPNAME, tup = SearchSysCacheTuple(TYPNAME,
PointerGetDatum(aggbasetypeName), PointerGetDatum(aggbasetypeName),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: Type '%s' undefined", aggbasetypeName); elog(ABORT, "AggregateCreate: Type '%s' undefined", aggbasetypeName);
xbase = tup->t_oid; xbase = tup->t_oid;
if (aggtransfn1Name) if (aggtransfn1Name)
@ -102,7 +102,7 @@ AggregateCreate(char *aggName,
PointerGetDatum(aggtransfn1typeName), PointerGetDatum(aggtransfn1typeName),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: Type '%s' undefined", elog(ABORT, "AggregateCreate: Type '%s' undefined",
aggtransfn1typeName); aggtransfn1typeName);
xret1 = tup->t_oid; xret1 = tup->t_oid;
@ -114,16 +114,16 @@ AggregateCreate(char *aggName,
PointerGetDatum(fnArgs), PointerGetDatum(fnArgs),
0); 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: '%s('%s', '%s') does not exist", elog(ABORT, "AggregateCreate: '%s('%s', '%s') does not exist",
aggtransfn1Name, aggtransfn1typeName, aggbasetypeName); aggtransfn1Name, aggtransfn1typeName, aggbasetypeName);
if (((Form_pg_proc) GETSTRUCT(tup))->prorettype != xret1) if (((Form_pg_proc) GETSTRUCT(tup))->prorettype != xret1)
elog(WARN, "AggregateCreate: return type of '%s' is not '%s'", elog(ABORT, "AggregateCreate: return type of '%s' is not '%s'",
aggtransfn1Name, aggtransfn1Name,
aggtransfn1typeName); aggtransfn1typeName);
xfn1 = tup->t_oid; xfn1 = tup->t_oid;
if (!OidIsValid(xfn1) || !OidIsValid(xret1) || if (!OidIsValid(xfn1) || !OidIsValid(xret1) ||
!OidIsValid(xbase)) !OidIsValid(xbase))
elog(WARN, "AggregateCreate: bogus function '%s'", aggfinalfnName); elog(ABORT, "AggregateCreate: bogus function '%s'", aggfinalfnName);
} }
if (aggtransfn2Name) if (aggtransfn2Name)
@ -132,7 +132,7 @@ AggregateCreate(char *aggName,
PointerGetDatum(aggtransfn2typeName), PointerGetDatum(aggtransfn2typeName),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: Type '%s' undefined", elog(ABORT, "AggregateCreate: Type '%s' undefined",
aggtransfn2typeName); aggtransfn2typeName);
xret2 = tup->t_oid; xret2 = tup->t_oid;
@ -144,30 +144,30 @@ AggregateCreate(char *aggName,
PointerGetDatum(fnArgs), PointerGetDatum(fnArgs),
0); 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: '%s'('%s') does not exist", elog(ABORT, "AggregateCreate: '%s'('%s') does not exist",
aggtransfn2Name, aggtransfn2typeName); aggtransfn2Name, aggtransfn2typeName);
if (((Form_pg_proc) GETSTRUCT(tup))->prorettype != xret2) if (((Form_pg_proc) GETSTRUCT(tup))->prorettype != xret2)
elog(WARN, "AggregateCreate: return type of '%s' is not '%s'", elog(ABORT, "AggregateCreate: return type of '%s' is not '%s'",
aggtransfn2Name, aggtransfn2typeName); aggtransfn2Name, aggtransfn2typeName);
xfn2 = tup->t_oid; xfn2 = tup->t_oid;
if (!OidIsValid(xfn2) || !OidIsValid(xret2)) if (!OidIsValid(xfn2) || !OidIsValid(xret2))
elog(WARN, "AggregateCreate: bogus function '%s'", aggfinalfnName); elog(ABORT, "AggregateCreate: bogus function '%s'", aggfinalfnName);
} }
tup = SearchSysCacheTuple(AGGNAME, PointerGetDatum(aggName), tup = SearchSysCacheTuple(AGGNAME, PointerGetDatum(aggName),
ObjectIdGetDatum(xbase), ObjectIdGetDatum(xbase),
0, 0); 0, 0);
if (HeapTupleIsValid(tup)) if (HeapTupleIsValid(tup))
elog(WARN, elog(ABORT,
"AggregateCreate: aggregate '%s' with base type '%s' already exists", "AggregateCreate: aggregate '%s' with base type '%s' already exists",
aggName, aggbasetypeName); aggName, aggbasetypeName);
/* more sanity checks */ /* more sanity checks */
if (aggtransfn1Name && aggtransfn2Name && !aggfinalfnName) if (aggtransfn1Name && aggtransfn2Name && !aggfinalfnName)
elog(WARN, "AggregateCreate: Aggregate must have final function with both transition functions"); elog(ABORT, "AggregateCreate: Aggregate must have final function with both transition functions");
if ((!aggtransfn1Name || !aggtransfn2Name) && aggfinalfnName) if ((!aggtransfn1Name || !aggtransfn2Name) && aggfinalfnName)
elog(WARN, "AggregateCreate: Aggregate cannot have final function without both transition functions"); elog(ABORT, "AggregateCreate: Aggregate cannot have final function without both transition functions");
if (aggfinalfnName) if (aggfinalfnName)
{ {
@ -179,13 +179,13 @@ AggregateCreate(char *aggName,
PointerGetDatum(fnArgs), PointerGetDatum(fnArgs),
0); 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggregateCreate: '%s'('%s','%s') does not exist", elog(ABORT, "AggregateCreate: '%s'('%s','%s') does not exist",
aggfinalfnName, aggtransfn1typeName, aggtransfn2typeName); aggfinalfnName, aggtransfn1typeName, aggtransfn2typeName);
ffn = tup->t_oid; ffn = tup->t_oid;
proc = (Form_pg_proc) GETSTRUCT(tup); proc = (Form_pg_proc) GETSTRUCT(tup);
fret = proc->prorettype; fret = proc->prorettype;
if (!OidIsValid(ffn) || !OidIsValid(fret)) if (!OidIsValid(ffn) || !OidIsValid(fret))
elog(WARN, "AggregateCreate: bogus function '%s'", aggfinalfnName); elog(ABORT, "AggregateCreate: bogus function '%s'", aggfinalfnName);
} }
/* /*
@ -194,7 +194,7 @@ AggregateCreate(char *aggName,
* aggregates to return NULL if they are evaluated on empty sets. * aggregates to return NULL if they are evaluated on empty sets.
*/ */
if (OidIsValid(xfn2) && !agginitval2) if (OidIsValid(xfn2) && !agginitval2)
elog(WARN, "AggregateCreate: transition function 2 MUST have an initial value"); elog(ABORT, "AggregateCreate: transition function 2 MUST have an initial value");
/* initialize nulls and values */ /* initialize nulls and values */
for (i = 0; i < Natts_pg_aggregate; i++) for (i = 0; i < Natts_pg_aggregate; i++)
@ -253,16 +253,16 @@ AggregateCreate(char *aggName,
nulls[Anum_pg_aggregate_agginitval2 - 1] = 'n'; nulls[Anum_pg_aggregate_agginitval2 - 1] = 'n';
if (!RelationIsValid(aggdesc = heap_openr(AggregateRelationName))) if (!RelationIsValid(aggdesc = heap_openr(AggregateRelationName)))
elog(WARN, "AggregateCreate: could not open '%s'", elog(ABORT, "AggregateCreate: could not open '%s'",
AggregateRelationName); AggregateRelationName);
tupDesc = aggdesc->rd_att; tupDesc = aggdesc->rd_att;
if (!HeapTupleIsValid(tup = heap_formtuple(tupDesc, if (!HeapTupleIsValid(tup = heap_formtuple(tupDesc,
values, values,
nulls))) nulls)))
elog(WARN, "AggregateCreate: heap_formtuple failed"); elog(ABORT, "AggregateCreate: heap_formtuple failed");
if (!OidIsValid(heap_insert(aggdesc, tup))) if (!OidIsValid(heap_insert(aggdesc, tup)))
elog(WARN, "AggregateCreate: heap_insert failed"); elog(ABORT, "AggregateCreate: heap_insert failed");
heap_close(aggdesc); heap_close(aggdesc);
} }
@ -287,7 +287,7 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
PointerGetDatum(basetype), PointerGetDatum(basetype),
0, 0); 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "AggNameGetInitVal: cache lookup failed for aggregate '%s'", elog(ABORT, "AggNameGetInitVal: cache lookup failed for aggregate '%s'",
aggName); aggName);
if (xfuncno == 1) if (xfuncno == 1)
{ {
@ -303,7 +303,7 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
aggRel = heap_openr(AggregateRelationName); aggRel = heap_openr(AggregateRelationName);
if (!RelationIsValid(aggRel)) if (!RelationIsValid(aggRel))
elog(WARN, "AggNameGetInitVal: could not open \"%-.*s\"", elog(ABORT, "AggNameGetInitVal: could not open \"%-.*s\"",
AggregateRelationName); AggregateRelationName);
/* /*
@ -328,7 +328,7 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
{ {
pfree(strInitVal); pfree(strInitVal);
elog(WARN, "AggNameGetInitVal: cache lookup failed on aggregate transition function return type"); elog(ABORT, "AggNameGetInitVal: cache lookup failed on aggregate transition function return type");
} }
initVal = fmgr(((TypeTupleForm) GETSTRUCT(tup))->typinput, strInitVal, -1); initVal = fmgr(((TypeTupleForm) GETSTRUCT(tup))->typinput, strInitVal, -1);
pfree(strInitVal); pfree(strInitVal);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.17 1997/11/25 21:58:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.18 1998/01/05 03:30:32 momjian Exp $
* *
* NOTES * NOTES
* these routines moved here from commands/define.c and somewhat cleaned up. * these routines moved here from commands/define.c and somewhat cleaned up.
@ -171,7 +171,7 @@ OperatorGet(char *operatorName,
leftObjectId = TypeGet(leftTypeName, &leftDefined); leftObjectId = TypeGet(leftTypeName, &leftDefined);
if (!OidIsValid(leftObjectId) || !leftDefined) if (!OidIsValid(leftObjectId) || !leftDefined)
elog(WARN, "OperatorGet: left type '%s' nonexistent", leftTypeName); elog(ABORT, "OperatorGet: left type '%s' nonexistent", leftTypeName);
} }
if (rightTypeName) if (rightTypeName)
@ -179,13 +179,13 @@ OperatorGet(char *operatorName,
rightObjectId = TypeGet(rightTypeName, &rightDefined); rightObjectId = TypeGet(rightTypeName, &rightDefined);
if (!OidIsValid(rightObjectId) || !rightDefined) if (!OidIsValid(rightObjectId) || !rightDefined)
elog(WARN, "OperatorGet: right type '%s' nonexistent", elog(ABORT, "OperatorGet: right type '%s' nonexistent",
rightTypeName); rightTypeName);
} }
if (!((OidIsValid(leftObjectId) && leftDefined) || if (!((OidIsValid(leftObjectId) && leftDefined) ||
(OidIsValid(rightObjectId) && rightDefined))) (OidIsValid(rightObjectId) && rightDefined)))
elog(WARN, "OperatorGet: no argument types??"); elog(ABORT, "OperatorGet: no argument types??");
/* ---------------- /* ----------------
* open the pg_operator relation * open the pg_operator relation
@ -327,7 +327,7 @@ OperatorShellMake(char *operatorName,
if (!((OidIsValid(leftObjectId) && leftDefined) || if (!((OidIsValid(leftObjectId) && leftDefined) ||
(OidIsValid(rightObjectId) && rightDefined))) (OidIsValid(rightObjectId) && rightDefined)))
elog(WARN, "OperatorShellMake: no valid argument types??"); elog(ABORT, "OperatorShellMake: no valid argument types??");
/* ---------------- /* ----------------
* open pg_operator * open pg_operator
@ -494,7 +494,7 @@ OperatorDef(char *operatorName,
rightTypeName); rightTypeName);
if (OidIsValid(operatorObjectId) && !definedOK) if (OidIsValid(operatorObjectId) && !definedOK)
elog(WARN, "OperatorDef: operator \"%s\" already defined", elog(ABORT, "OperatorDef: operator \"%s\" already defined",
operatorName); operatorName);
if (leftTypeName) if (leftTypeName)
@ -505,7 +505,7 @@ OperatorDef(char *operatorName,
if (!((OidIsValid(leftTypeId && leftDefined)) || if (!((OidIsValid(leftTypeId && leftDefined)) ||
(OidIsValid(rightTypeId && rightDefined)))) (OidIsValid(rightTypeId && rightDefined))))
elog(WARN, "OperatorGet: no argument types??"); elog(ABORT, "OperatorGet: no argument types??");
for (i = 0; i < Natts_pg_operator; ++i) for (i = 0; i < Natts_pg_operator; ++i)
{ {
@ -668,7 +668,7 @@ OperatorDef(char *operatorName,
} }
if (!OidIsValid(other_oid)) if (!OidIsValid(other_oid))
elog(WARN, elog(ABORT,
"OperatorDef: can't create operator '%s'", "OperatorDef: can't create operator '%s'",
name[j]); name[j]);
values[i++] = ObjectIdGetDatum(other_oid); values[i++] = ObjectIdGetDatum(other_oid);
@ -719,7 +719,7 @@ OperatorDef(char *operatorName,
setheapoverride(false); setheapoverride(false);
} }
else else
elog(WARN, "OperatorDef: no operator %d", other_oid); elog(ABORT, "OperatorDef: no operator %d", other_oid);
heap_endscan(pg_operator_scan); heap_endscan(pg_operator_scan);
@ -994,7 +994,7 @@ OperatorCreate(char *operatorName,
int definedOK; int definedOK;
if (!leftTypeName && !rightTypeName) if (!leftTypeName && !rightTypeName)
elog(WARN, "OperatorCreate : at least one of leftarg or rightarg must be defined"); elog(ABORT, "OperatorCreate : at least one of leftarg or rightarg must be defined");
/* ---------------- /* ----------------
* get the oid's of the operator's associated operators, if possible. * get the oid's of the operator's associated operators, if possible.

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.11 1997/12/11 17:36:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.12 1998/01/05 03:30:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -87,13 +87,13 @@ ProcedureCreate(char *procedureName,
Value *t = lfirst(x); Value *t = lfirst(x);
if (parameterCount == 8) if (parameterCount == 8)
elog(WARN, "Procedures cannot take more than 8 arguments"); elog(ABORT, "Procedures cannot take more than 8 arguments");
if (strcmp(strVal(t), "opaque") == 0) if (strcmp(strVal(t), "opaque") == 0)
{ {
if (strcmp(languageName, "sql") == 0) if (strcmp(languageName, "sql") == 0)
{ {
elog(WARN, "ProcedureDefine: sql functions cannot take type \"opaque\""); elog(ABORT, "ProcedureDefine: sql functions cannot take type \"opaque\"");
} }
toid = 0; toid = 0;
} }
@ -103,7 +103,7 @@ ProcedureCreate(char *procedureName,
if (!OidIsValid(toid)) if (!OidIsValid(toid))
{ {
elog(WARN, "ProcedureCreate: arg type '%s' is not defined", elog(ABORT, "ProcedureCreate: arg type '%s' is not defined",
strVal(t)); strVal(t));
} }
@ -124,7 +124,7 @@ ProcedureCreate(char *procedureName,
0); 0);
if (HeapTupleIsValid(tup)) if (HeapTupleIsValid(tup))
elog(WARN, "ProcedureCreate: procedure %s already exists with same arguments", elog(ABORT, "ProcedureCreate: procedure %s already exists with same arguments",
procedureName); procedureName);
if (!strcmp(languageName, "sql")) if (!strcmp(languageName, "sql"))
@ -152,7 +152,7 @@ ProcedureCreate(char *procedureName,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
elog(WARN, "ProcedureCreate: no such language %s", elog(ABORT, "ProcedureCreate: no such language %s",
languageName); languageName);
languageObjectId = tup->t_oid; languageObjectId = tup->t_oid;
@ -161,7 +161,7 @@ ProcedureCreate(char *procedureName,
{ {
if (strcmp(languageName, "sql") == 0) if (strcmp(languageName, "sql") == 0)
{ {
elog(WARN, "ProcedureCreate: sql functions cannot return type \"opaque\""); elog(ABORT, "ProcedureCreate: sql functions cannot return type \"opaque\"");
} }
typeObjectId = 0; typeObjectId = 0;
} }
@ -181,7 +181,7 @@ ProcedureCreate(char *procedureName,
typeObjectId = TypeShellMake(returnTypeName); typeObjectId = TypeShellMake(returnTypeName);
if (!OidIsValid(typeObjectId)) if (!OidIsValid(typeObjectId))
{ {
elog(WARN, "ProcedureCreate: could not create type '%s'", elog(ABORT, "ProcedureCreate: could not create type '%s'",
returnTypeName); returnTypeName);
} }
} }
@ -202,7 +202,7 @@ ProcedureCreate(char *procedureName,
defined && defined &&
(relid = typeidTypeRelid(toid)) != 0 && (relid = typeidTypeRelid(toid)) != 0 &&
get_attnum(relid, procedureName) != InvalidAttrNumber) get_attnum(relid, procedureName) != InvalidAttrNumber)
elog(WARN, "method %s already an attribute of type %s", elog(ABORT, "method %s already an attribute of type %s",
procedureName, strVal(lfirst(argList))); procedureName, strVal(lfirst(argList)));

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.15 1997/11/26 04:50:21 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.16 1998/01/05 03:30:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -334,7 +334,7 @@ TypeCreate(char *typeName,
typeObjectId = TypeGet(typeName, &defined); typeObjectId = TypeGet(typeName, &defined);
if (OidIsValid(typeObjectId) && defined) if (OidIsValid(typeObjectId) && defined)
{ {
elog(WARN, "TypeCreate: type %s already defined", typeName); elog(ABORT, "TypeCreate: type %s already defined", typeName);
} }
/* ---------------- /* ----------------
@ -347,7 +347,7 @@ TypeCreate(char *typeName,
elementObjectId = TypeGet(elementTypeName, &defined); elementObjectId = TypeGet(elementTypeName, &defined);
if (!defined) if (!defined)
{ {
elog(WARN, "TypeCreate: type %s is not defined", elementTypeName); elog(ABORT, "TypeCreate: type %s is not defined", elementTypeName);
} }
} }
@ -558,7 +558,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
type_oid = TypeGet(newTypeName, &defined); type_oid = TypeGet(newTypeName, &defined);
if (OidIsValid(type_oid) && defined) if (OidIsValid(type_oid) && defined)
{ {
elog(WARN, "TypeRename: type %s already defined", newTypeName); elog(ABORT, "TypeRename: type %s already defined", newTypeName);
} }
/* get the type tuple from the catalog index scan manager */ /* get the type tuple from the catalog index scan manager */
@ -591,7 +591,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
} }
else else
{ {
elog(WARN, "TypeRename: type %s not defined", oldTypeName); elog(ABORT, "TypeRename: type %s not defined", oldTypeName);
} }
/* finish up */ /* finish up */

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.9 1997/12/11 17:36:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.10 1998/01/05 03:30:58 momjian Exp $
* *
* NOTES * NOTES
* At the point the version is defined, 2 physical relations are created * At the point the version is defined, 2 physical relations are created
@ -195,7 +195,7 @@ setAttrList(char *bname)
rdesc = heap_openr(bname); rdesc = heap_openr(bname);
if (rdesc == NULL) if (rdesc == NULL)
{ {
elog(WARN, "Unable to expand all -- amopenr failed "); elog(ABORT, "Unable to expand all -- amopenr failed ");
return; return;
} }
maxattrs = RelationGetNumberOfAttributes(rdesc); maxattrs = RelationGetNumberOfAttributes(rdesc);

View File

@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.19 1997/11/28 17:26:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.20 1998/01/05 03:30:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -125,7 +125,7 @@ cluster(char oldrelname[], char oldindexname[])
OldHeap = heap_openr(oldrelname); OldHeap = heap_openr(oldrelname);
if (!RelationIsValid(OldHeap)) if (!RelationIsValid(OldHeap))
{ {
elog(WARN, "cluster: unknown relation: \"%s\"", elog(ABORT, "cluster: unknown relation: \"%s\"",
oldrelname); oldrelname);
} }
OIDOldHeap = OldHeap->rd_id;/* Get OID for the index scan */ OIDOldHeap = OldHeap->rd_id;/* Get OID for the index scan */
@ -133,7 +133,7 @@ cluster(char oldrelname[], char oldindexname[])
OldIndex = index_openr(oldindexname); /* Open old index relation */ OldIndex = index_openr(oldindexname); /* Open old index relation */
if (!RelationIsValid(OldIndex)) if (!RelationIsValid(OldIndex))
{ {
elog(WARN, "cluster: unknown index: \"%s\"", elog(ABORT, "cluster: unknown index: \"%s\"",
oldindexname); oldindexname);
} }
OIDOldIndex = OldIndex->rd_id; /* OID for the index scan */ OIDOldIndex = OldIndex->rd_id; /* OID for the index scan */
@ -218,7 +218,7 @@ copy_heap(Oid OIDOldHeap)
OIDNewHeap = heap_create_with_catalog(NewName, tupdesc); OIDNewHeap = heap_create_with_catalog(NewName, tupdesc);
if (!OidIsValid(OIDNewHeap)) if (!OidIsValid(OIDNewHeap))
elog(WARN, "clusterheap: cannot create temporary heap relation\n"); elog(ABORT, "clusterheap: cannot create temporary heap relation\n");
NewHeap = heap_open(OIDNewHeap); NewHeap = heap_open(OIDNewHeap);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.21 1997/11/20 23:21:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.22 1998/01/05 03:30:39 momjian Exp $
* *
* NOTES * NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated * The PortalExecutorHeapMemory crap needs to be eliminated
@ -294,11 +294,11 @@ PerformAddAttribute(char *relationName,
* normally, only the owner of a class can change its schema. * normally, only the owner of a class can change its schema.
*/ */
if (IsSystemRelationName(relationName)) if (IsSystemRelationName(relationName))
elog(WARN, "PerformAddAttribute: class \"%s\" is a system catalog", elog(ABORT, "PerformAddAttribute: class \"%s\" is a system catalog",
relationName); relationName);
#ifndef NO_SECURITY #ifndef NO_SECURITY
if (!pg_ownercheck(userName, relationName, RELNAME)) if (!pg_ownercheck(userName, relationName, RELNAME))
elog(WARN, "PerformAddAttribute: you do not own class \"%s\"", elog(ABORT, "PerformAddAttribute: you do not own class \"%s\"",
relationName); relationName);
#endif #endif
@ -306,9 +306,9 @@ PerformAddAttribute(char *relationName,
* we can't add a not null attribute * we can't add a not null attribute
*/ */
if (colDef->is_not_null) if (colDef->is_not_null)
elog(WARN, "Can't add a NOT NULL attribute to an existing relation"); elog(ABORT, "Can't add a NOT NULL attribute to an existing relation");
if (colDef->defval) if (colDef->defval)
elog(WARN, "ADD ATTRIBUTE: DEFAULT not yet implemented"); elog(ABORT, "ADD ATTRIBUTE: DEFAULT not yet implemented");
/* /*
* if the first element in the 'schema' list is a "*" then we are * if the first element in the 'schema' list is a "*" then we are
@ -331,7 +331,7 @@ PerformAddAttribute(char *relationName,
relrdesc = heap_openr(relationName); relrdesc = heap_openr(relationName);
if (!RelationIsValid(relrdesc)) if (!RelationIsValid(relrdesc))
{ {
elog(WARN, "PerformAddAttribute: unknown relation: \"%s\"", elog(ABORT, "PerformAddAttribute: unknown relation: \"%s\"",
relationName); relationName);
} }
myrelid = relrdesc->rd_id; myrelid = relrdesc->rd_id;
@ -353,7 +353,7 @@ PerformAddAttribute(char *relationName,
relrdesc = heap_open(childrelid); relrdesc = heap_open(childrelid);
if (!RelationIsValid(relrdesc)) if (!RelationIsValid(relrdesc))
{ {
elog(WARN, "PerformAddAttribute: can't find catalog entry for inheriting class with oid %d", elog(ABORT, "PerformAddAttribute: can't find catalog entry for inheriting class with oid %d",
childrelid); childrelid);
} }
PerformAddAttribute((relrdesc->rd_rel->relname).data, PerformAddAttribute((relrdesc->rd_rel->relname).data,
@ -369,7 +369,7 @@ PerformAddAttribute(char *relationName,
if (!PointerIsValid(reltup)) if (!PointerIsValid(reltup))
{ {
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "PerformAddAttribute: relation \"%s\" not found", elog(ABORT, "PerformAddAttribute: relation \"%s\" not found",
relationName); relationName);
} }
@ -378,7 +378,7 @@ PerformAddAttribute(char *relationName,
*/ */
if (((Form_pg_class) GETSTRUCT(reltup))->relkind == RELKIND_INDEX) if (((Form_pg_class) GETSTRUCT(reltup))->relkind == RELKIND_INDEX)
{ {
elog(WARN, "PerformAddAttribute: index relation \"%s\" not changed", elog(ABORT, "PerformAddAttribute: index relation \"%s\" not changed",
relationName); relationName);
return; return;
} }
@ -389,7 +389,7 @@ PerformAddAttribute(char *relationName,
{ {
pfree(reltup); /* XXX temp */ pfree(reltup); /* XXX temp */
heap_close(relrdesc); /* XXX temp */ heap_close(relrdesc); /* XXX temp */
elog(WARN, "PerformAddAttribute: relations limited to %d attributes", elog(ABORT, "PerformAddAttribute: relations limited to %d attributes",
MaxHeapAttributeNumber); MaxHeapAttributeNumber);
return; return;
} }
@ -450,7 +450,7 @@ PerformAddAttribute(char *relationName,
heap_endscan(attsdesc); /* XXX temp */ heap_endscan(attsdesc); /* XXX temp */
heap_close(attrdesc); /* XXX temp */ heap_close(attrdesc); /* XXX temp */
heap_close(relrdesc); /* XXX temp */ heap_close(relrdesc); /* XXX temp */
elog(WARN, "PerformAddAttribute: attribute \"%s\" already exists in class \"%s\"", elog(ABORT, "PerformAddAttribute: attribute \"%s\" already exists in class \"%s\"",
key[1].sk_argument, key[1].sk_argument,
relationName); relationName);
return; return;
@ -478,7 +478,7 @@ PerformAddAttribute(char *relationName,
if (!HeapTupleIsValid(typeTuple)) if (!HeapTupleIsValid(typeTuple))
{ {
elog(WARN, "Add: type \"%s\" nonexistent", p); elog(ABORT, "Add: type \"%s\" nonexistent", p);
} }
namestrcpy(&(attribute->attname), (char *) key[1].sk_argument); namestrcpy(&(attribute->attname), (char *) key[1].sk_argument);
attribute->atttypid = typeTuple->t_oid; attribute->atttypid = typeTuple->t_oid;

View File

@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.35 1997/11/20 23:21:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.36 1998/01/05 03:30:41 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -115,15 +115,15 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
rel = heap_openr(relname); rel = heap_openr(relname);
if (rel == NULL) if (rel == NULL)
elog(WARN, "COPY command failed. Class %s " elog(ABORT, "COPY command failed. Class %s "
"does not exist.", relname); "does not exist.", relname);
result = pg_aclcheck(relname, UserName, required_access); result = pg_aclcheck(relname, UserName, required_access);
if (result != ACLCHECK_OK) if (result != ACLCHECK_OK)
elog(WARN, "%s: %s", relname, aclcheck_error_strings[result]); elog(ABORT, "%s: %s", relname, aclcheck_error_strings[result]);
/* Above should not return */ /* Above should not return */
else if (!superuser() && !pipe) else if (!superuser() && !pipe)
elog(WARN, "You must have Postgres superuser privilege to do a COPY " elog(ABORT, "You must have Postgres superuser privilege to do a COPY "
"directly to or from a file. Anyone can COPY to stdout or " "directly to or from a file. Anyone can COPY to stdout or "
"from stdin. Psql's \\copy command also works for anyone."); "from stdin. Psql's \\copy command also works for anyone.");
/* Above should not return. */ /* Above should not return. */
@ -132,7 +132,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
if (from) if (from)
{ /* copy from file to database */ { /* copy from file to database */
if (rel->rd_rel->relkind == RELKIND_SEQUENCE) if (rel->rd_rel->relkind == RELKIND_SEQUENCE)
elog(WARN, "You can't change sequence relation %s", relname); elog(ABORT, "You can't change sequence relation %s", relname);
if (pipe) if (pipe)
{ {
if (IsUnderPostmaster) if (IsUnderPostmaster)
@ -147,7 +147,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
{ {
fp = AllocateFile(filename, "r"); fp = AllocateFile(filename, "r");
if (fp == NULL) if (fp == NULL)
elog(WARN, "COPY command, running in backend with " elog(ABORT, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for " "effective uid %d, could not open file '%s' for "
"reading. Errno = %s (%d).", "reading. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno); geteuid(), filename, strerror(errno), errno);
@ -175,7 +175,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
fp = AllocateFile(filename, "w"); fp = AllocateFile(filename, "w");
umask(oumask); umask(oumask);
if (fp == NULL) if (fp == NULL)
elog(WARN, "COPY command, running in backend with " elog(ABORT, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for " "effective uid %d, could not open file '%s' for "
"writing. Errno = %s (%d).", "writing. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno); geteuid(), filename, strerror(errno), errno);
@ -560,7 +560,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
{ {
loaded_oid = oidin(string); loaded_oid = oidin(string);
if (loaded_oid < BootstrapObjectIdData) if (loaded_oid < BootstrapObjectIdData)
elog(WARN, "COPY TEXT: Invalid Oid"); elog(ABORT, "COPY TEXT: Invalid Oid");
} }
} }
for (i = 0; i < attr_count && !done; i++) for (i = 0; i < attr_count && !done; i++)
@ -594,10 +594,10 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
!(rel->rd_att->attrs[i]->attbyval)) !(rel->rd_att->attrs[i]->attbyval))
{ {
#ifdef COPY_DEBUG #ifdef COPY_DEBUG
elog(WARN, elog(ABORT,
"copy from: line %d - Bad file format", lineno); "copy from: line %d - Bad file format", lineno);
#else #else
elog(WARN, "copy from: Bad file format"); elog(ABORT, "copy from: Bad file format");
#endif #endif
} }
} }
@ -622,7 +622,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
{ {
fread(&loaded_oid, sizeof(int32), 1, fp); fread(&loaded_oid, sizeof(int32), 1, fp);
if (loaded_oid < BootstrapObjectIdData) if (loaded_oid < BootstrapObjectIdData)
elog(WARN, "COPY BINARY: Invalid Oid"); elog(ABORT, "COPY BINARY: Invalid Oid");
} }
fread(&null_ct, sizeof(int32), 1, fp); fread(&null_ct, sizeof(int32), 1, fp);
if (null_ct > 0) if (null_ct > 0)
@ -661,7 +661,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
ptr += sizeof(int32); ptr += sizeof(int32);
break; break;
default: default:
elog(WARN, "COPY BINARY: impossible size!"); elog(ABORT, "COPY BINARY: impossible size!");
break; break;
} }
} }
@ -837,7 +837,7 @@ GetOutputFunction(Oid type)
if (HeapTupleIsValid(typeTuple)) if (HeapTupleIsValid(typeTuple))
return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput); return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
elog(WARN, "GetOutputFunction: Cache lookup of type %d failed", type); elog(ABORT, "GetOutputFunction: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }
@ -854,7 +854,7 @@ GetTypeElement(Oid type)
if (HeapTupleIsValid(typeTuple)) if (HeapTupleIsValid(typeTuple))
return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem); return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
elog(WARN, "GetOutputFunction: Cache lookup of type %d failed", type); elog(ABORT, "GetOutputFunction: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }
@ -870,7 +870,7 @@ GetInputFunction(Oid type)
if (HeapTupleIsValid(typeTuple)) if (HeapTupleIsValid(typeTuple))
return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typinput); return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typinput);
elog(WARN, "GetInputFunction: Cache lookup of type %d failed", type); elog(ABORT, "GetInputFunction: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }
@ -886,7 +886,7 @@ IsTypeByVal(Oid type)
if (HeapTupleIsValid(typeTuple)) if (HeapTupleIsValid(typeTuple))
return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typbyval); return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typbyval);
elog(WARN, "GetInputFunction: Cache lookup of type %d failed", type); elog(ABORT, "GetInputFunction: Cache lookup of type %d failed", type);
return (InvalidOid); return (InvalidOid);
} }
@ -1125,7 +1125,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
case '.': case '.':
c = getc(fp); c = getc(fp);
if (c != '\n') if (c != '\n')
elog(WARN, "CopyReadAttribute - end of record marker corrupted"); elog(ABORT, "CopyReadAttribute - end of record marker corrupted");
return (NULL); return (NULL);
break; break;
} }
@ -1143,7 +1143,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
if (!done) if (!done)
attribute[i++] = c; attribute[i++] = c;
if (i == EXT_ATTLEN - 1) if (i == EXT_ATTLEN - 1)
elog(WARN, "CopyReadAttribute - attribute length too long"); elog(ABORT, "CopyReadAttribute - attribute length too long");
} }
attribute[i] = '\0'; attribute[i] = '\0';
return (&attribute[0]); return (&attribute[0]);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.22 1997/12/04 23:15:28 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.23 1998/01/05 03:30:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ DefineRelation(CreateStmt *stmt)
List *constraints; List *constraints;
if (strlen(stmt->relname) >= NAMEDATALEN) if (strlen(stmt->relname) >= NAMEDATALEN)
elog(WARN, "the relation name %s is >= %d characters long", stmt->relname, elog(ABORT, "the relation name %s is >= %d characters long", stmt->relname,
NAMEDATALEN); NAMEDATALEN);
StrNCpy(relname, stmt->relname, NAMEDATALEN); /* make full length for StrNCpy(relname, stmt->relname, NAMEDATALEN); /* make full length for
* copy */ * copy */
@ -78,7 +78,7 @@ DefineRelation(CreateStmt *stmt)
numberOfAttributes = length(schema); numberOfAttributes = length(schema);
if (numberOfAttributes <= 0) if (numberOfAttributes <= 0)
{ {
elog(WARN, "DefineRelation: %s", elog(ABORT, "DefineRelation: %s",
"please inherit from a relation or define an attribute"); "please inherit from a relation or define an attribute");
} }
@ -108,7 +108,7 @@ DefineRelation(CreateStmt *stmt)
for (i = 0; i < ncheck; i++) for (i = 0; i < ncheck; i++)
{ {
if (strcmp(check[i].ccname, cdef->name) == 0) if (strcmp(check[i].ccname, cdef->name) == 0)
elog(WARN, "DefineRelation: name (%s) of CHECK constraint duplicated", cdef->name); elog(ABORT, "DefineRelation: name (%s) of CHECK constraint duplicated", cdef->name);
} }
check[ncheck].ccname = cdef->name; check[ncheck].ccname = cdef->name;
} }
@ -218,7 +218,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
if (!strcmp(coldef->colname, restdef->colname)) if (!strcmp(coldef->colname, restdef->colname))
{ {
elog(WARN, "attribute '%s' duplicated", elog(ABORT, "attribute '%s' duplicated",
coldef->colname); coldef->colname);
} }
} }
@ -231,7 +231,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
{ {
if (!strcmp(strVal(lfirst(entry)), strVal(lfirst(rest)))) if (!strcmp(strVal(lfirst(entry)), strVal(lfirst(rest))))
{ {
elog(WARN, "relation '%s' duplicated", elog(ABORT, "relation '%s' duplicated",
strVal(lfirst(entry))); strVal(lfirst(entry)));
} }
} }
@ -252,12 +252,12 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
relation = heap_openr(name); relation = heap_openr(name);
if (relation == NULL) if (relation == NULL)
{ {
elog(WARN, elog(ABORT,
"MergeAttr: Can't inherit from non-existent superclass '%s'", name); "MergeAttr: Can't inherit from non-existent superclass '%s'", name);
} }
if (relation->rd_rel->relkind == 'S') if (relation->rd_rel->relkind == 'S')
{ {
elog(WARN, "MergeAttr: Can't inherit from sequence superclass '%s'", name); elog(ABORT, "MergeAttr: Can't inherit from sequence superclass '%s'", name);
} }
tupleDesc = RelationGetTupleDescriptor(relation); tupleDesc = RelationGetTupleDescriptor(relation);
constr = tupleDesc->constr; constr = tupleDesc->constr;
@ -567,7 +567,7 @@ checkAttrExists(char *attributeName, char *attributeType, List *schema)
*/ */
if (strcmp(attributeType, def->typename->name) != 0) if (strcmp(attributeType, def->typename->name) != 0)
{ {
elog(WARN, "%s and %s conflict for %s", elog(ABORT, "%s and %s conflict for %s",
attributeType, def->typename->name, attributeName); attributeType, def->typename->name, attributeName);
} }
return 1; return 1;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.3 1997/12/11 17:36:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.4 1998/01/05 03:30:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -75,12 +75,12 @@ createdb(char *dbname, char *dbpath)
lp = ExpandDatabasePath(loc); lp = ExpandDatabasePath(loc);
if (lp == NULL) if (lp == NULL)
elog(WARN,"Unable to locate path '%s'" elog(ABORT,"Unable to locate path '%s'"
"\n\tThis may be due to a missing environment variable" "\n\tThis may be due to a missing environment variable"
" in the server",loc); " in the server",loc);
if (mkdir(lp,S_IRWXU) != 0) if (mkdir(lp,S_IRWXU) != 0)
elog(WARN,"Unable to create database directory %s",lp); elog(ABORT,"Unable to create database directory %s",lp);
sprintf(buf, "%s %s%cbase%ctemplate1%c* %s", sprintf(buf, "%s %s%cbase%ctemplate1%c* %s",
COPY_CMD, DataDir, SEP_CHAR, SEP_CHAR, SEP_CHAR, lp); COPY_CMD, DataDir, SEP_CHAR, SEP_CHAR, SEP_CHAR, lp);
@ -123,7 +123,7 @@ destroydb(char *dbname)
path = ExpandDatabasePath(dbpath); path = ExpandDatabasePath(dbpath);
if (path == NULL) if (path == NULL)
elog(WARN,"Unable to locate path '%s'" elog(ABORT,"Unable to locate path '%s'"
"\n\tThis may be due to a missing environment variable" "\n\tThis may be due to a missing environment variable"
" in the server",dbpath); " in the server",dbpath);
@ -161,7 +161,7 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel)
scan = heap_beginscan(dbrel, 0, false, 1, &scanKey); scan = heap_beginscan(dbrel, 0, false, 1, &scanKey);
if (!HeapScanIsValid(scan)) if (!HeapScanIsValid(scan))
elog(WARN, "%s: cannot begin scan of pg_database.", command); elog(ABORT, "%s: cannot begin scan of pg_database.", command);
/* /*
* since we want to return the tuple out of this proc, and we're going * since we want to return the tuple out of this proc, and we're going
@ -185,7 +185,7 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel)
* check_permissions() -- verify that the user is permitted to do this. * check_permissions() -- verify that the user is permitted to do this.
* *
* If the user is not allowed to carry out this operation, this routine * If the user is not allowed to carry out this operation, this routine
* elog(WARN, ...)s, which will abort the xact. As a side effect, the * elog(ABORT, ...)s, which will abort the xact. As a side effect, the
* user's pg_user tuple OID is returned in userIdP and the target database's * user's pg_user tuple OID is returned in userIdP and the target database's
* OID is returned in dbIdP. * OID is returned in dbIdP.
*/ */
@ -218,20 +218,20 @@ check_permissions(char *command,
/* Check to make sure user has permission to use createdb */ /* Check to make sure user has permission to use createdb */
if (!use_createdb) if (!use_createdb)
{ {
elog(WARN, "user \"%s\" is not allowed to create/destroy databases", elog(ABORT, "user \"%s\" is not allowed to create/destroy databases",
userName); userName);
} }
/* Make sure we are not mucking with the template database */ /* Make sure we are not mucking with the template database */
if (!strcmp(dbname, "template1")) if (!strcmp(dbname, "template1"))
{ {
elog(WARN, "%s cannot be executed on the template database.", command); elog(ABORT, "%s cannot be executed on the template database.", command);
} }
/* Check to make sure database is not the currently open database */ /* Check to make sure database is not the currently open database */
if (!strcmp(dbname, GetDatabaseName())) if (!strcmp(dbname, GetDatabaseName()))
{ {
elog(WARN, "%s cannot be executed on an open database", command); elog(ABORT, "%s cannot be executed on an open database", command);
} }
/* Check to make sure database is owned by this user */ /* Check to make sure database is owned by this user */
@ -285,20 +285,20 @@ check_permissions(char *command,
if (dbfound && !strcmp(command, "createdb")) if (dbfound && !strcmp(command, "createdb"))
{ {
elog(WARN, "createdb: database %s already exists.", dbname); elog(ABORT, "createdb: database %s already exists.", dbname);
} }
else if (!dbfound && !strcmp(command, "destroydb")) else if (!dbfound && !strcmp(command, "destroydb"))
{ {
elog(WARN, "destroydb: database %s does not exist.", dbname); elog(ABORT, "destroydb: database %s does not exist.", dbname);
} }
else if (dbfound && !strcmp(command, "destroydb") else if (dbfound && !strcmp(command, "destroydb")
&& dbowner != *userIdP && use_super == false) && dbowner != *userIdP && use_super == false)
{ {
elog(WARN, "%s: database %s is not owned by you.", command, dbname); elog(ABORT, "%s: database %s is not owned by you.", command, dbname);
} }
@ -332,7 +332,7 @@ stop_vacuum(char *dbpath, char *dbname)
FreeFile(fp); FreeFile(fp);
if (kill(pid, SIGKILLDAEMON1) < 0) if (kill(pid, SIGKILLDAEMON1) < 0)
{ {
elog(WARN, "can't kill vacuum daemon (pid %d) on %s", elog(ABORT, "can't kill vacuum daemon (pid %d) on %s",
pid, dbname); pid, dbname);
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.18 1997/12/22 05:41:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.19 1998/01/05 03:30:46 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -95,7 +95,7 @@ DefineIndex(char *heapRelationName,
numberOfAttributes = length(attributeList); numberOfAttributes = length(attributeList);
if (numberOfAttributes <= 0) if (numberOfAttributes <= 0)
{ {
elog(WARN, "DefineIndex: must specify at least one attribute"); elog(ABORT, "DefineIndex: must specify at least one attribute");
} }
/* /*
@ -106,16 +106,16 @@ DefineIndex(char *heapRelationName,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "DefineIndex: %s relation not found", elog(ABORT, "DefineIndex: %s relation not found",
heapRelationName); heapRelationName);
} }
relationId = tuple->t_oid; relationId = tuple->t_oid;
if (unique && strcmp(accessMethodName, "btree") != 0) if (unique && strcmp(accessMethodName, "btree") != 0)
elog(WARN, "DefineIndex: unique indices are only available with the btree access method"); elog(ABORT, "DefineIndex: unique indices are only available with the btree access method");
if (numberOfAttributes > 1 && strcmp(accessMethodName, "btree") != 0) if (numberOfAttributes > 1 && strcmp(accessMethodName, "btree") != 0)
elog(WARN, "DefineIndex: multi-column indices are only available with the btree access method"); elog(ABORT, "DefineIndex: multi-column indices are only available with the btree access method");
/* /*
* compute access method id * compute access method id
@ -124,7 +124,7 @@ DefineIndex(char *heapRelationName,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "DefineIndex: %s access method not found", elog(ABORT, "DefineIndex: %s access method not found",
accessMethodName); accessMethodName);
} }
accessMethodId = tuple->t_oid; accessMethodId = tuple->t_oid;
@ -168,7 +168,7 @@ DefineIndex(char *heapRelationName,
nargs = length(funcIndex->args); nargs = length(funcIndex->args);
if (nargs > INDEX_MAX_KEYS) if (nargs > INDEX_MAX_KEYS)
{ {
elog(WARN, elog(ABORT,
"Too many args to function, limit of %d", "Too many args to function, limit of %d",
INDEX_MAX_KEYS); INDEX_MAX_KEYS);
} }
@ -250,7 +250,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "ExtendIndex: %s index not found", elog(ABORT, "ExtendIndex: %s index not found",
indexRelationName); indexRelationName);
} }
indexId = tuple->t_oid; indexId = tuple->t_oid;
@ -264,7 +264,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "ExtendIndex: %s is not an index", elog(ABORT, "ExtendIndex: %s is not an index",
indexRelationName); indexRelationName);
} }
@ -290,7 +290,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
pfree(predString); pfree(predString);
} }
if (oldPred == NULL) if (oldPred == NULL)
elog(WARN, "ExtendIndex: %s is not a partial index", elog(ABORT, "ExtendIndex: %s is not a partial index",
indexRelationName); indexRelationName);
/* /*
@ -334,7 +334,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
ObjectIdGetDatum(indproc), ObjectIdGetDatum(indproc),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
elog(WARN, "ExtendIndex: index procedure not found"); elog(ABORT, "ExtendIndex: index procedure not found");
namecpy(&(funcInfo->funcName), namecpy(&(funcInfo->funcName),
&(((Form_pg_proc) GETSTRUCT(tuple))->proname)); &(((Form_pg_proc) GETSTRUCT(tuple))->proname));
@ -388,7 +388,7 @@ CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid)
else if (or_clause(predicate) || and_clause(predicate)) else if (or_clause(predicate) || and_clause(predicate))
clauses = ((Expr *) predicate)->args; clauses = ((Expr *) predicate)->args;
else else
elog(WARN, "Unsupported partial-index predicate expression type"); elog(ABORT, "Unsupported partial-index predicate expression type");
foreach(clause, clauses) foreach(clause, clauses)
{ {
@ -409,11 +409,11 @@ CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid)
!IsA(pred_var, Var) || !IsA(pred_var, Var) ||
!IsA(pred_const, Const)) !IsA(pred_const, Const))
{ {
elog(WARN, "Unsupported partial-index predicate clause type"); elog(ABORT, "Unsupported partial-index predicate clause type");
} }
if (getrelid(pred_var->varno, rangeTable) != baseRelOid) if (getrelid(pred_var->varno, rangeTable) != baseRelOid)
elog(WARN, elog(ABORT,
"Partial-index predicates may refer only to the base relation"); "Partial-index predicates may refer only to the base relation");
} }
@ -435,7 +435,7 @@ FuncIndexArgs(IndexElem *funcIndex,
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "DefineIndex: %s class not found", elog(ABORT, "DefineIndex: %s class not found",
funcIndex->class); funcIndex->class);
} }
*opOidP = tuple->t_oid; *opOidP = tuple->t_oid;
@ -457,7 +457,7 @@ FuncIndexArgs(IndexElem *funcIndex,
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, elog(ABORT,
"DefineIndex: attribute \"%s\" not found", "DefineIndex: attribute \"%s\" not found",
arg); arg);
} }
@ -488,7 +488,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
attribute = lfirst(rest); attribute = lfirst(rest);
if (attribute->name == NULL) if (attribute->name == NULL)
elog(WARN, "missing attribute for define index"); elog(ABORT, "missing attribute for define index");
tuple = SearchSysCacheTuple(ATTNAME, tuple = SearchSysCacheTuple(ATTNAME,
ObjectIdGetDatum(relId), ObjectIdGetDatum(relId),
@ -496,7 +496,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
0, 0); 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, elog(ABORT,
"DefineIndex: attribute \"%s\" not found", "DefineIndex: attribute \"%s\" not found",
attribute->name); attribute->name);
} }
@ -510,7 +510,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
attribute->class = GetDefaultOpClass(attform->atttypid); attribute->class = GetDefaultOpClass(attform->atttypid);
if (attribute->class == NULL) if (attribute->class == NULL)
{ {
elog(WARN, elog(ABORT,
"Can't find a default operator class for type %d.", "Can't find a default operator class for type %d.",
attform->atttypid); attform->atttypid);
} }
@ -522,7 +522,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "DefineIndex: %s class not found", elog(ABORT, "DefineIndex: %s class not found",
attribute->class); attribute->class);
} }
*opOidP++ = tuple->t_oid; *opOidP++ = tuple->t_oid;
@ -565,12 +565,12 @@ RemoveIndex(char *name)
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
{ {
elog(WARN, "index \"%s\" nonexistent", name); elog(ABORT, "index \"%s\" nonexistent", name);
} }
if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX) if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX)
{ {
elog(WARN, "relation \"%s\" is of type \"%c\"", elog(ABORT, "relation \"%s\" is of type \"%c\"",
name, name,
((Form_pg_class) GETSTRUCT(tuple))->relkind); ((Form_pg_class) GETSTRUCT(tuple))->relkind);
} }

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.19 1997/12/05 01:12:40 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.20 1998/01/05 03:30:48 momjian Exp $
* *
* DESCRIPTION * DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the * The "DefineFoo" routines take the parse tree and pick out the
@ -140,7 +140,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
* we don't have untrusted functions any more. The 4.2 * we don't have untrusted functions any more. The 4.2
* implementation is lousy anyway so I took it out. -ay 10/94 * implementation is lousy anyway so I took it out. -ay 10/94
*/ */
elog(WARN, "untrusted function has been decommissioned."); elog(ABORT, "untrusted function has been decommissioned.");
} }
else if (strcasecmp(param->name, "byte_pct") == 0) else if (strcasecmp(param->name, "byte_pct") == 0)
{ {
@ -275,7 +275,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
if (!HeapTupleIsValid(languageTuple)) { if (!HeapTupleIsValid(languageTuple)) {
elog(WARN, elog(ABORT,
"Unrecognized language specified in a CREATE FUNCTION: " "Unrecognized language specified in a CREATE FUNCTION: "
"'%s'. Recognized languages are sql, C, internal " "'%s'. Recognized languages are sql, C, internal "
"and the created procedural languages.", "and the created procedural languages.",
@ -285,7 +285,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
/* Check that this language is a PL */ /* Check that this language is a PL */
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
if (!(languageStruct->lanispl)) { if (!(languageStruct->lanispl)) {
elog(WARN, elog(ABORT,
"Language '%s' isn't defined as PL", languageName); "Language '%s' isn't defined as PL", languageName);
} }
@ -294,7 +294,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
* restricted to be defined by postgres superusers only * restricted to be defined by postgres superusers only
*/ */
if (languageStruct->lanpltrusted == false && !superuser()) { if (languageStruct->lanpltrusted == false && !superuser()) {
elog(WARN, "Only users with Postgres superuser privilege " elog(ABORT, "Only users with Postgres superuser privilege "
"are permitted to create a function in the '%s' " "are permitted to create a function in the '%s' "
"language.", "language.",
languageName); languageName);
@ -313,7 +313,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
interpret_AS_clause(languageName, stmt->as, &prosrc_str, &probin_str); interpret_AS_clause(languageName, stmt->as, &prosrc_str, &probin_str);
if (strcmp(languageName, "sql") != 0 && lanisPL == false && !superuser()) if (strcmp(languageName, "sql") != 0 && lanisPL == false && !superuser())
elog(WARN, elog(ABORT,
"Only users with Postgres superuser privilege are permitted " "Only users with Postgres superuser privilege are permitted "
"to create a function " "to create a function "
"in the '%s' language. Others may use the 'sql' language " "in the '%s' language. Others may use the 'sql' language "
@ -388,7 +388,7 @@ DefineOperator(char *oprName,
{ {
/* see gram.y, must be setof */ /* see gram.y, must be setof */
if (nodeTag(defel->arg) == T_TypeName) if (nodeTag(defel->arg) == T_TypeName)
elog(WARN, "setof type not implemented for leftarg"); elog(ABORT, "setof type not implemented for leftarg");
if (nodeTag(defel->arg) == T_String) if (nodeTag(defel->arg) == T_String)
{ {
@ -396,14 +396,14 @@ DefineOperator(char *oprName,
} }
else else
{ {
elog(WARN, "type for leftarg is malformed."); elog(ABORT, "type for leftarg is malformed.");
} }
} }
else if (!strcasecmp(defel->defname, "rightarg")) else if (!strcasecmp(defel->defname, "rightarg"))
{ {
/* see gram.y, must be setof */ /* see gram.y, must be setof */
if (nodeTag(defel->arg) == T_TypeName) if (nodeTag(defel->arg) == T_TypeName)
elog(WARN, "setof type not implemented for rightarg"); elog(ABORT, "setof type not implemented for rightarg");
if (nodeTag(defel->arg) == T_String) if (nodeTag(defel->arg) == T_String)
{ {
@ -411,7 +411,7 @@ DefineOperator(char *oprName,
} }
else else
{ {
elog(WARN, "type for rightarg is malformed."); elog(ABORT, "type for rightarg is malformed.");
} }
} }
else if (!strcasecmp(defel->defname, "procedure")) else if (!strcasecmp(defel->defname, "procedure"))
@ -474,7 +474,7 @@ DefineOperator(char *oprName,
*/ */
if (functionName == NULL) if (functionName == NULL)
{ {
elog(WARN, "Define: \"procedure\" unspecified"); elog(ABORT, "Define: \"procedure\" unspecified");
} }
/* ---------------- /* ----------------
@ -579,16 +579,16 @@ DefineAggregate(char *aggName, List *parameters)
* make sure we have our required definitions * make sure we have our required definitions
*/ */
if (baseType == NULL) if (baseType == NULL)
elog(WARN, "Define: \"basetype\" unspecified"); elog(ABORT, "Define: \"basetype\" unspecified");
if (stepfunc1Name != NULL) if (stepfunc1Name != NULL)
{ {
if (stepfunc1Type == NULL) if (stepfunc1Type == NULL)
elog(WARN, "Define: \"stype1\" unspecified"); elog(ABORT, "Define: \"stype1\" unspecified");
} }
if (stepfunc2Name != NULL) if (stepfunc2Name != NULL)
{ {
if (stepfunc2Type == NULL) if (stepfunc2Type == NULL)
elog(WARN, "Define: \"stype2\" unspecified"); elog(ABORT, "Define: \"stype2\" unspecified");
} }
/* /*
@ -635,7 +635,7 @@ DefineType(char *typeName, List *parameters)
*/ */
if (strlen(typeName) >= (NAMEDATALEN - 1)) if (strlen(typeName) >= (NAMEDATALEN - 1))
{ {
elog(WARN, "DefineType: type names must be %d characters or less", elog(ABORT, "DefineType: type names must be %d characters or less",
NAMEDATALEN - 1); NAMEDATALEN - 1);
} }
@ -699,7 +699,7 @@ DefineType(char *typeName, List *parameters)
} }
else else
{ {
elog(WARN, "DefineType: \"%s\" alignment not recognized", elog(ABORT, "DefineType: \"%s\" alignment not recognized",
a); a);
} }
} }
@ -714,9 +714,9 @@ DefineType(char *typeName, List *parameters)
* make sure we have our required definitions * make sure we have our required definitions
*/ */
if (inputName == NULL) if (inputName == NULL)
elog(WARN, "Define: \"input\" unspecified"); elog(ABORT, "Define: \"input\" unspecified");
if (outputName == NULL) if (outputName == NULL)
elog(WARN, "Define: \"output\" unspecified"); elog(ABORT, "Define: \"output\" unspecified");
/* ---------------- /* ----------------
* now have TypeCreate do all the real work. * now have TypeCreate do all the real work.
@ -766,7 +766,7 @@ static char *
defGetString(DefElem *def) defGetString(DefElem *def)
{ {
if (nodeTag(def->arg) != T_String) if (nodeTag(def->arg) != T_String)
elog(WARN, "Define: \"%s\" = what?", def->defname); elog(ABORT, "Define: \"%s\" = what?", def->defname);
return (strVal(def->arg)); return (strVal(def->arg));
} }
@ -779,6 +779,6 @@ defGetTypeLength(DefElem *def)
!strcasecmp(strVal(def->arg), "variable")) !strcasecmp(strVal(def->arg), "variable"))
return -1; /* variable length */ return -1; /* variable length */
elog(WARN, "Define: \"%s\" = what?", def->defname); elog(ABORT, "Define: \"%s\" = what?", def->defname);
return -1; return -1;
} }

View File

@ -64,7 +64,7 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
*/ */
if (!superuser()) if (!superuser())
{ {
elog(WARN, "Only users with Postgres superuser privilege are " elog(ABORT, "Only users with Postgres superuser privilege are "
"permitted to create procedural languages"); "permitted to create procedural languages");
} }
@ -80,7 +80,7 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
0, 0, 0); 0, 0, 0);
if (HeapTupleIsValid(langTup)) if (HeapTupleIsValid(langTup))
{ {
elog(WARN, "Language %s already exists", languageName); elog(ABORT, "Language %s already exists", languageName);
} }
/* ---------------- /* ----------------
@ -96,12 +96,12 @@ CreateProceduralLanguage(CreatePLangStmt * stmt)
0); 0);
if (!HeapTupleIsValid(procTup)) if (!HeapTupleIsValid(procTup))
{ {
elog(WARN, "PL handler function %s() doesn't exist", elog(ABORT, "PL handler function %s() doesn't exist",
stmt->plhandler); stmt->plhandler);
} }
if (((Form_pg_proc) GETSTRUCT(procTup))->prorettype != InvalidOid) if (((Form_pg_proc) GETSTRUCT(procTup))->prorettype != InvalidOid)
{ {
elog(WARN, "PL handler function %s() isn't of return type Opaque", elog(ABORT, "PL handler function %s() isn't of return type Opaque",
stmt->plhandler); stmt->plhandler);
} }
@ -155,7 +155,7 @@ DropProceduralLanguage(DropPLangStmt * stmt)
*/ */
if (!superuser()) if (!superuser())
{ {
elog(WARN, "Only users with Postgres superuser privilege are " elog(ABORT, "Only users with Postgres superuser privilege are "
"permitted to drop procedural languages"); "permitted to drop procedural languages");
} }
@ -171,12 +171,12 @@ DropProceduralLanguage(DropPLangStmt * stmt)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(langTup)) if (!HeapTupleIsValid(langTup))
{ {
elog(WARN, "Language %s doesn't exist", languageName); elog(ABORT, "Language %s doesn't exist", languageName);
} }
if (!((Form_pg_language) GETSTRUCT(langTup))->lanispl) if (!((Form_pg_language) GETSTRUCT(langTup))->lanispl)
{ {
elog(WARN, "Language %s isn't a created procedural language", elog(ABORT, "Language %s isn't a created procedural language",
languageName); languageName);
} }
@ -195,7 +195,7 @@ DropProceduralLanguage(DropPLangStmt * stmt)
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
{ {
elog(WARN, "Language with name '%s' not found", languageName); elog(ABORT, "Language with name '%s' not found", languageName);
} }
heap_delete(rdesc, &(tup->t_ctid)); heap_delete(rdesc, &(tup->t_ctid));

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.15 1997/11/28 17:27:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.16 1998/01/05 03:30:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -402,7 +402,7 @@ tg_rewriteQuery(TgRecipe * r,
{ {
if (nodeTag(orig->qual) == T_List) if (nodeTag(orig->qual) == T_List)
{ {
elog(WARN, "tg_rewriteQuery: Whoa! why is my qual a List???"); elog(ABORT, "tg_rewriteQuery: Whoa! why is my qual a List???");
} }
orig->qual = tg_rewriteParamsInExpr(orig->qual, inputQlist); orig->qual = tg_rewriteParamsInExpr(orig->qual, inputQlist);
} }
@ -629,7 +629,7 @@ tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
} }
else else
{ {
elog(WARN, "tg_rewriteParamsInExpr:can't substitute for parameter %d when that input is unconnected", p->paramid); elog(ABORT, "tg_rewriteParamsInExpr:can't substitute for parameter %d when that input is unconnected", p->paramid);
} }
} }
@ -719,13 +719,13 @@ getParamTypes(TgElement * elem, Oid typev[])
{ {
if (parameterCount == 8) if (parameterCount == 8)
{ {
elog(WARN, elog(ABORT,
"getParamTypes: Ingredients cannot take > 8 arguments"); "getParamTypes: Ingredients cannot take > 8 arguments");
} }
t = elem->inTypes->val[j]; t = elem->inTypes->val[j];
if (strcmp(t, "opaque") == 0) if (strcmp(t, "opaque") == 0)
{ {
elog(WARN, elog(ABORT,
"getParamTypes: Ingredient functions cannot take type 'opaque'"); "getParamTypes: Ingredient functions cannot take type 'opaque'");
} }
else else
@ -733,7 +733,7 @@ getParamTypes(TgElement * elem, Oid typev[])
toid = TypeGet(elem->inTypes->val[j], &defined); toid = TypeGet(elem->inTypes->val[j], &defined);
if (!OidIsValid(toid)) if (!OidIsValid(toid))
{ {
elog(WARN, "getParamTypes: arg type '%s' is not defined", t); elog(ABORT, "getParamTypes: arg type '%s' is not defined", t);
} }
if (!defined) if (!defined)
{ {

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.18 1997/11/28 17:27:10 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.19 1998/01/05 03:30:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -65,7 +65,7 @@ RemoveOperator(char *operatorName, /* operator name */
typeId1 = TypeGet(typeName1, &defined); typeId1 = TypeGet(typeName1, &defined);
if (!OidIsValid(typeId1)) if (!OidIsValid(typeId1))
{ {
elog(WARN, "RemoveOperator: type '%s' does not exist", typeName1); elog(ABORT, "RemoveOperator: type '%s' does not exist", typeName1);
return; return;
} }
} }
@ -75,7 +75,7 @@ RemoveOperator(char *operatorName, /* operator name */
typeId2 = TypeGet(typeName2, &defined); typeId2 = TypeGet(typeName2, &defined);
if (!OidIsValid(typeId2)) if (!OidIsValid(typeId2))
{ {
elog(WARN, "RemoveOperator: type '%s' does not exist", typeName2); elog(ABORT, "RemoveOperator: type '%s' does not exist", typeName2);
return; return;
} }
} }
@ -105,7 +105,7 @@ RemoveOperator(char *operatorName, /* operator name */
if (!pg_ownercheck(userName, if (!pg_ownercheck(userName,
(char *) ObjectIdGetDatum(tup->t_oid), (char *) ObjectIdGetDatum(tup->t_oid),
OPROID)) OPROID))
elog(WARN, "RemoveOperator: operator '%s': permission denied", elog(ABORT, "RemoveOperator: operator '%s': permission denied",
operatorName); operatorName);
#endif #endif
ItemPointerCopy(&tup->t_ctid, &itemPointerData); ItemPointerCopy(&tup->t_ctid, &itemPointerData);
@ -115,20 +115,20 @@ RemoveOperator(char *operatorName, /* operator name */
{ {
if (OidIsValid(typeId1) && OidIsValid(typeId2)) if (OidIsValid(typeId1) && OidIsValid(typeId2))
{ {
elog(WARN, "RemoveOperator: binary operator '%s' taking '%s' and '%s' does not exist", elog(ABORT, "RemoveOperator: binary operator '%s' taking '%s' and '%s' does not exist",
operatorName, operatorName,
typeName1, typeName1,
typeName2); typeName2);
} }
else if (OidIsValid(typeId1)) else if (OidIsValid(typeId1))
{ {
elog(WARN, "RemoveOperator: right unary operator '%s' taking '%s' does not exist", elog(ABORT, "RemoveOperator: right unary operator '%s' taking '%s' does not exist",
operatorName, operatorName,
typeName1); typeName1);
} }
else else
{ {
elog(WARN, "RemoveOperator: left unary operator '%s' taking '%s' does not exist", elog(ABORT, "RemoveOperator: left unary operator '%s' taking '%s' does not exist",
operatorName, operatorName,
typeName2); typeName2);
} }
@ -272,7 +272,7 @@ RemoveType(char *typeName) /* type name to be removed */
#ifndef NO_SECURITY #ifndef NO_SECURITY
userName = GetPgUserName(); userName = GetPgUserName();
if (!pg_ownercheck(userName, typeName, TYPNAME)) if (!pg_ownercheck(userName, typeName, TYPNAME))
elog(WARN, "RemoveType: type '%s': permission denied", elog(ABORT, "RemoveType: type '%s': permission denied",
typeName); typeName);
#endif #endif
@ -290,7 +290,7 @@ RemoveType(char *typeName) /* type name to be removed */
{ {
heap_endscan(scan); heap_endscan(scan);
heap_close(relation); heap_close(relation);
elog(WARN, "RemoveType: type '%s' does not exist", elog(ABORT, "RemoveType: type '%s' does not exist",
typeName); typeName);
} }
typeOid = tup->t_oid; typeOid = tup->t_oid;
@ -308,7 +308,7 @@ RemoveType(char *typeName) /* type name to be removed */
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
{ {
elog(WARN, "RemoveType: type '%s': array stub not found", elog(ABORT, "RemoveType: type '%s': array stub not found",
typeName); typeName);
} }
typeOid = tup->t_oid; typeOid = tup->t_oid;
@ -364,7 +364,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
if (!HeapTupleIsValid(tup)) if (!HeapTupleIsValid(tup))
{ {
elog(WARN, "RemoveFunction: type '%s' not found", typename); elog(ABORT, "RemoveFunction: type '%s' not found", typename);
} }
argList[i] = tup->t_oid; argList[i] = tup->t_oid;
} }
@ -380,7 +380,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
userName = GetPgUserName(); userName = GetPgUserName();
if (!pg_func_ownercheck(userName, functionName, nargs, argList)) if (!pg_func_ownercheck(userName, functionName, nargs, argList))
{ {
elog(WARN, "RemoveFunction: function '%s': permission denied", elog(ABORT, "RemoveFunction: function '%s': permission denied",
functionName); functionName);
} }
#endif #endif
@ -420,7 +420,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
/* ok, function has been found */ /* ok, function has been found */
if (the_proc->prolang == INTERNALlanguageId) if (the_proc->prolang == INTERNALlanguageId)
elog(WARN, "RemoveFunction: function \"%s\" is built-in", elog(ABORT, "RemoveFunction: function \"%s\" is built-in",
functionName); functionName);
ItemPointerCopy(&tup->t_ctid, &itemPointerData); ItemPointerCopy(&tup->t_ctid, &itemPointerData);
@ -457,7 +457,7 @@ RemoveAggregate(char *aggName, char *aggType)
basetypeID = TypeGet(aggType, &defined); basetypeID = TypeGet(aggType, &defined);
if (!OidIsValid(basetypeID)) if (!OidIsValid(basetypeID))
{ {
elog(WARN, "RemoveAggregate: type '%s' does not exist", aggType); elog(ABORT, "RemoveAggregate: type '%s' does not exist", aggType);
} }
} }
else else
@ -473,12 +473,12 @@ RemoveAggregate(char *aggName, char *aggType)
{ {
if (aggType) if (aggType)
{ {
elog(WARN, "RemoveAggregate: aggregate '%s' on type '%s': permission denied", elog(ABORT, "RemoveAggregate: aggregate '%s' on type '%s': permission denied",
aggName, aggType); aggName, aggType);
} }
else else
{ {
elog(WARN, "RemoveAggregate: aggregate '%s': permission denied", elog(ABORT, "RemoveAggregate: aggregate '%s': permission denied",
aggName); aggName);
} }
} }
@ -505,12 +505,12 @@ RemoveAggregate(char *aggName, char *aggType)
heap_close(relation); heap_close(relation);
if (aggType) if (aggType)
{ {
elog(WARN, "RemoveAggregate: aggregate '%s' for '%s' does not exist", elog(ABORT, "RemoveAggregate: aggregate '%s' for '%s' does not exist",
aggName, aggType); aggName, aggType);
} }
else else
{ {
elog(WARN, "RemoveAggregate: aggregate '%s' for all types does not exist", elog(ABORT, "RemoveAggregate: aggregate '%s' for all types does not exist",
aggName); aggName);
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.9 1997/09/08 02:22:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.10 1998/01/05 03:30:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -81,12 +81,12 @@ renameatt(char *relname,
* normally, only the owner of a class can change its schema. * normally, only the owner of a class can change its schema.
*/ */
if (IsSystemRelationName(relname)) if (IsSystemRelationName(relname))
elog(WARN, "renameatt: class \"%s\" is a system catalog", elog(ABORT, "renameatt: class \"%s\" is a system catalog",
relname); relname);
#ifndef NO_SECURITY #ifndef NO_SECURITY
if (!IsBootstrapProcessingMode() && if (!IsBootstrapProcessingMode() &&
!pg_ownercheck(userName, relname, RELNAME)) !pg_ownercheck(userName, relname, RELNAME))
elog(WARN, "renameatt: you do not own class \"%s\"", elog(ABORT, "renameatt: you do not own class \"%s\"",
relname); relname);
#endif #endif
@ -109,7 +109,7 @@ renameatt(char *relname,
relrdesc = heap_openr(relname); relrdesc = heap_openr(relname);
if (!RelationIsValid(relrdesc)) if (!RelationIsValid(relrdesc))
{ {
elog(WARN, "renameatt: unknown relation: \"%s\"", elog(ABORT, "renameatt: unknown relation: \"%s\"",
relname); relname);
} }
myrelid = relrdesc->rd_id; myrelid = relrdesc->rd_id;
@ -134,7 +134,7 @@ renameatt(char *relname,
relrdesc = heap_open(childrelid); relrdesc = heap_open(childrelid);
if (!RelationIsValid(relrdesc)) if (!RelationIsValid(relrdesc))
{ {
elog(WARN, "renameatt: can't find catalog entry for inheriting class with oid %d", elog(ABORT, "renameatt: can't find catalog entry for inheriting class with oid %d",
childrelid); childrelid);
} }
childname = (relrdesc->rd_rel->relname).data; childname = (relrdesc->rd_rel->relname).data;
@ -149,7 +149,7 @@ renameatt(char *relname,
if (!PointerIsValid(reltup)) if (!PointerIsValid(reltup))
{ {
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "renameatt: relation \"%s\" nonexistent", elog(ABORT, "renameatt: relation \"%s\" nonexistent",
relname); relname);
return; return;
} }
@ -160,12 +160,12 @@ renameatt(char *relname,
if (!PointerIsValid(oldatttup)) if (!PointerIsValid(oldatttup))
{ {
heap_close(attrdesc); heap_close(attrdesc);
elog(WARN, "renameatt: attribute \"%s\" nonexistent", elog(ABORT, "renameatt: attribute \"%s\" nonexistent",
oldattname); oldattname);
} }
if (((AttributeTupleForm) GETSTRUCT(oldatttup))->attnum < 0) if (((AttributeTupleForm) GETSTRUCT(oldatttup))->attnum < 0)
{ {
elog(WARN, "renameatt: system attribute \"%s\" not renamed", elog(ABORT, "renameatt: system attribute \"%s\" not renamed",
oldattname); oldattname);
} }
@ -174,7 +174,7 @@ renameatt(char *relname,
{ {
pfree(oldatttup); pfree(oldatttup);
heap_close(attrdesc); heap_close(attrdesc);
elog(WARN, "renameatt: attribute \"%s\" exists", elog(ABORT, "renameatt: attribute \"%s\" exists",
newattname); newattname);
} }
@ -223,13 +223,13 @@ renamerel(char oldrelname[], char newrelname[])
if (IsSystemRelationName(oldrelname)) if (IsSystemRelationName(oldrelname))
{ {
elog(WARN, "renamerel: system relation \"%s\" not renamed", elog(ABORT, "renamerel: system relation \"%s\" not renamed",
oldrelname); oldrelname);
return; return;
} }
if (IsSystemRelationName(newrelname)) if (IsSystemRelationName(newrelname))
{ {
elog(WARN, "renamerel: Illegal class name: \"%s\" -- pg_ is reserved for system catalogs", elog(ABORT, "renamerel: Illegal class name: \"%s\" -- pg_ is reserved for system catalogs",
newrelname); newrelname);
return; return;
} }
@ -240,7 +240,7 @@ renamerel(char oldrelname[], char newrelname[])
if (!PointerIsValid(oldreltup)) if (!PointerIsValid(oldreltup))
{ {
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "renamerel: relation \"%s\" does not exist", elog(ABORT, "renamerel: relation \"%s\" does not exist",
oldrelname); oldrelname);
} }
@ -249,7 +249,7 @@ renamerel(char oldrelname[], char newrelname[])
{ {
pfree(oldreltup); pfree(oldreltup);
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "renamerel: relation \"%s\" exists", elog(ABORT, "renamerel: relation \"%s\" exists",
newrelname); newrelname);
} }
@ -257,7 +257,7 @@ renamerel(char oldrelname[], char newrelname[])
strcpy(oldpath, relpath(oldrelname)); strcpy(oldpath, relpath(oldrelname));
strcpy(newpath, relpath(newrelname)); strcpy(newpath, relpath(newrelname));
if (rename(oldpath, newpath) < 0) if (rename(oldpath, newpath) < 0)
elog(WARN, "renamerel: unable to rename file: %m"); elog(ABORT, "renamerel: unable to rename file: %m");
memmove((char *) (((Form_pg_class) GETSTRUCT(oldreltup))->relname.data), memmove((char *) (((Form_pg_class) GETSTRUCT(oldreltup))->relname.data),
newrelname, newrelname,

View File

@ -175,7 +175,7 @@ DefineSequence(CreateSeqStmt *seq)
buf = ReadBuffer(rel, P_NEW); buf = ReadBuffer(rel, P_NEW);
if (!BufferIsValid(buf)) if (!BufferIsValid(buf))
elog(WARN, "DefineSequence: ReadBuffer failed"); elog(ABORT, "DefineSequence: ReadBuffer failed");
page = (PageHeader) BufferGetPage(buf); page = (PageHeader) BufferGetPage(buf);
@ -188,7 +188,7 @@ DefineSequence(CreateSeqStmt *seq)
heap_insert(rel, tuple); heap_insert(rel, tuple);
if (WriteBuffer(buf) == STATUS_ERROR) if (WriteBuffer(buf) == STATUS_ERROR)
elog(WARN, "DefineSequence: WriteBuffer failed"); elog(ABORT, "DefineSequence: WriteBuffer failed");
RelationUnsetLockForWrite(rel); RelationUnsetLockForWrite(rel);
heap_close(rel); heap_close(rel);
@ -251,7 +251,7 @@ nextval(struct varlena * seqin)
if (rescnt > 0) if (rescnt > 0)
break; /* stop caching */ break; /* stop caching */
if (seq->is_cycled != 't') if (seq->is_cycled != 't')
elog(WARN, "%s.nextval: got MAXVALUE (%d)", elog(ABORT, "%s.nextval: got MAXVALUE (%d)",
elm->name, maxv); elm->name, maxv);
next = minv; next = minv;
} }
@ -267,7 +267,7 @@ nextval(struct varlena * seqin)
if (rescnt > 0) if (rescnt > 0)
break; /* stop caching */ break; /* stop caching */
if (seq->is_cycled != 't') if (seq->is_cycled != 't')
elog(WARN, "%s.nextval: got MINVALUE (%d)", elog(ABORT, "%s.nextval: got MINVALUE (%d)",
elm->name, minv); elm->name, minv);
next = maxv; next = maxv;
} }
@ -288,7 +288,7 @@ nextval(struct varlena * seqin)
seq->is_called = 't'; seq->is_called = 't';
if (WriteBuffer(buf) == STATUS_ERROR) if (WriteBuffer(buf) == STATUS_ERROR)
elog(WARN, "%s.nextval: WriteBuffer failed", elm->name); elog(ABORT, "%s.nextval: WriteBuffer failed", elm->name);
ItemPointerSet(&iptr, 0, FirstOffsetNumber); ItemPointerSet(&iptr, 0, FirstOffsetNumber);
RelationUnsetSingleWLockPage(elm->rel, &iptr); RelationUnsetSingleWLockPage(elm->rel, &iptr);
@ -311,7 +311,7 @@ currval(struct varlena * seqin)
if (elm->increment == 0) /* nextval/read_info were not called */ if (elm->increment == 0) /* nextval/read_info were not called */
{ {
elog(WARN, "%s.currval is not yet defined in this session", elm->name); elog(ABORT, "%s.currval is not yet defined in this session", elm->name);
} }
result = elm->last; result = elm->last;
@ -334,18 +334,18 @@ read_info(char *caller, SeqTable elm, Buffer *buf)
RelationSetSingleWLockPage(elm->rel, &iptr); RelationSetSingleWLockPage(elm->rel, &iptr);
if (RelationGetNumberOfBlocks(elm->rel) != 1) if (RelationGetNumberOfBlocks(elm->rel) != 1)
elog(WARN, "%s.%s: invalid number of blocks in sequence", elog(ABORT, "%s.%s: invalid number of blocks in sequence",
elm->name, caller); elm->name, caller);
*buf = ReadBuffer(elm->rel, 0); *buf = ReadBuffer(elm->rel, 0);
if (!BufferIsValid(*buf)) if (!BufferIsValid(*buf))
elog(WARN, "%s.%s: ReadBuffer failed", elm->name, caller); elog(ABORT, "%s.%s: ReadBuffer failed", elm->name, caller);
page = (PageHeader) BufferGetPage(*buf); page = (PageHeader) BufferGetPage(*buf);
sm = (sequence_magic *) PageGetSpecialPointer(page); sm = (sequence_magic *) PageGetSpecialPointer(page);
if (sm->magic != SEQ_MAGIC) if (sm->magic != SEQ_MAGIC)
elog(WARN, "%s.%s: bad magic (%08X)", elm->name, caller, sm->magic); elog(ABORT, "%s.%s: bad magic (%08X)", elm->name, caller, sm->magic);
lp = PageGetItemId(page, FirstOffsetNumber); lp = PageGetItemId(page, FirstOffsetNumber);
Assert(ItemIdIsUsed(lp)); Assert(ItemIdIsUsed(lp));
@ -395,12 +395,12 @@ init_sequence(char *caller, char *name)
temp->rel = heap_openr(name); temp->rel = heap_openr(name);
if (!RelationIsValid(temp->rel)) if (!RelationIsValid(temp->rel))
elog(WARN, "%s.%s: sequence does not exist", name, caller); elog(ABORT, "%s.%s: sequence does not exist", name, caller);
RelationSetWIntentLock(temp->rel); RelationSetWIntentLock(temp->rel);
if (temp->rel->rd_rel->relkind != RELKIND_SEQUENCE) if (temp->rel->rd_rel->relkind != RELKIND_SEQUENCE)
elog(WARN, "%s.%s: %s is not sequence !", name, caller, name); elog(ABORT, "%s.%s: %s is not sequence !", name, caller, name);
if (elm != (SeqTable) NULL) /* we opened sequence from our */ if (elm != (SeqTable) NULL) /* we opened sequence from our */
{ /* SeqTable - check relid ! */ { /* SeqTable - check relid ! */
@ -484,18 +484,18 @@ init_params(CreateSeqStmt *seq, SequenceTupleForm new)
else if (!strcasecmp(defel->defname, "cycle")) else if (!strcasecmp(defel->defname, "cycle"))
{ {
if (defel->arg != (Node *) NULL) if (defel->arg != (Node *) NULL)
elog(WARN, "DefineSequence: CYCLE ??"); elog(ABORT, "DefineSequence: CYCLE ??");
new->is_cycled = 't'; new->is_cycled = 't';
} }
else else
elog(WARN, "DefineSequence: option \"%s\" not recognized", elog(ABORT, "DefineSequence: option \"%s\" not recognized",
defel->defname); defel->defname);
} }
if (increment_by == (DefElem *) NULL) /* INCREMENT BY */ if (increment_by == (DefElem *) NULL) /* INCREMENT BY */
new->increment_by = 1; new->increment_by = 1;
else if ((new->increment_by = get_param(increment_by)) == 0) else if ((new->increment_by = get_param(increment_by)) == 0)
elog(WARN, "DefineSequence: can't INCREMENT by 0"); elog(ABORT, "DefineSequence: can't INCREMENT by 0");
if (max_value == (DefElem *) NULL) /* MAXVALUE */ if (max_value == (DefElem *) NULL) /* MAXVALUE */
if (new->increment_by > 0) if (new->increment_by > 0)
@ -514,7 +514,7 @@ init_params(CreateSeqStmt *seq, SequenceTupleForm new)
new->min_value = get_param(min_value); new->min_value = get_param(min_value);
if (new->min_value >= new->max_value) if (new->min_value >= new->max_value)
elog(WARN, "DefineSequence: MINVALUE (%d) can't be >= MAXVALUE (%d)", elog(ABORT, "DefineSequence: MINVALUE (%d) can't be >= MAXVALUE (%d)",
new->min_value, new->max_value); new->min_value, new->max_value);
if (last_value == (DefElem *) NULL) /* START WITH */ if (last_value == (DefElem *) NULL) /* START WITH */
@ -526,16 +526,16 @@ init_params(CreateSeqStmt *seq, SequenceTupleForm new)
new->last_value = get_param(last_value); new->last_value = get_param(last_value);
if (new->last_value < new->min_value) if (new->last_value < new->min_value)
elog(WARN, "DefineSequence: START value (%d) can't be < MINVALUE (%d)", elog(ABORT, "DefineSequence: START value (%d) can't be < MINVALUE (%d)",
new->last_value, new->min_value); new->last_value, new->min_value);
if (new->last_value > new->max_value) if (new->last_value > new->max_value)
elog(WARN, "DefineSequence: START value (%d) can't be > MAXVALUE (%d)", elog(ABORT, "DefineSequence: START value (%d) can't be > MAXVALUE (%d)",
new->last_value, new->max_value); new->last_value, new->max_value);
if (cache_value == (DefElem *) NULL) /* CACHE */ if (cache_value == (DefElem *) NULL) /* CACHE */
new->cache_value = 1; new->cache_value = 1;
else if ((new->cache_value = get_param(cache_value)) <= 0) else if ((new->cache_value = get_param(cache_value)) <= 0)
elog(WARN, "DefineSequence: CACHE (%d) can't be <= 0", elog(ABORT, "DefineSequence: CACHE (%d) can't be <= 0",
new->cache_value); new->cache_value);
} }
@ -545,11 +545,11 @@ static int
get_param(DefElem *def) get_param(DefElem *def)
{ {
if (def->arg == (Node *) NULL) if (def->arg == (Node *) NULL)
elog(WARN, "DefineSequence: \"%s\" value unspecified", def->defname); elog(ABORT, "DefineSequence: \"%s\" value unspecified", def->defname);
if (nodeTag(def->arg) == T_Integer) if (nodeTag(def->arg) == T_Integer)
return (intVal(def->arg)); return (intVal(def->arg));
elog(WARN, "DefineSequence: \"%s\" is to be integer", def->defname); elog(ABORT, "DefineSequence: \"%s\" is to be integer", def->defname);
return (-1); return (-1);
} }

View File

@ -68,16 +68,16 @@ CreateTrigger(CreateTrigStmt * stmt)
int i; int i;
if (IsSystemRelationName(stmt->relname)) if (IsSystemRelationName(stmt->relname))
elog(WARN, "CreateTrigger: can't create trigger for system relation %s", stmt->relname); elog(ABORT, "CreateTrigger: can't create trigger for system relation %s", stmt->relname);
#ifndef NO_SECURITY #ifndef NO_SECURITY
if (!pg_ownercheck(GetPgUserName(), stmt->relname, RELNAME)) if (!pg_ownercheck(GetPgUserName(), stmt->relname, RELNAME))
elog(WARN, "%s: %s", stmt->relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]); elog(ABORT, "%s: %s", stmt->relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
#endif #endif
rel = heap_openr(stmt->relname); rel = heap_openr(stmt->relname);
if (!RelationIsValid(rel)) if (!RelationIsValid(rel))
elog(WARN, "CreateTrigger: there is no relation %s", stmt->relname); elog(ABORT, "CreateTrigger: there is no relation %s", stmt->relname);
RelationSetLockForWrite(rel); RelationSetLockForWrite(rel);
@ -87,7 +87,7 @@ CreateTrigger(CreateTrigStmt * stmt)
if (stmt->row) if (stmt->row)
TRIGGER_SETT_ROW(tgtype); TRIGGER_SETT_ROW(tgtype);
else else
elog(WARN, "CreateTrigger: STATEMENT triggers are unimplemented, yet"); elog(ABORT, "CreateTrigger: STATEMENT triggers are unimplemented, yet");
for (i = 0; i < 3 && stmt->actions[i]; i++) for (i = 0; i < 3 && stmt->actions[i]; i++)
{ {
@ -95,21 +95,21 @@ CreateTrigger(CreateTrigStmt * stmt)
{ {
case 'i': case 'i':
if (TRIGGER_FOR_INSERT(tgtype)) if (TRIGGER_FOR_INSERT(tgtype))
elog(WARN, "CreateTrigger: double INSERT event specified"); elog(ABORT, "CreateTrigger: double INSERT event specified");
TRIGGER_SETT_INSERT(tgtype); TRIGGER_SETT_INSERT(tgtype);
break; break;
case 'd': case 'd':
if (TRIGGER_FOR_DELETE(tgtype)) if (TRIGGER_FOR_DELETE(tgtype))
elog(WARN, "CreateTrigger: double DELETE event specified"); elog(ABORT, "CreateTrigger: double DELETE event specified");
TRIGGER_SETT_DELETE(tgtype); TRIGGER_SETT_DELETE(tgtype);
break; break;
case 'u': case 'u':
if (TRIGGER_FOR_UPDATE(tgtype)) if (TRIGGER_FOR_UPDATE(tgtype))
elog(WARN, "CreateTrigger: double UPDATE event specified"); elog(ABORT, "CreateTrigger: double UPDATE event specified");
TRIGGER_SETT_UPDATE(tgtype); TRIGGER_SETT_UPDATE(tgtype);
break; break;
default: default:
elog(WARN, "CreateTrigger: unknown event specified"); elog(ABORT, "CreateTrigger: unknown event specified");
break; break;
} }
} }
@ -125,7 +125,7 @@ CreateTrigger(CreateTrigStmt * stmt)
Form_pg_trigger pg_trigger = (Form_pg_trigger) GETSTRUCT(tuple); Form_pg_trigger pg_trigger = (Form_pg_trigger) GETSTRUCT(tuple);
if (namestrcmp(&(pg_trigger->tgname), stmt->trigname) == 0) if (namestrcmp(&(pg_trigger->tgname), stmt->trigname) == 0)
elog(WARN, "CreateTrigger: trigger %s already defined on relation %s", elog(ABORT, "CreateTrigger: trigger %s already defined on relation %s",
stmt->trigname, stmt->relname); stmt->trigname, stmt->relname);
else else
found++; found++;
@ -139,7 +139,7 @@ CreateTrigger(CreateTrigStmt * stmt)
if (!HeapTupleIsValid(tuple) || if (!HeapTupleIsValid(tuple) ||
((Form_pg_proc) GETSTRUCT(tuple))->prorettype != 0 || ((Form_pg_proc) GETSTRUCT(tuple))->prorettype != 0 ||
((Form_pg_proc) GETSTRUCT(tuple))->pronargs != 0) ((Form_pg_proc) GETSTRUCT(tuple))->pronargs != 0)
elog(WARN, "CreateTrigger: function %s () does not exist", stmt->funcname); elog(ABORT, "CreateTrigger: function %s () does not exist", stmt->funcname);
if (((Form_pg_proc) GETSTRUCT(tuple))->prolang != ClanguageId) if (((Form_pg_proc) GETSTRUCT(tuple))->prolang != ClanguageId)
{ {
@ -150,12 +150,12 @@ CreateTrigger(CreateTrigStmt * stmt)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(langTup)) if (!HeapTupleIsValid(langTup))
{ {
elog(WARN, "CreateTrigger: cache lookup for PL failed"); elog(ABORT, "CreateTrigger: cache lookup for PL failed");
} }
if (((Form_pg_language) GETSTRUCT(langTup))->lanispl == false) if (((Form_pg_language) GETSTRUCT(langTup))->lanispl == false)
{ {
elog(WARN, "CreateTrigger: only C and PL functions are supported"); elog(ABORT, "CreateTrigger: only C and PL functions are supported");
} }
} }
@ -227,7 +227,7 @@ CreateTrigger(CreateTrigStmt * stmt)
if (!PointerIsValid(tuple)) if (!PointerIsValid(tuple))
{ {
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "CreateTrigger: relation %s not found in pg_class", stmt->relname); elog(ABORT, "CreateTrigger: relation %s not found in pg_class", stmt->relname);
} }
((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1; ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1;
RelationInvalidateHeapTuple(relrdesc, tuple); RelationInvalidateHeapTuple(relrdesc, tuple);
@ -266,12 +266,12 @@ DropTrigger(DropTrigStmt * stmt)
#ifndef NO_SECURITY #ifndef NO_SECURITY
if (!pg_ownercheck(GetPgUserName(), stmt->relname, RELNAME)) if (!pg_ownercheck(GetPgUserName(), stmt->relname, RELNAME))
elog(WARN, "%s: %s", stmt->relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]); elog(ABORT, "%s: %s", stmt->relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
#endif #endif
rel = heap_openr(stmt->relname); rel = heap_openr(stmt->relname);
if (!RelationIsValid(rel)) if (!RelationIsValid(rel))
elog(WARN, "DropTrigger: there is no relation %s", stmt->relname); elog(ABORT, "DropTrigger: there is no relation %s", stmt->relname);
RelationSetLockForWrite(rel); RelationSetLockForWrite(rel);
@ -293,7 +293,7 @@ DropTrigger(DropTrigStmt * stmt)
found++; found++;
} }
if (tgfound == 0) if (tgfound == 0)
elog(WARN, "DropTrigger: there is no trigger %s on relation %s", elog(ABORT, "DropTrigger: there is no trigger %s on relation %s",
stmt->trigname, stmt->relname); stmt->trigname, stmt->relname);
if (tgfound > 1) if (tgfound > 1)
elog(NOTICE, "DropTrigger: found (and deleted) %d trigger %s on relation %s", elog(NOTICE, "DropTrigger: found (and deleted) %d trigger %s on relation %s",
@ -308,7 +308,7 @@ DropTrigger(DropTrigStmt * stmt)
if (!PointerIsValid(tuple)) if (!PointerIsValid(tuple))
{ {
heap_close(relrdesc); heap_close(relrdesc);
elog(WARN, "DropTrigger: relation %s not found in pg_class", stmt->relname); elog(ABORT, "DropTrigger: relation %s not found in pg_class", stmt->relname);
} }
((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found; ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found;
RelationInvalidateHeapTuple(relrdesc, tuple); RelationInvalidateHeapTuple(relrdesc, tuple);
@ -400,7 +400,7 @@ RelationBuildTriggers(Relation relation)
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
continue; continue;
if (found == ntrigs) if (found == ntrigs)
elog(WARN, "RelationBuildTriggers: unexpected record found for rel %.*s", elog(ABORT, "RelationBuildTriggers: unexpected record found for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
pg_trigger = (Form_pg_trigger) GETSTRUCT(tuple); pg_trigger = (Form_pg_trigger) GETSTRUCT(tuple);
@ -422,7 +422,7 @@ RelationBuildTriggers(Relation relation)
Anum_pg_trigger_tgargs, Anum_pg_trigger_tgargs,
tgrel->rd_att, &isnull); tgrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(WARN, "RelationBuildTriggers: tgargs IS NULL for rel %.*s", elog(ABORT, "RelationBuildTriggers: tgargs IS NULL for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
if (build->tgnargs > 0) if (build->tgnargs > 0)
{ {
@ -433,7 +433,7 @@ RelationBuildTriggers(Relation relation)
Anum_pg_trigger_tgargs, Anum_pg_trigger_tgargs,
tgrel->rd_att, &isnull); tgrel->rd_att, &isnull);
if (isnull) if (isnull)
elog(WARN, "RelationBuildTriggers: tgargs IS NULL for rel %.*s", elog(ABORT, "RelationBuildTriggers: tgargs IS NULL for rel %.*s",
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
p = (char *) VARDATA(val); p = (char *) VARDATA(val);
build->tgargs = (char **) palloc(build->tgnargs * sizeof(char *)); build->tgargs = (char **) palloc(build->tgnargs * sizeof(char *));
@ -452,7 +452,7 @@ RelationBuildTriggers(Relation relation)
} }
if (found < ntrigs) if (found < ntrigs)
elog(WARN, "RelationBuildTriggers: %d record not found for rel %.*s", elog(ABORT, "RelationBuildTriggers: %d record not found for rel %.*s",
ntrigs - found, ntrigs - found,
NAMEDATALEN, relation->rd_rel->relname.data); NAMEDATALEN, relation->rd_rel->relname.data);
@ -616,7 +616,7 @@ ExecCallTriggerFunc(Trigger * trigger)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(procTuple)) if (!HeapTupleIsValid(procTuple))
{ {
elog(WARN, "ExecCallTriggerFunc(): Cache lookup for proc %ld failed", elog(ABORT, "ExecCallTriggerFunc(): Cache lookup for proc %ld failed",
ObjectIdGetDatum(trigger->tgfoid)); ObjectIdGetDatum(trigger->tgfoid));
} }
procStruct = (Form_pg_proc) GETSTRUCT(procTuple); procStruct = (Form_pg_proc) GETSTRUCT(procTuple);
@ -626,7 +626,7 @@ ExecCallTriggerFunc(Trigger * trigger)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(langTuple)) if (!HeapTupleIsValid(langTuple))
{ {
elog(WARN, "ExecCallTriggerFunc(): Cache lookup for language %ld failed", elog(ABORT, "ExecCallTriggerFunc(): Cache lookup for language %ld failed",
ObjectIdGetDatum(procStruct->prolang)); ObjectIdGetDatum(procStruct->prolang));
} }
langStruct = (Form_pg_language) GETSTRUCT(langTuple); langStruct = (Form_pg_language) GETSTRUCT(langTuple);
@ -840,7 +840,7 @@ GetTupleForTrigger(Relation relation, ItemPointer tid, bool before)
b = ReadBuffer(relation, ItemPointerGetBlockNumber(tid)); b = ReadBuffer(relation, ItemPointerGetBlockNumber(tid));
if (!BufferIsValid(b)) if (!BufferIsValid(b))
elog(WARN, "GetTupleForTrigger: failed ReadBuffer"); elog(ABORT, "GetTupleForTrigger: failed ReadBuffer");
dp = (PageHeader) BufferGetPage(b); dp = (PageHeader) BufferGetPage(b);
lp = PageGetItemId(dp, ItemPointerGetOffsetNumber(tid)); lp = PageGetItemId(dp, ItemPointerGetOffsetNumber(tid));
@ -863,7 +863,7 @@ GetTupleForTrigger(Relation relation, ItemPointer tid, bool before)
if (!tuple) if (!tuple)
{ {
ReleaseBuffer(b); ReleaseBuffer(b);
elog(WARN, "GetTupleForTrigger: (am)invalid tid"); elog(ABORT, "GetTupleForTrigger: (am)invalid tid");
} }
} }

View File

@ -102,7 +102,7 @@ void DefineUser(CreateUserStmt *stmt) {
pg_user = GetPgUserName(); pg_user = GetPgUserName();
if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR | ACL_AP) != ACLCHECK_OK) { if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR | ACL_AP) != ACLCHECK_OK) {
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "defineUser: user \"%s\" does not have SELECT and INSERT privilege for \"%s\"", elog(ABORT, "defineUser: user \"%s\" does not have SELECT and INSERT privilege for \"%s\"",
pg_user, UserRelationName); pg_user, UserRelationName);
return; return;
} }
@ -135,7 +135,7 @@ void DefineUser(CreateUserStmt *stmt) {
RelationUnsetLockForWrite(pg_user_rel); RelationUnsetLockForWrite(pg_user_rel);
heap_close(pg_user_rel); heap_close(pg_user_rel);
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "defineUser: user \"%s\" has already been created", stmt->user); elog(ABORT, "defineUser: user \"%s\" has already been created", stmt->user);
return; return;
} }
@ -213,7 +213,7 @@ extern void AlterUser(AlterUserStmt *stmt) {
pg_user = GetPgUserName(); pg_user = GetPgUserName();
if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR) != ACLCHECK_OK) { if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR) != ACLCHECK_OK) {
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "alterUser: user \"%s\" does not have SELECT and UPDATE privilege for \"%s\"", elog(ABORT, "alterUser: user \"%s\" does not have SELECT and UPDATE privilege for \"%s\"",
pg_user, UserRelationName); pg_user, UserRelationName);
return; return;
} }
@ -243,7 +243,7 @@ extern void AlterUser(AlterUserStmt *stmt) {
RelationUnsetLockForWrite(pg_user_rel); RelationUnsetLockForWrite(pg_user_rel);
heap_close(pg_user_rel); heap_close(pg_user_rel);
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "alterUser: user \"%s\" does not exist", stmt->user); elog(ABORT, "alterUser: user \"%s\" does not exist", stmt->user);
return; return;
} }
@ -323,7 +323,7 @@ extern void RemoveUser(char* user) {
pg_user = GetPgUserName(); pg_user = GetPgUserName();
if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR) != ACLCHECK_OK) { if (pg_aclcheck(UserRelationName, pg_user, ACL_RD | ACL_WR) != ACLCHECK_OK) {
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "removeUser: user \"%s\" does not have SELECT and DELETE privilege for \"%s\"", elog(ABORT, "removeUser: user \"%s\" does not have SELECT and DELETE privilege for \"%s\"",
pg_user, UserRelationName); pg_user, UserRelationName);
return; return;
} }
@ -355,7 +355,7 @@ extern void RemoveUser(char* user) {
RelationUnsetLockForWrite(pg_user_rel); RelationUnsetLockForWrite(pg_user_rel);
heap_close(pg_user_rel); heap_close(pg_user_rel);
UserAbortTransactionBlock(); UserAbortTransactionBlock();
elog(WARN, "removeUser: user \"%s\" does not exist", user); elog(ABORT, "removeUser: user \"%s\" does not exist", user);
return; return;
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.55 1997/12/19 02:05:33 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.56 1998/01/05 03:30:57 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -185,7 +185,7 @@ vc_init()
int fd; int fd;
if ((fd = open("pg_vlock", O_CREAT | O_EXCL, 0600)) < 0) if ((fd = open("pg_vlock", O_CREAT | O_EXCL, 0600)) < 0)
elog(WARN, "can't create lock file -- another vacuum cleaner running?"); elog(ABORT, "can't create lock file -- another vacuum cleaner running?");
close(fd); close(fd);
@ -207,7 +207,7 @@ vc_shutdown()
{ {
/* on entry, not in a transaction */ /* on entry, not in a transaction */
if (unlink("pg_vlock") < 0) if (unlink("pg_vlock") < 0)
elog(WARN, "vacuum: can't destroy lock file!"); elog(ABORT, "vacuum: can't destroy lock file!");
/* okay, we're done */ /* okay, we're done */
VacuumRunning = false; VacuumRunning = false;
@ -438,7 +438,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
List *le; List *le;
if (length(va_cols) > attr_cnt) if (length(va_cols) > attr_cnt)
elog(WARN, "vacuum: too many attributes specified for relation %s", elog(ABORT, "vacuum: too many attributes specified for relation %s",
(RelationGetRelationName(onerel))->data); (RelationGetRelationName(onerel))->data);
attnums = (int *) palloc(attr_cnt * sizeof(int)); attnums = (int *) palloc(attr_cnt * sizeof(int));
foreach(le, va_cols) foreach(le, va_cols)
@ -454,7 +454,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
attnums[tcnt++] = i; attnums[tcnt++] = i;
else else
{ {
elog(WARN, "vacuum: there is no attribute %s in %s", elog(ABORT, "vacuum: there is no attribute %s in %s",
col, (RelationGetRelationName(onerel))->data); col, (RelationGetRelationName(onerel))->data);
} }
} }
@ -1139,7 +1139,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
InvalidOffsetNumber, LP_USED); InvalidOffsetNumber, LP_USED);
if (newoff == InvalidOffsetNumber) if (newoff == InvalidOffsetNumber)
{ {
elog(WARN, "\ elog(ABORT, "\
failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)", failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
tlen, ToVpd->vpd_blkno, ToVpd->vpd_free, tlen, ToVpd->vpd_blkno, ToVpd->vpd_free,
ToVpd->vpd_nusd, ToVpd->vpd_noff); ToVpd->vpd_nusd, ToVpd->vpd_noff);
@ -1789,7 +1789,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
rsdesc = heap_beginscan(rd, false, false, 1, &rskey); rsdesc = heap_beginscan(rd, false, false, 1, &rskey);
if (!HeapTupleIsValid(rtup = heap_getnext(rsdesc, 0, &rbuf))) if (!HeapTupleIsValid(rtup = heap_getnext(rsdesc, 0, &rbuf)))
elog(WARN, "pg_class entry for relid %d vanished during vacuuming", elog(ABORT, "pg_class entry for relid %d vanished during vacuuming",
relid); relid);
/* overwrite the existing statistics in the tuple */ /* overwrite the existing statistics in the tuple */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.17 1997/11/28 17:27:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.18 1998/01/05 03:30:59 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -89,7 +89,7 @@ DefineVirtualRelation(char *relname, List *tlist)
} }
else else
{ {
elog(WARN, "attempted to define virtual relation with no attrs"); elog(ABORT, "attempted to define virtual relation with no attrs");
} }
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.12 1997/11/28 04:40:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.13 1998/01/05 03:31:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -313,7 +313,7 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
break; break;
default: default:
elog(WARN, "ExecReScan: not a seqscan or indexscan node."); elog(ABORT, "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.35 1997/11/28 17:27:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.36 1998/01/05 03:31:06 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(WARN, "ExecCheckPerms: bogus RT relid: %d", elog(ABORT, "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(WARN, "ExecCheckPerms: bogus operation %d", elog(ABORT, "ExecCheckPerms: bogus operation %d",
operation); operation);
} }
} }
@ -377,7 +377,7 @@ ExecCheckPerms(CmdType operation,
} }
if (!ok) if (!ok)
{ {
elog(WARN, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]); elog(ABORT, "%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(WARN, "You can't change sequence relation %s", elog(ABORT, "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(WARN, "ExecutePlan: NO (junk) `ctid' was found!"); elog(ABORT, "ExecutePlan: NO (junk) `ctid' was found!");
if (isNull) if (isNull)
elog(WARN, "ExecutePlan: (junk) `ctid' is NULL!"); elog(ABORT, "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(WARN, "%s: Fail to add null value in not null attribute %s", elog(ABORT, "%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(WARN, "%s: rejected due to CHECK constraint %s", caller, failed); elog(ABORT, "%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.5 1997/09/08 21:42:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.6 1998/01/05 03:31:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -368,7 +368,7 @@ ExecCountSlotsNode(Plan *node)
return ExecCountSlotsTee((Tee *) node); return ExecCountSlotsTee((Tee *) node);
default: default:
elog(WARN, "ExecCountSlotsNode: node not yet supported: %d", elog(ABORT, "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.20 1997/11/26 03:54:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.21 1998/01/05 03:31:11 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -148,7 +148,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
return (Datum) NULL; return (Datum) NULL;
} }
if (i != j) if (i != j)
elog(WARN, elog(ABORT,
"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(WARN, elog(ABORT,
"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(WARN, "ExecEvalParam: invalid paramkind %d", elog(ABORT, "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(WARN, "ExecEvalParam: Unknown value for parameter %s", elog(ABORT, "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(WARN, "GetAttributeByNum: Invalid attribute number"); elog(ABORT, "GetAttributeByNum: Invalid attribute number");
if (!AttrNumberIsForUserDefinedAttr(attrno)) if (!AttrNumberIsForUserDefinedAttr(attrno))
elog(WARN, "GetAttributeByNum: cannot access system attributes here"); elog(ABORT, "GetAttributeByNum: cannot access system attributes here");
if (isNull == (bool *) NULL) if (isNull == (bool *) NULL)
elog(WARN, "GetAttributeByNum: a NULL isNull flag was passed"); elog(ABORT, "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(WARN, "GetAttributeByName: Invalid attribute name"); elog(ABORT, "GetAttributeByName: Invalid attribute name");
if (isNull == (bool *) NULL) if (isNull == (bool *) NULL)
elog(WARN, "GetAttributeByName: a NULL isNull flag was passed"); elog(ABORT, "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(WARN, "GetAttributeByName: attribute %s not found", attname); elog(ABORT, "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(WARN, "ExecMakeFunctionResult: too many arguments"); elog(ABORT, "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(WARN, "ExecEvalExpr: unknown expression type"); elog(ABORT, "ExecEvalExpr: unknown expression type");
break; break;
} }
break; break;
} }
default: default:
elog(WARN, "ExecEvalExpr: unknown expression type"); elog(ABORT, "ExecEvalExpr: unknown expression type");
break; break;
} }

View File

@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.13 1997/12/18 12:53:42 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.14 1998/01/05 03:31:12 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(WARN, "send mail to your local executor guru to fix this"); elog(ABORT, "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(WARN, "NodeGetResultTupleSlot: node not yet supported: %d ", elog(ABORT, "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.21 1997/11/20 23:21:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.22 1998/01/05 03:31:13 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -499,7 +499,7 @@ ExecSetTypeInfo(int index,
*/ */
att = typeInfo[index]; att = typeInfo[index];
if (att == NULL) if (att == NULL)
elog(WARN, "ExecSetTypeInfo: trying to assign through NULL"); elog(ABORT, "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(WARN, "setVarAttrLenForCreateTable: can't get length for variable-length field"); elog(ABORT, "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(WARN, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)", elog(ABORT, "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(WARN, "ExecAgg: agginitval2 is null"); elog(ABORT, "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(WARN, "ExecAgg: Bad Agg->Target for Agg %d", i); elog(ABORT, "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(WARN, "ExecAgg: Bad Agg->Target for Agg %d", i); elog(ABORT, "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(WARN, "ExecAgg: no valid transition functions??"); elog(ABORT, "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(WARN, "ExecAgg: no valid transition functions??"); elog(ABORT, "ExecAgg: no valid transition functions??");
} }
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.13 1997/09/08 21:43:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.14 1998/01/05 03:31:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -90,7 +90,7 @@ ExecHash(Hash *node)
hashtable = node->hashtable; hashtable = node->hashtable;
if (hashtable == NULL) if (hashtable == NULL)
elog(WARN, "ExecHash: hash table is NULL."); elog(ABORT, "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(WARN, "not enough memory for hashjoin."); elog(ABORT, "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(WARN, "can't expand hashtable."); elog(ABORT, "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(WARN, "hash table out of memory. Use -B parameter to increase buffers."); elog(ABORT, "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.11 1997/11/20 23:21:28 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.12 1998/01/05 03:31:18 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(WARN, "ExecInitIndexScan: op not an Oper!"); elog(ABORT, "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(WARN, "ExecInitIndexScan: %s", elog(ABORT, "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(WARN, "ExecInitIndexScan: %s", elog(ABORT, "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(WARN, "ExecInitIndexScan: %s", elog(ABORT, "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.10 1997/09/15 14:27:37 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.11 1998/01/05 03:31:20 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ FormSortKeys(Sort *sortnode)
* ---------------- * ----------------
*/ */
if (keycount <= 0) if (keycount <= 0)
elog(WARN, "FormSortKeys: keycount <= 0"); elog(ABORT, "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.13 1997/11/28 17:27:31 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.14 1998/01/05 03:31:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -329,7 +329,7 @@ ExecTee(Tee *node, Plan *parent)
} }
else else
{ {
elog(WARN, "A Tee node can only be executed from its left or right parent\n"); elog(ABORT, "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.5 1997/09/08 02:23:05 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.6 1998/01/05 03:31:24 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -36,14 +36,14 @@ makeStringInfo()
res = (StringInfo) palloc(sizeof(StringInfoData)); res = (StringInfo) palloc(sizeof(StringInfoData));
if (res == NULL) if (res == NULL)
{ {
elog(WARN, "makeStringInfo: Out of memory!"); elog(ABORT, "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(WARN, elog(ABORT,
"makeStringInfo: Out of memory! (%ld bytes requested)", size); "makeStringInfo: Out of memory! (%ld bytes requested)", size);
} }
res->maxlen = size; res->maxlen = size;
@ -103,7 +103,7 @@ appendStringInfo(StringInfo str, char *buffer)
s = palloc(newlen); s = palloc(newlen);
if (s == NULL) if (s == NULL)
{ {
elog(WARN, elog(ABORT,
"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.17 1997/12/08 04:42:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.18 1998/01/05 03:31:26 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(WARN, "lo_close: large obj descriptor (%d) out of range", fd); elog(ABORT, "lo_close: large obj descriptor (%d) out of range", fd);
return -2; return -2;
} }
if (cookies[fd] == NULL) if (cookies[fd] == NULL)
{ {
elog(WARN, "lo_close: invalid large obj descriptor (%d)", fd); elog(ABORT, "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(WARN, "lo_seek: large obj descriptor (%d) out of range", fd); elog(ABORT, "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(WARN, "lo_tell: large object descriptor (%d) out of range", fd); elog(ABORT, "lo_tell: large object descriptor (%d) out of range", fd);
return -2; return -2;
} }
if (cookies[fd] == NULL) if (cookies[fd] == NULL)
{ {
elog(WARN, "lo_tell: invalid large object descriptor (%d)", fd); elog(ABORT, "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(WARN, "be_lo_import: can't open unix file\"%s\"\n", elog(ABORT, "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(WARN, "lo_import: can't create inv object for \"%s\"", elog(ABORT, "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(WARN, "lo_import: error while reading \"%s\"", elog(ABORT, "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(WARN, "lo_export: can't open inv object %d", elog(ABORT, "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(WARN, "lo_export: can't open unix file\"%s\"", elog(ABORT, "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(WARN, "lo_export: error while writing \"%s\"", elog(ABORT, "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.11 1997/12/12 16:26:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.12 1998/01/05 03:31:28 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -82,7 +82,7 @@ PQfn(int fnid,
} }
else if (args[i].len > sizeof(int4)) else if (args[i].len > sizeof(int4))
{ {
elog(WARN, "arg_length of argument %d too long", i); elog(ABORT, "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(WARN), then PQexec never * Note: if we get a serious error or an elog(ABORT), 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(WARN, "pqtest_PQexec: PQparray could not find portal %s", elog(ABORT, "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.31 1997/12/16 15:58:14 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.32 1998/01/05 03:31:30 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(WARN, "postmaster: StreamConnection: accept: %m"); elog(ABORT, "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(WARN, "postmaster: StreamConnection: getsockname: %m"); elog(ABORT, "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(WARN, "postmaster: getprotobyname failed"); elog(ABORT, "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(WARN, "postmaster: setsockopt failed"); elog(ABORT, "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.10 1997/09/08 21:44:02 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.11 1998/01/05 03:31:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -243,7 +243,7 @@ _equalParam(Param *a, Param *b)
return (true); return (true);
break; break;
default: default:
elog(WARN, "_equalParam: Invalid paramkind value: %d", elog(ABORT, "_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.8 1997/12/19 16:54:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.9 1998/01/05 03:31:38 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(WARN, "tryout to nconc a list to itself"); elog(ABORT, "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.5 1997/09/08 02:23:43 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.6 1998/01/05 03:31:40 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -275,7 +275,7 @@ nodeRead(bool read_car_only)
make_dotted_pair_cell = true; make_dotted_pair_cell = true;
break; break;
default: default:
elog(WARN, "nodeRead: Bad type %d", type); elog(ABORT, "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.12 1997/12/27 06:40:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.13 1998/01/05 03:31:45 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
@ -2034,7 +2034,7 @@ parsePlanString(void)
} }
else else
{ {
elog(WARN, "badly formatted planstring \"%.10s\"...\n", token); elog(ABORT, "badly formatted planstring \"%.10s\"...\n", token);
} }
return ((Node *) return_value); return ((Node *) return_value);
@ -2073,7 +2073,7 @@ readDatum(Oid type)
{ {
if (length > sizeof(Datum)) if (length > sizeof(Datum))
{ {
elog(WARN, "readValue: byval & length = %d", length); elog(ABORT, "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++)
@ -2101,7 +2101,7 @@ readDatum(Oid type)
token = lsptok(NULL, &tokenLength); /* skip the ']' */ token = lsptok(NULL, &tokenLength); /* skip the ']' */
if (token[0] != ']') if (token[0] != ']')
{ {
elog(WARN, "readValue: ']' expected, length =%d", length); elog(ABORT, "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.5 1997/09/08 21:44:16 momjian Exp $ * $Id: geqo_erx.c,v 1.6 1998/01/05 03:31:48 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(WARN, "gimme_gene: Internal error - minimum_count not set"); elog(ABORT, "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(WARN, "gimme_gene: neither shared nor minimum number nor random edge found"); elog(ABORT, "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(WARN, "edge_failure: no edge detected"); elog(ABORT, "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.15 1997/09/08 21:44:19 momjian Exp $ * $Id: geqo_eval.c,v 1.16 1998/01/05 03:31:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -737,6 +737,6 @@ geqo_nth(int stop, List *rels)
return lfirst(r); return lfirst(r);
i++; i++;
} }
elog(WARN, "geqo_nth: Internal error - ran off end of list"); elog(ABORT, "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.5 1997/09/08 21:44:26 momjian Exp $ * $Id: geqo_misc.c,v 1.6 1998/01/05 03:31:51 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(WARN, "avg_pool: pool_size of zero"); elog(ABORT, "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.6 1997/09/08 21:45:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.7 1998/01/05 03:31:54 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(WARN, "called xfunc_predmig with bad inputs"); elog(ABORT, "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(WARN, "Didn't find matching node in original stream"); elog(ABORT, "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(WARN, "bad pointers in stream"); elog(ABORT, "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(WARN, "Joins got reordered!"); elog(ABORT, "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.8 1997/12/23 03:27:23 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.9 1998/01/05 03:31:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -133,7 +133,7 @@ prune_rel_paths(List *rel_list)
rel->size = compute_joinrel_size(cheapest); rel->size = compute_joinrel_size(cheapest);
} }
else else
elog(WARN, "non JoinPath called"); elog(ABORT, "non JoinPath called");
} }
} }

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.9 1997/12/22 05:41:59 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.10 1998/01/05 03:31:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -461,7 +461,7 @@ xfunc_local_expense(LispValue clause)
} }
else else
{ {
elog(WARN, "Clause node of undetermined type"); elog(ABORT, "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(WARN, "Oper's function is undefined"); elog(ABORT, "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(WARN, "Cache lookup failed for procedure %d", funcid); elog(ABORT, "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(WARN, "Cache lookup failed for type %d", elog(ABORT, "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(WARN, "Cache lookup failed for procedure %d", elog(ABORT, "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(WARN, "Clause node of undetermined type"); elog(ABORT, "Clause node of undetermined type");
return (-1); return (-1);
} }
@ -855,7 +855,7 @@ xfunc_find_references(LispValue clause)
} }
else else
{ {
elog(WARN, "Clause node of undetermined type"); elog(ABORT, "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(WARN, "Clause node of undetermined type"); elog(ABORT, "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(WARN, "Cache lookup failed for procedure %d", funcid); elog(ABORT, "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(WARN, "Cache lookup failed for type %d", proc->prorettype); elog(ABORT, "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(WARN, "xfunc_LispRemove: didn't find a match!"); elog(ABORT, "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.20 1997/12/18 12:54:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.21 1998/01/05 03:31:59 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -185,7 +185,7 @@ create_scan_node(Path *best_path, List *tlist)
break; break;
default: default:
elog(WARN, "create_scan_node: unknown node type", elog(ABORT, "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(WARN, "create_join_node: unknown node type", elog(ABORT, "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(WARN, "scanrelid is empty"); elog(ABORT, "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(WARN, "create_plan: index %d not found", elog(ABORT, "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(WARN, "make_temp: unknown temp type %d", temptype); elog(ABORT, "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.13 1997/12/22 05:42:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.14 1998/01/05 03:32:03 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -407,7 +407,7 @@ make_groupPlan(List **tlist,
if (length(glc) != 0) if (length(glc) != 0)
{ {
elog(WARN, "group attribute disappeared from target list"); elog(ABORT, "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.18 1997/12/29 01:12:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.19 1998/01/05 03:32:04 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -279,7 +279,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if (rettype == InvalidOid) if (rettype == InvalidOid)
return; return;
else else
elog(WARN, "return type mismatch in function decl: final query is a catalog utility"); elog(ABORT, "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(WARN, elog(ABORT,
"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(WARN, "can't find return type %d for function\n", rettype); elog(ABORT, "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(WARN, "function declared to return type %s, but final query is not a retrieve", typeTypeName(typ)); elog(ABORT, "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(WARN, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ)); elog(ABORT, "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(WARN, "return type mismatch in function: declared to return %s, returns %s", typeTypeName(typ), typeidTypeName(resnode->restype)); elog(ABORT, "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(WARN, "cannot open relation relid %d", typeTypeRelid(typ)); elog(ABORT, "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(WARN, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ)); elog(ABORT, "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(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
} }
else else
elog(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ABORT, "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(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ)); elog(ABORT, "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.10 1997/12/22 05:42:10 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.11 1998/01/05 03:32:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -201,7 +201,7 @@ set_temp_tlist_references(Temp *temp)
} }
else else
{ {
elog(WARN, "calling set_temp_tlist_references with empty lefttree"); elog(ABORT, "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(WARN, "replace_result_clause: Can not handle this tlist!\n"); elog(ABORT, "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(WARN, "replace_agg_clause: Can not handle this tlist!\n"); elog(ABORT, "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(WARN, "del_agg_clause: Can not handle this tlist!\n"); elog(ABORT, "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.11 1997/11/20 23:22:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.12 1998/01/05 03:32:09 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -77,7 +77,7 @@ relation_info(Query *root, Index relid,
} }
else else
{ {
elog(WARN, "RelationCatalogInformation: Relation %d not found", elog(ABORT, "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(WARN, "index_info: scan not started"); elog(ABORT, "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(WARN, "index_info: no amop %d %d %d", elog(ABORT, "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(WARN, "RestrictionClauseSelectivity: bad pointer"); elog(ABORT, "RestrictionClauseSelectivity: bad pointer");
if (*result < 0.0 || *result > 1.0) if (*result < 0.0 || *result > 1.0)
elog(WARN, "RestrictionClauseSelectivity: bad value %lf", elog(ABORT, "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(WARN, "JoinClauseSelectivity: bad pointer"); elog(ABORT, "JoinClauseSelectivity: bad pointer");
if (*result < 0.0 || *result > 1.0) if (*result < 0.0 || *result > 1.0)
elog(WARN, "JoinClauseSelectivity: bad value %lf", elog(ABORT, "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(WARN, "IndexSelectivity: index %d not found", elog(ABORT, "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(WARN, "IndexSelectivity: index %d not found", elog(ABORT, "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(WARN, "IndexSelectivity: no amop %d %d", elog(ABORT, "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

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.60 1997/12/29 05:13:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.61 1998/01/05 03:32:12 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -478,7 +478,7 @@ printf("transformCreateStmt- found constraint(s) on column %s\n",column->colname
printf("transformCreateStmt- found NOT NULL constraint on column %s\n",column->colname); printf("transformCreateStmt- found NOT NULL constraint on column %s\n",column->colname);
#endif #endif
if (column->is_not_null) if (column->is_not_null)
elog(WARN,"CREATE TABLE/NOT NULL already specified" elog(ERROR,"CREATE TABLE/NOT NULL already specified"
" for %s.%s", stmt->relname, column->colname); " for %s.%s", stmt->relname, column->colname);
column->is_not_null = TRUE; column->is_not_null = TRUE;
break; break;
@ -488,7 +488,7 @@ printf("transformCreateStmt- found NOT NULL constraint on column %s\n",column->c
printf("transformCreateStmt- found DEFAULT clause on column %s\n",column->colname); printf("transformCreateStmt- found DEFAULT clause on column %s\n",column->colname);
#endif #endif
if (column->defval != NULL) if (column->defval != NULL)
elog(WARN,"CREATE TABLE/DEFAULT multiple values specified" elog(ERROR,"CREATE TABLE/DEFAULT multiple values specified"
" for %s.%s", stmt->relname, column->colname); " for %s.%s", stmt->relname, column->colname);
column->defval = constraint->def; column->defval = constraint->def;
break; break;
@ -525,7 +525,7 @@ printf("transformCreateStmt- found CHECK clause on column %s\n",column->colname)
break; break;
default: default:
elog(WARN,"parser: internal error; unrecognized constraint",NULL); elog(ERROR,"parser: internal error; unrecognized constraint",NULL);
break; break;
} }
clist = lnext(clist); clist = lnext(clist);
@ -569,16 +569,16 @@ printf("transformCreateStmt- found CHECK clause\n");
case CONSTR_NOTNULL: case CONSTR_NOTNULL:
case CONSTR_DEFAULT: case CONSTR_DEFAULT:
elog(WARN,"parser: internal error; illegal context for constraint",NULL); elog(ERROR,"parser: internal error; illegal context for constraint",NULL);
break; break;
default: default:
elog(WARN,"parser: internal error; unrecognized constraint",NULL); elog(ERROR,"parser: internal error; unrecognized constraint",NULL);
break; break;
} }
break; break;
default: default:
elog(WARN,"parser: internal error; unrecognized node",NULL); elog(ERROR,"parser: internal error; unrecognized node",NULL);
} }
elements = lnext(elements); elements = lnext(elements);
@ -601,7 +601,7 @@ printf("transformCreateStmt- found CHECK clause\n");
{ {
constraint = lfirst(dlist); constraint = lfirst(dlist);
if (nodeTag(constraint) != T_Constraint) if (nodeTag(constraint) != T_Constraint)
elog(WARN,"parser: internal error; unrecognized deferred node",NULL); elog(ERROR,"parser: internal error; unrecognized deferred node",NULL);
#if PARSEDEBUG #if PARSEDEBUG
printf("transformCreateStmt- found deferred constraint %s\n", printf("transformCreateStmt- found deferred constraint %s\n",
@ -610,12 +610,12 @@ printf("transformCreateStmt- found deferred constraint %s\n",
if (constraint->contype == CONSTR_PRIMARY) if (constraint->contype == CONSTR_PRIMARY)
if (have_pkey) if (have_pkey)
elog(WARN,"CREATE TABLE/PRIMARY KEY multiple primary keys" elog(ERROR,"CREATE TABLE/PRIMARY KEY multiple primary keys"
" for table %s are not legal", stmt->relname); " for table %s are not legal", stmt->relname);
else else
have_pkey = TRUE; have_pkey = TRUE;
else if (constraint->contype != CONSTR_UNIQUE) else if (constraint->contype != CONSTR_UNIQUE)
elog(WARN,"parser: internal error; unrecognized deferred constraint",NULL); elog(ERROR,"parser: internal error; unrecognized deferred constraint",NULL);
#if PARSEDEBUG #if PARSEDEBUG
printf("transformCreateStmt- found deferred %s clause\n", printf("transformCreateStmt- found deferred %s clause\n",
@ -630,7 +630,7 @@ printf("transformCreateStmt- found deferred %s clause\n",
else if (constraint->contype == CONSTR_PRIMARY) else if (constraint->contype == CONSTR_PRIMARY)
{ {
if (have_pkey) if (have_pkey)
elog(WARN,"CREATE TABLE/PRIMARY KEY multiple keys for table %s are not legal", stmt->relname); elog(ERROR,"CREATE TABLE/PRIMARY KEY multiple keys for table %s are not legal", stmt->relname);
have_pkey = TRUE; have_pkey = TRUE;
index->idxname = makeTableName(stmt->relname, "pkey", NULL); index->idxname = makeTableName(stmt->relname, "pkey", NULL);
@ -664,7 +664,7 @@ printf("transformCreateStmt- check column %s for key match\n", column->colname);
columns = lnext(columns); columns = lnext(columns);
} }
if (column == NULL) if (column == NULL)
elog(WARN,"parser: column '%s' in key does not exist",key->name); elog(ERROR,"parser: column '%s' in key does not exist",key->name);
if (constraint->contype == CONSTR_PRIMARY) if (constraint->contype == CONSTR_PRIMARY)
{ {
@ -687,7 +687,7 @@ printf("transformCreateStmt- mark column %s as NOT NULL\n", column->colname);
} }
if (index->idxname == NULL) if (index->idxname == NULL)
elog(WARN,"parser: unable to construct implicit index for table %s" elog(ERROR,"parser: unable to construct implicit index for table %s"
"; name too long", stmt->relname); "; name too long", stmt->relname);
else else
elog(NOTICE,"CREATE TABLE/%s will create implicit index %s for table %s", elog(NOTICE,"CREATE TABLE/%s will create implicit index %s for table %s",

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.83 1998/01/04 04:31:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.84 1998/01/05 03:32:18 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -590,17 +590,17 @@ alter_clause: ADD opt_column columnDef
Node *lp = lfirst($3); Node *lp = lfirst($3);
if (length($3) != 1) if (length($3) != 1)
elog(WARN,"ALTER TABLE/ADD() allows one column only",NULL); elog(ABORT,"ALTER TABLE/ADD() allows one column only",NULL);
$$ = lp; $$ = lp;
} }
| DROP opt_column ColId | DROP opt_column ColId
{ elog(WARN,"ALTER TABLE/DROP COLUMN not yet implemented",NULL); } { elog(ABORT,"ALTER TABLE/DROP COLUMN not yet implemented",NULL); }
| ALTER opt_column ColId SET DEFAULT default_expr | ALTER opt_column ColId SET DEFAULT default_expr
{ elog(WARN,"ALTER TABLE/ALTER COLUMN/SET DEFAULT not yet implemented",NULL); } { elog(ABORT,"ALTER TABLE/ALTER COLUMN/SET DEFAULT not yet implemented",NULL); }
| ALTER opt_column ColId DROP DEFAULT | ALTER opt_column ColId DROP DEFAULT
{ elog(WARN,"ALTER TABLE/ALTER COLUMN/DROP DEFAULT not yet implemented",NULL); } { elog(ABORT,"ALTER TABLE/ALTER COLUMN/DROP DEFAULT not yet implemented",NULL); }
| ADD ConstraintElem | ADD ConstraintElem
{ elog(WARN,"ALTER TABLE/ADD CONSTRAINT not yet implemented",NULL); } { elog(ABORT,"ALTER TABLE/ADD CONSTRAINT not yet implemented",NULL); }
; ;
@ -811,11 +811,11 @@ default_expr: AexprConst
| default_expr '*' default_expr | default_expr '*' default_expr
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); } { $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| default_expr '=' default_expr | default_expr '=' default_expr
{ elog(WARN,"boolean expressions not supported in DEFAULT",NULL); } { elog(ABORT,"boolean expressions not supported in DEFAULT",NULL); }
| default_expr '<' default_expr | default_expr '<' default_expr
{ elog(WARN,"boolean expressions not supported in DEFAULT",NULL); } { elog(ABORT,"boolean expressions not supported in DEFAULT",NULL); }
| default_expr '>' default_expr | default_expr '>' default_expr
{ elog(WARN,"boolean expressions not supported in DEFAULT",NULL); } { elog(ABORT,"boolean expressions not supported in DEFAULT",NULL); }
| ':' default_expr | ':' default_expr
{ $$ = lcons( makeString( ":"), $2); } { $$ = lcons( makeString( ":"), $2); }
| ';' default_expr | ';' default_expr
@ -848,7 +848,7 @@ default_expr: AexprConst
| default_expr Op default_expr | default_expr Op default_expr
{ {
if (!strcmp("<=", $2) || !strcmp(">=", $2)) if (!strcmp("<=", $2) || !strcmp(">=", $2))
elog(WARN,"boolean expressions not supported in DEFAULT",NULL); elog(ABORT,"boolean expressions not supported in DEFAULT",NULL);
$$ = nconc( $1, lcons( makeString( $2), $3)); $$ = nconc( $1, lcons( makeString( $2), $3));
} }
| Op default_expr | Op default_expr
@ -1200,13 +1200,13 @@ TriggerOneEvent: INSERT { $$ = 'i'; }
TriggerForSpec: FOR name name TriggerForSpec: FOR name name
{ {
if ( strcmp ($2, "each") != 0 ) if ( strcmp ($2, "each") != 0 )
elog(WARN,"parser: syntax error near %s",$2); elog(ABORT,"parser: syntax error near %s",$2);
if ( strcmp ($3, "row") == 0 ) if ( strcmp ($3, "row") == 0 )
$$ = TRUE; $$ = TRUE;
else if ( strcmp ($3, "statement") == 0 ) else if ( strcmp ($3, "statement") == 0 )
$$ = FALSE; $$ = FALSE;
else else
elog(WARN,"parser: syntax error near %s",$3); elog(ABORT,"parser: syntax error near %s",$3);
} }
; ;
@ -1379,7 +1379,7 @@ opt_direction: FORWARD { $$ = FORWARD; }
fetch_how_many: Iconst fetch_how_many: Iconst
{ $$ = $1; { $$ = $1;
if ($1 <= 0) elog(WARN,"Please specify nonnegative count for fetch",NULL); } if ($1 <= 0) elog(ABORT,"Please specify nonnegative count for fetch",NULL); }
| ALL { $$ = 0; /* 0 means fetch all tuples*/ } | ALL { $$ = 0; /* 0 means fetch all tuples*/ }
| /*EMPTY*/ { $$ = 1; /*default*/ } | /*EMPTY*/ { $$ = 1; /*default*/ }
; ;
@ -1597,7 +1597,7 @@ RecipeStmt: EXECUTE RECIPE recipe_name
{ {
RecipeStmt *n; RecipeStmt *n;
if (!IsTransactionBlock()) if (!IsTransactionBlock())
elog(WARN,"EXECUTE RECIPE may only be used in begin/end transaction blocks",NULL); elog(ABORT,"EXECUTE RECIPE may only be used in begin/end transaction blocks",NULL);
n = makeNode(RecipeStmt); n = makeNode(RecipeStmt);
n->recipeName = $3; n->recipeName = $3;
@ -1725,7 +1725,7 @@ MathOp: '+' { $$ = "+"; }
oper_argtypes: name oper_argtypes: name
{ {
elog(WARN,"parser: argument type missing (use NONE for unary operators)",NULL); elog(ABORT,"parser: argument type missing (use NONE for unary operators)",NULL);
} }
| name ',' name | name ',' name
{ $$ = makeList(makeString($1), makeString($3), -1); } { $$ = makeList(makeString($1), makeString($3), -1); }
@ -2063,7 +2063,7 @@ VacuumStmt: VACUUM opt_verbose opt_analyze
n->vacrel = $4; n->vacrel = $4;
n->va_spec = $5; n->va_spec = $5;
if ( $5 != NIL && !$4 ) if ( $5 != NIL && !$4 )
elog(WARN,"parser: syntax error at or near \"(\"",NULL); elog(ABORT,"parser: syntax error at or near \"(\"",NULL);
$$ = (Node *)n; $$ = (Node *)n;
} }
; ;
@ -2240,7 +2240,7 @@ CursorStmt: DECLARE name opt_binary CURSOR FOR
* -- mao * -- mao
*/ */
if (!IsTransactionBlock()) if (!IsTransactionBlock())
elog(WARN,"Named portals may only be used in begin/end transaction blocks",NULL); elog(ABORT,"Named portals may only be used in begin/end transaction blocks",NULL);
n->portalname = $2; n->portalname = $2;
n->binary = $3; n->binary = $3;
@ -2444,7 +2444,7 @@ having_clause: HAVING a_expr { $$ = $2; }
from_clause: FROM '(' relation_expr join_expr JOIN relation_expr join_spec ')' from_clause: FROM '(' relation_expr join_expr JOIN relation_expr join_spec ')'
{ {
$$ = NIL; $$ = NIL;
elog(WARN,"JOIN not yet implemented",NULL); elog(ABORT,"JOIN not yet implemented",NULL);
} }
| FROM from_list { $$ = $2; } | FROM from_list { $$ = $2; }
| /*EMPTY*/ { $$ = NIL; } | /*EMPTY*/ { $$ = NIL; }
@ -2453,7 +2453,7 @@ from_clause: FROM '(' relation_expr join_expr JOIN relation_expr join_spec ')'
from_list: from_list ',' from_val from_list: from_list ',' from_val
{ $$ = lappend($1, $3); } { $$ = lappend($1, $3); }
| from_val CROSS JOIN from_val | from_val CROSS JOIN from_val
{ elog(WARN,"CROSS JOIN not yet implemented",NULL); } { elog(ABORT,"CROSS JOIN not yet implemented",NULL); }
| from_val | from_val
{ $$ = lcons($1, NIL); } { $$ = lcons($1, NIL); }
; ;
@ -2480,19 +2480,19 @@ from_val: relation_expr AS ColLabel
join_expr: NATURAL join_expr { $$ = NULL; } join_expr: NATURAL join_expr { $$ = NULL; }
| FULL join_outer | FULL join_outer
{ elog(WARN,"FULL OUTER JOIN not yet implemented",NULL); } { elog(ABORT,"FULL OUTER JOIN not yet implemented",NULL); }
| LEFT join_outer | LEFT join_outer
{ elog(WARN,"LEFT OUTER JOIN not yet implemented",NULL); } { elog(ABORT,"LEFT OUTER JOIN not yet implemented",NULL); }
| RIGHT join_outer | RIGHT join_outer
{ elog(WARN,"RIGHT OUTER JOIN not yet implemented",NULL); } { elog(ABORT,"RIGHT OUTER JOIN not yet implemented",NULL); }
| OUTER_P | OUTER_P
{ elog(WARN,"OUTER JOIN not yet implemented",NULL); } { elog(ABORT,"OUTER JOIN not yet implemented",NULL); }
| INNER_P | INNER_P
{ elog(WARN,"INNER JOIN not yet implemented",NULL); } { elog(ABORT,"INNER JOIN not yet implemented",NULL); }
| UNION | UNION
{ elog(WARN,"UNION JOIN not yet implemented",NULL); } { elog(ABORT,"UNION JOIN not yet implemented",NULL); }
| /*EMPTY*/ | /*EMPTY*/
{ elog(WARN,"INNER JOIN not yet implemented",NULL); } { elog(ABORT,"INNER JOIN not yet implemented",NULL); }
; ;
join_outer: OUTER_P { $$ = NULL; } join_outer: OUTER_P { $$ = NULL; }
@ -2653,13 +2653,13 @@ Numeric: FLOAT opt_float
opt_float: '(' Iconst ')' opt_float: '(' Iconst ')'
{ {
if ($2 < 1) if ($2 < 1)
elog(WARN,"precision for FLOAT must be at least 1",NULL); elog(ABORT,"precision for FLOAT must be at least 1",NULL);
else if ($2 < 7) else if ($2 < 7)
$$ = xlateSqlType("float4"); $$ = xlateSqlType("float4");
else if ($2 < 16) else if ($2 < 16)
$$ = xlateSqlType("float8"); $$ = xlateSqlType("float8");
else else
elog(WARN,"precision for FLOAT must be less than 16",NULL); elog(ABORT,"precision for FLOAT must be less than 16",NULL);
} }
| /*EMPTY*/ | /*EMPTY*/
{ {
@ -2670,14 +2670,14 @@ opt_float: '(' Iconst ')'
opt_numeric: '(' Iconst ',' Iconst ')' opt_numeric: '(' Iconst ',' Iconst ')'
{ {
if ($2 != 9) if ($2 != 9)
elog(WARN,"NUMERIC precision %d must be 9",$2); elog(ABORT,"NUMERIC precision %d must be 9",$2);
if ($4 != 0) if ($4 != 0)
elog(WARN,"NUMERIC scale %d must be zero",$4); elog(ABORT,"NUMERIC scale %d must be zero",$4);
} }
| '(' Iconst ')' | '(' Iconst ')'
{ {
if ($2 != 9) if ($2 != 9)
elog(WARN,"NUMERIC precision %d must be 9",$2); elog(ABORT,"NUMERIC precision %d must be 9",$2);
} }
| /*EMPTY*/ | /*EMPTY*/
{ {
@ -2688,15 +2688,15 @@ opt_numeric: '(' Iconst ',' Iconst ')'
opt_decimal: '(' Iconst ',' Iconst ')' opt_decimal: '(' Iconst ',' Iconst ')'
{ {
if ($2 > 9) if ($2 > 9)
elog(WARN,"DECIMAL precision %d exceeds implementation limit of 9",$2); elog(ABORT,"DECIMAL precision %d exceeds implementation limit of 9",$2);
if ($4 != 0) if ($4 != 0)
elog(WARN,"DECIMAL scale %d must be zero",$4); elog(ABORT,"DECIMAL scale %d must be zero",$4);
$$ = NULL; $$ = NULL;
} }
| '(' Iconst ')' | '(' Iconst ')'
{ {
if ($2 > 9) if ($2 > 9)
elog(WARN,"DECIMAL precision %d exceeds implementation limit of 9",$2); elog(ABORT,"DECIMAL precision %d exceeds implementation limit of 9",$2);
$$ = NULL; $$ = NULL;
} }
| /*EMPTY*/ | /*EMPTY*/
@ -2722,14 +2722,14 @@ Character: character '(' Iconst ')'
else else
yyerror("parse error"); yyerror("parse error");
if ($3 < 1) if ($3 < 1)
elog(WARN,"length for '%s' type must be at least 1",$1); elog(ABORT,"length for '%s' type must be at least 1",$1);
else if ($3 > 4096) else if ($3 > 4096)
/* we can store a char() of length up to the size /* we can store a char() of length up to the size
* of a page (8KB) - page headers and friends but * of a page (8KB) - page headers and friends but
* just to be safe here... - ay 6/95 * just to be safe here... - ay 6/95
* XXX note this hardcoded limit - thomas 1997-07-13 * XXX note this hardcoded limit - thomas 1997-07-13
*/ */
elog(WARN,"length for type '%s' cannot exceed 4096",$1); elog(ABORT,"length for type '%s' cannot exceed 4096",$1);
/* we actually implement this sort of like a varlen, so /* we actually implement this sort of like a varlen, so
* the first 4 bytes is the length. (the difference * the first 4 bytes is the length. (the difference
@ -2762,7 +2762,7 @@ character: CHARACTER opt_varying opt_charset opt_collate
} }
}; };
if ($4 != NULL) if ($4 != NULL)
elog(WARN,"COLLATE %s not yet implemented",$4); elog(ABORT,"COLLATE %s not yet implemented",$4);
$$ = type; $$ = type;
} }
| CHAR opt_varying { $$ = xlateSqlType($2? "varchar": "char"); } | CHAR opt_varying { $$ = xlateSqlType($2? "varchar": "char"); }
@ -3098,7 +3098,7 @@ a_expr: attr opt_indirection
*/ */
| EXISTS '(' SubSelect ')' | EXISTS '(' SubSelect ')'
{ {
elog(WARN,"EXISTS not yet implemented",NULL); elog(ABORT,"EXISTS not yet implemented",NULL);
$$ = $3; $$ = $3;
} }
| EXTRACT '(' extract_list ')' | EXTRACT '(' extract_list ')'
@ -3428,7 +3428,7 @@ trim_list: a_expr FROM expr_list
in_expr: SubSelect in_expr: SubSelect
{ {
elog(WARN,"IN (SUBSELECT) not yet implemented",NULL); elog(ABORT,"IN (SUBSELECT) not yet implemented",NULL);
$$ = $1; $$ = $1;
} }
| in_expr_nodes | in_expr_nodes
@ -3445,7 +3445,7 @@ in_expr_nodes: AexprConst
not_in_expr: SubSelect not_in_expr: SubSelect
{ {
elog(WARN,"NOT IN (SUBSELECT) not yet implemented",NULL); elog(ABORT,"NOT IN (SUBSELECT) not yet implemented",NULL);
$$ = $1; $$ = $1;
} }
| not_in_expr_nodes | not_in_expr_nodes
@ -3606,7 +3606,7 @@ relation_name: SpecialRuleRelation
/* disallow refs to variable system tables */ /* disallow refs to variable system tables */
if (strcmp(LogRelationName, $1) == 0 if (strcmp(LogRelationName, $1) == 0
|| strcmp(VariableRelationName, $1) == 0) || strcmp(VariableRelationName, $1) == 0)
elog(WARN,"%s cannot be accessed by users",$1); elog(ABORT,"%s cannot be accessed by users",$1);
else else
$$ = $1; $$ = $1;
StrNCpy(saved_relname, $1, NAMEDATALEN); StrNCpy(saved_relname, $1, NAMEDATALEN);
@ -3765,14 +3765,14 @@ SpecialRuleRelation: CURRENT
if (QueryIsRule) if (QueryIsRule)
$$ = "*CURRENT*"; $$ = "*CURRENT*";
else else
elog(WARN,"CURRENT used in non-rule query",NULL); elog(ABORT,"CURRENT used in non-rule query",NULL);
} }
| NEW | NEW
{ {
if (QueryIsRule) if (QueryIsRule)
$$ = "*NEW*"; $$ = "*NEW*";
else else
elog(WARN,"NEW used in non-rule query",NULL); elog(ABORT,"NEW used in non-rule query",NULL);
} }
; ;
@ -3800,7 +3800,7 @@ makeRowExpr(char *opr, List *largs, List *rargs)
Node *larg, *rarg; Node *larg, *rarg;
if (length(largs) != length(rargs)) if (length(largs) != length(rargs))
elog(WARN,"Unequal number of entries in row expression",NULL); elog(ABORT,"Unequal number of entries in row expression",NULL);
if (lnext(largs) != NIL) if (lnext(largs) != NIL)
expr = makeRowExpr(opr,lnext(largs),lnext(rargs)); expr = makeRowExpr(opr,lnext(largs),lnext(rargs));
@ -3828,7 +3828,7 @@ makeRowExpr(char *opr, List *largs, List *rargs)
} }
else else
{ {
elog(WARN,"Operator '%s' not implemented for row expressions",opr); elog(ABORT,"Operator '%s' not implemented for row expressions",opr);
} }
#if FALSE #if FALSE
@ -3858,7 +3858,7 @@ mapTargetColumns(List *src, List *dst)
ResTarget *d; ResTarget *d;
if (length(src) != length(dst)) if (length(src) != length(dst))
elog(WARN,"CREATE TABLE/AS SELECT has mismatched column count",NULL); elog(ABORT,"CREATE TABLE/AS SELECT has mismatched column count",NULL);
while ((src != NIL) && (dst != NIL)) while ((src != NIL) && (dst != NIL))
{ {
@ -4069,7 +4069,7 @@ makeConstantList( A_Const *n)
{ {
char *defval = NULL; char *defval = NULL;
if (nodeTag(n) != T_A_Const) { if (nodeTag(n) != T_A_Const) {
elog(WARN,"Cannot handle non-constant parameter",NULL); elog(ABORT,"Cannot handle non-constant parameter",NULL);
} else if (n->val.type == T_Float) { } else if (n->val.type == T_Float) {
defval = (char*) palloc(20+1); defval = (char*) palloc(20+1);
@ -4086,7 +4086,7 @@ makeConstantList( A_Const *n)
strcat( defval, "'"); strcat( defval, "'");
} else { } else {
elog(WARN,"Internal error in makeConstantList(): cannot encode node",NULL); elog(ABORT,"Internal error in makeConstantList(): cannot encode node",NULL);
}; };
#ifdef PARSEDEBUG #ifdef PARSEDEBUG

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.28 1997/12/16 05:04:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.29 1998/01/05 03:32:22 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -248,7 +248,7 @@ AtomValueGetString(int atomval)
if (ScanKeywords[i].value == atomval) if (ScanKeywords[i].value == atomval)
return (ScanKeywords[i].name); return (ScanKeywords[i].name);
elog(WARN, "AtomGetString called with bogus atom # : %d", atomval); elog(ERROR, "AtomGetString called with bogus atom # : %d", atomval);
return (NULL); return (NULL);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.5 1998/01/04 04:31:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.6 1998/01/05 03:32:25 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -208,7 +208,7 @@ tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause)
if (tle->resdom->resno == grpcl->entry->resdom->resno) if (tle->resdom->resno == grpcl->entry->resdom->resno)
{ {
if (contain_agg_clause((Node *) expr)) if (contain_agg_clause((Node *) expr))
elog(WARN, "parser: aggregates not allowed in GROUP BY clause"); elog(ERROR, "parser: aggregates not allowed in GROUP BY clause");
return TRUE; return TRUE;
} }
} }
@ -248,7 +248,7 @@ parseCheckAggregates(ParseState *pstate, Query *qry)
* non-group column in target list may fail.) * non-group column in target list may fail.)
*/ */
if (contain_agg_clause(qry->qual)) if (contain_agg_clause(qry->qual))
elog(WARN, "parser: aggregates not allowed in WHERE clause"); elog(ERROR, "parser: aggregates not allowed in WHERE clause");
/* /*
* the target list can only contain aggregates, group columns and * the target list can only contain aggregates, group columns and
@ -259,7 +259,7 @@ parseCheckAggregates(ParseState *pstate, Query *qry)
TargetEntry *tle = lfirst(tl); TargetEntry *tle = lfirst(tl);
if (!tleIsAggOrGroupCol(tle, qry->groupClause)) if (!tleIsAggOrGroupCol(tle, qry->groupClause))
elog(WARN, elog(ERROR,
"parser: illegal use of aggregates or non-group column in target list"); "parser: illegal use of aggregates or non-group column in target list");
} }
@ -271,7 +271,7 @@ parseCheckAggregates(ParseState *pstate, Query *qry)
* Need to change here when we get HAVING works. Currently * Need to change here when we get HAVING works. Currently
* qry->havingQual is NULL. - vadim 04/05/97 * qry->havingQual is NULL. - vadim 04/05/97
if (!exprIsAggOrGroupCol(qry->havingQual, qry->groupClause)) if (!exprIsAggOrGroupCol(qry->havingQual, qry->groupClause))
elog(WARN, elog(ERROR,
"parser: illegal use of aggregates or non-group column in HAVING clause"); "parser: illegal use of aggregates or non-group column in HAVING clause");
*/ */
return; return;
@ -295,7 +295,7 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
0, 0); 0, 0);
if (!HeapTupleIsValid(theAggTuple)) if (!HeapTupleIsValid(theAggTuple))
{ {
elog(WARN, "aggregate %s does not exist", aggname); elog(ERROR, "aggregate %s does not exist", aggname);
} }
/* /*
@ -346,7 +346,7 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
break; break;
} }
if (first_valid_rte == NULL) if (first_valid_rte == NULL)
elog(WARN, "Can't find column to do aggregate(*) on."); elog(ERROR, "Can't find column to do aggregate(*) on.");
attr->relname = first_valid_rte->refname; attr->relname = first_valid_rte->refname;
attr->attrs = lcons(makeString( attr->attrs = lcons(makeString(
@ -379,7 +379,7 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
tp1 = typeidType(basetype); tp1 = typeidType(basetype);
tp2 = typeidType(vartype); tp2 = typeidType(vartype);
elog(NOTICE, "Aggregate type mismatch:"); elog(NOTICE, "Aggregate type mismatch:");
elog(WARN, "%s works on %s, not %s", aggname, elog(ERROR, "%s works on %s, not %s", aggname,
typeTypeName(tp1), typeTypeName(tp2)); typeTypeName(tp1), typeTypeName(tp2));
} }
} }
@ -411,11 +411,11 @@ agg_error(char *caller, char *aggname, Oid basetypeID)
if (basetypeID == InvalidOid) if (basetypeID == InvalidOid)
{ {
elog(WARN, "%s: aggregate '%s' for all types does not exist", caller, aggname); elog(ERROR, "%s: aggregate '%s' for all types does not exist", caller, aggname);
} }
else else
{ {
elog(WARN, "%s: aggregate '%s' for '%s' does not exist", caller, aggname, elog(ERROR, "%s: aggregate '%s' for '%s' does not exist", caller, aggname,
typeidTypeName(basetypeID)); typeidTypeName(basetypeID));
} }
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.6 1997/12/29 04:31:31 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.7 1998/01/05 03:32:26 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -75,7 +75,7 @@ transformWhereClause(ParseState *pstate, Node *a_expr)
pstate->p_in_where_clause = false; pstate->p_in_where_clause = false;
if (exprType(qual) != BOOLOID) if (exprType(qual) != BOOLOID)
{ {
elog(WARN, elog(ERROR,
"where clause must return type bool, not %s", "where clause must return type bool, not %s",
typeidTypeName(exprType(qual))); typeidTypeName(exprType(qual)));
} }
@ -170,7 +170,7 @@ find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist)
if (real_rtable_pos == test_rtable_pos) if (real_rtable_pos == test_rtable_pos)
{ {
if (target_result != NULL) if (target_result != NULL)
elog(WARN, "Order/Group By '%s' is ambiguous", sortgroupby->name); elog(ERROR, "Order/Group By '%s' is ambiguous", sortgroupby->name);
else else
target_result = target; target_result = target;
} }
@ -178,7 +178,7 @@ find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist)
else else
{ {
if (target_result != NULL) if (target_result != NULL)
elog(WARN, "Order/Group By '%s' is ambiguous", sortgroupby->name); elog(ERROR, "Order/Group By '%s' is ambiguous", sortgroupby->name);
else else
target_result = target; target_result = target;
} }
@ -208,7 +208,7 @@ transformGroupClause(ParseState *pstate, List *grouplist, List *targetlist)
restarget = find_targetlist_entry(pstate, lfirst(grouplist), targetlist); restarget = find_targetlist_entry(pstate, lfirst(grouplist), targetlist);
if (restarget == NULL) if (restarget == NULL)
elog(WARN, "The field being grouped by must appear in the target list"); elog(ERROR, "The field being grouped by must appear in the target list");
grpcl->entry = restarget; grpcl->entry = restarget;
resdom = restarget->resdom; resdom = restarget->resdom;
@ -267,7 +267,7 @@ transformSortClause(ParseState *pstate,
restarget = find_targetlist_entry(pstate, sortby, targetlist); restarget = find_targetlist_entry(pstate, sortby, targetlist);
if (restarget == NULL) if (restarget == NULL)
elog(WARN, "The field being ordered by must appear in the target list"); elog(ERROR, "The field being ordered by must appear in the target list");
sortcl->resdom = resdom = restarget->resdom; sortcl->resdom = resdom = restarget->resdom;
sortcl->opoid = oprid(oper(sortby->useOp, sortcl->opoid = oprid(oper(sortby->useOp,
@ -349,7 +349,7 @@ transformSortClause(ParseState *pstate,
} }
if (i == NIL) if (i == NIL)
{ {
elog(WARN, "The field specified in the UNIQUE ON clause is not in the targetlist"); elog(ERROR, "The field specified in the UNIQUE ON clause is not in the targetlist");
} }
s = sortlist; s = sortlist;
foreach(s, sortlist) foreach(s, sortlist)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.5 1998/01/04 04:53:50 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.6 1998/01/05 03:32:27 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -69,12 +69,12 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
uexpr = transformExpr(pstate, ai->uidx, precedence); /* must exists */ uexpr = transformExpr(pstate, ai->uidx, precedence); /* must exists */
if (exprType(uexpr) != INT4OID) if (exprType(uexpr) != INT4OID)
elog(WARN, "array index expressions must be int4's"); elog(ERROR, "array index expressions must be int4's");
if (ai->lidx != NULL) if (ai->lidx != NULL)
{ {
lexpr = transformExpr(pstate, ai->lidx, precedence); lexpr = transformExpr(pstate, ai->lidx, precedence);
if (exprType(lexpr) != INT4OID) if (exprType(lexpr) != INT4OID)
elog(WARN, "array index expressions must be int4's"); elog(ERROR, "array index expressions must be int4's");
} }
#if 0 #if 0
pfree(ai->uidx); pfree(ai->uidx);
@ -125,7 +125,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
toid = param_type(paramno); toid = param_type(paramno);
if (!OidIsValid(toid)) if (!OidIsValid(toid))
{ {
elog(WARN, "Parameter '$%d' is out of range", paramno); elog(ERROR, "Parameter '$%d' is out of range", paramno);
} }
param = makeNode(Param); param = makeNode(Param);
param->paramkind = PARAM_NUM; param->paramkind = PARAM_NUM;
@ -178,11 +178,11 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node *rexpr = transformExpr(pstate, a->rexpr, precedence); Node *rexpr = transformExpr(pstate, a->rexpr, precedence);
if (exprType(lexpr) != BOOLOID) if (exprType(lexpr) != BOOLOID)
elog(WARN, "left-hand side of AND is type '%s', not bool", elog(ERROR, "left-hand side of AND is type '%s', not bool",
typeidTypeName(exprType(lexpr))); typeidTypeName(exprType(lexpr)));
if (exprType(rexpr) != BOOLOID) if (exprType(rexpr) != BOOLOID)
elog(WARN, "right-hand side of AND is type '%s', not bool", elog(ERROR, "right-hand side of AND is type '%s', not bool",
typeidTypeName(exprType(rexpr))); typeidTypeName(exprType(rexpr)));
expr->typeOid = BOOLOID; expr->typeOid = BOOLOID;
@ -198,10 +198,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node *rexpr = transformExpr(pstate, a->rexpr, precedence); Node *rexpr = transformExpr(pstate, a->rexpr, precedence);
if (exprType(lexpr) != BOOLOID) if (exprType(lexpr) != BOOLOID)
elog(WARN, "left-hand side of OR is type '%s', not bool", elog(ERROR, "left-hand side of OR is type '%s', not bool",
typeidTypeName(exprType(lexpr))); typeidTypeName(exprType(lexpr)));
if (exprType(rexpr) != BOOLOID) if (exprType(rexpr) != BOOLOID)
elog(WARN, "right-hand side of OR is type '%s', not bool", elog(ERROR, "right-hand side of OR is type '%s', not bool",
typeidTypeName(exprType(rexpr))); typeidTypeName(exprType(rexpr)));
expr->typeOid = BOOLOID; expr->typeOid = BOOLOID;
expr->opType = OR_EXPR; expr->opType = OR_EXPR;
@ -215,7 +215,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node *rexpr = transformExpr(pstate, a->rexpr, precedence); Node *rexpr = transformExpr(pstate, a->rexpr, precedence);
if (exprType(rexpr) != BOOLOID) if (exprType(rexpr) != BOOLOID)
elog(WARN, "argument to NOT is type '%s', not bool", elog(ERROR, "argument to NOT is type '%s', not bool",
typeidTypeName(exprType(rexpr))); typeidTypeName(exprType(rexpr)));
expr->typeOid = BOOLOID; expr->typeOid = BOOLOID;
expr->opType = NOT_EXPR; expr->opType = NOT_EXPR;
@ -251,7 +251,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
} }
default: default:
/* should not reach here */ /* should not reach here */
elog(WARN, "transformExpr: does not know how to transform node %d", elog(ERROR, "transformExpr: does not know how to transform node %d",
nodeTag(expr)); nodeTag(expr));
break; break;
} }
@ -305,7 +305,7 @@ transformIdent(ParseState *pstate, Node *expr, int precedence)
} }
if (result == NULL) if (result == NULL)
elog(WARN, "attribute '%s' not found", ident->name); elog(ERROR, "attribute '%s' not found", ident->name);
return result; return result;
} }
@ -350,7 +350,7 @@ exprType(Node *expr)
type = UNKNOWNOID; type = UNKNOWNOID;
break; break;
default: default:
elog(WARN, "exprType: don't know how to get type for %d node", elog(ERROR, "exprType: don't know how to get type for %d node",
nodeTag(expr)); nodeTag(expr));
break; break;
} }
@ -426,7 +426,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
sprintf(const_string, "%ld", expr->val.ival); sprintf(const_string, "%ld", expr->val.ival);
break; break;
default: default:
elog(WARN, elog(ERROR,
"parser_typecast: cannot cast this expression to type '%s'", "parser_typecast: cannot cast this expression to type '%s'",
typename->name); typename->name);
} }
@ -488,7 +488,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
break; break;
default: default:
elog(WARN, "unknown type %d", CInteger(lfirst(expr))); elog(ERROR, "unknown type %d", CInteger(lfirst(expr)));
} }
#endif #endif
@ -612,7 +612,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
const_string = (char *) textout((struct varlena *) const_string); const_string = (char *) textout((struct varlena *) const_string);
break; break;
default: default:
elog(WARN, "unknown type %u", exprType); elog(ERROR, "unknown type %u", exprType);
} }
if (!exprType) if (!exprType)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.4 1998/01/04 04:31:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.5 1998/01/05 03:32:28 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -114,7 +114,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
{ {
first_arg = lfirst(fargs); first_arg = lfirst(fargs);
if (first_arg == NULL) if (first_arg == NULL)
elog(WARN, "function '%s' does not allow NULL input", funcname); elog(ERROR, "function '%s' does not allow NULL input", funcname);
} }
/* /*
@ -184,7 +184,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
heap_close(rd); heap_close(rd);
} }
else else
elog(WARN, elog(ERROR,
"Type '%s' is not a relation type", "Type '%s' is not a relation type",
typeidTypeName(toid)); typeidTypeName(toid));
argrelid = typeidTypeRelid(toid); argrelid = typeidTypeRelid(toid);
@ -195,7 +195,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
*/ */
if ((get_attnum(argrelid, funcname) == InvalidAttrNumber) if ((get_attnum(argrelid, funcname) == InvalidAttrNumber)
&& strcmp(funcname, "*")) && strcmp(funcname, "*"))
elog(WARN, "Functions on sets are not yet supported"); elog(ERROR, "Functions on sets are not yet supported");
} }
if (retval) if (retval)
@ -286,7 +286,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
if (exprType(pair) == UNKNOWNOID && if (exprType(pair) == UNKNOWNOID &&
!IsA(pair, Const)) !IsA(pair, Const))
{ {
elog(WARN, "ParseFunc: no function named '%s' that takes in an unknown type as argument #%d", funcname, nargs); elog(ERROR, "ParseFunc: no function named '%s' that takes in an unknown type as argument #%d", funcname, nargs);
} }
else else
toid = exprType(pair); toid = exprType(pair);
@ -329,7 +329,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
} }
if (!exists) if (!exists)
elog(WARN, "no such attribute or function '%s'", funcname); elog(ERROR, "no such attribute or function '%s'", funcname);
/* got it */ /* got it */
funcnode = makeNode(Func); funcnode = makeNode(Func);
@ -387,7 +387,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
Assert(length(fargs) == 1); Assert(length(fargs) == 1);
seq = (Const *) lfirst(fargs); seq = (Const *) lfirst(fargs);
if (!IsA((Node *) seq, Const)) if (!IsA((Node *) seq, Const))
elog(WARN, "%s: only constant sequence names are acceptable", funcname); elog(ERROR, "%s: only constant sequence names are acceptable", funcname);
seqname = lower ((text*)DatumGetPointer(seq->constvalue)); seqname = lower ((text*)DatumGetPointer(seq->constvalue));
pfree (DatumGetPointer(seq->constvalue)); pfree (DatumGetPointer(seq->constvalue));
seq->constvalue = PointerGetDatum (seqname); seq->constvalue = PointerGetDatum (seqname);
@ -396,13 +396,13 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs,
if ((aclcheck_result = pg_aclcheck(seqrel, GetPgUserName(), if ((aclcheck_result = pg_aclcheck(seqrel, GetPgUserName(),
((funcid == SeqNextValueRegProcedure) ? ACL_WR : ACL_RD))) ((funcid == SeqNextValueRegProcedure) ? ACL_WR : ACL_RD)))
!= ACLCHECK_OK) != ACLCHECK_OK)
elog(WARN, "%s.%s: %s", elog(ERROR, "%s.%s: %s",
seqrel, funcname, aclcheck_error_strings[aclcheck_result]); seqrel, funcname, aclcheck_error_strings[aclcheck_result]);
pfree(seqrel); pfree(seqrel);
if (funcid == SeqNextValueRegProcedure && pstate->p_in_where_clause) if (funcid == SeqNextValueRegProcedure && pstate->p_in_where_clause)
elog(WARN, "nextval of a sequence in WHERE disallowed"); elog(ERROR, "nextval of a sequence in WHERE disallowed");
} }
expr = makeNode(Expr); expr = makeNode(Expr);
@ -441,7 +441,7 @@ funcid_get_rettype(Oid funcid)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(func_tuple)) if (!HeapTupleIsValid(func_tuple))
elog(WARN, "function %d does not exist", funcid); elog(ERROR, "function %d does not exist", funcid);
funcrettype = (Oid) funcrettype = (Oid)
((Form_pg_proc) GETSTRUCT(func_tuple))->prorettype; ((Form_pg_proc) GETSTRUCT(func_tuple))->prorettype;
@ -721,7 +721,7 @@ func_get_detail(char *funcname,
{ {
tp = typeidType(oid_array[0]); tp = typeidType(oid_array[0]);
if (typeTypeFlag(tp) == 'c') if (typeTypeFlag(tp) == 'c')
elog(WARN, "no such attribute or function \"%s\"", elog(ERROR, "no such attribute or function \"%s\"",
funcname); funcname);
} }
func_error("func_get_detail", funcname, nargs, oid_array); func_error("func_get_detail", funcname, nargs, oid_array);
@ -883,7 +883,7 @@ static int find_inheritors(Oid relid, Oid **supervec)
/* save the type id, rather than the relation id */ /* save the type id, rather than the relation id */
if ((rd = heap_open(qentry->sqe_relid)) == (Relation) NULL) if ((rd = heap_open(qentry->sqe_relid)) == (Relation) NULL)
elog(WARN, "relid %d does not exist", qentry->sqe_relid); elog(ERROR, "relid %d does not exist", qentry->sqe_relid);
qentry->sqe_relid = typeTypeId(typenameType(RelationGetRelationName(rd)->data)); qentry->sqe_relid = typeTypeId(typenameType(RelationGetRelationName(rd)->data));
heap_close(rd); heap_close(rd);
@ -1029,7 +1029,7 @@ setup_tlist(char *attname, Oid relid)
attno = get_attnum(relid, attname); attno = get_attnum(relid, attname);
if (attno < 0) if (attno < 0)
elog(WARN, "cannot reference attribute '%s' of tuple params/return values for functions", attname); elog(ERROR, "cannot reference attribute '%s' of tuple params/return values for functions", attname);
typeid = get_atttype(relid, attno); typeid = get_atttype(relid, attno);
resnode = makeResdom(1, resnode = makeResdom(1,
@ -1130,7 +1130,7 @@ ParseComplexProjection(ParseState *pstate,
} }
else else
{ {
elog(WARN, elog(ERROR,
"Function '%s' has bad returntype %d", "Function '%s' has bad returntype %d",
funcname, argtype); funcname, argtype);
} }
@ -1200,7 +1200,7 @@ ParseComplexProjection(ParseState *pstate,
} }
elog(WARN, "Function '%s' has bad returntype %d", elog(ERROR, "Function '%s' has bad returntype %d",
funcname, argtype); funcname, argtype);
break; break;
} }
@ -1267,7 +1267,7 @@ func_error(char *caller, char *funcname, int nargs, Oid *argtypes)
ptr += strlen(ptr); ptr += strlen(ptr);
} }
elog(WARN, "%s: function %s(%s) does not exist", caller, funcname, p); elog(ERROR, "%s: function %s(%s) does not exist", caller, funcname, p);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.4 1997/12/29 05:13:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.5 1998/01/05 03:32:29 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -126,7 +126,7 @@ disallow_setop(char *op, Type optype, Node *operand)
{ {
elog(NOTICE, "An operand to the '%s' operator returns a set of %s,", elog(NOTICE, "An operand to the '%s' operator returns a set of %s,",
op, typeTypeName(optype)); op, typeTypeName(optype));
elog(WARN, "but '%s' takes single values, not sets.", elog(ERROR, "but '%s' takes single values, not sets.",
op); op);
} }
} }
@ -268,7 +268,7 @@ make_var(ParseState *pstate, char *refname, char *attrname, Oid *type_id)
rd = heap_open(rte->relid); rd = heap_open(rte->relid);
attid = attnameAttNum(rd, attrname); /* could elog(WARN) */ attid = attnameAttNum(rd, attrname); /* could elog(ERROR) */
vartypeid = attnumTypeId(rd, attid); vartypeid = attnumTypeId(rd, attid);
varnode = makeVar(vnum, attid, vartypeid, vnum, attid); varnode = makeVar(vnum, attid, vartypeid, vnum, attid);
@ -311,7 +311,7 @@ make_array_ref(Node *expr,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_tuple)) if (!HeapTupleIsValid(type_tuple))
elog(WARN, "make_array_ref: Cache lookup failed for type %d\n", elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
typearray); typearray);
/* get the array type struct from the type tuple */ /* get the array type struct from the type tuple */
@ -319,7 +319,7 @@ make_array_ref(Node *expr,
if (type_struct_array->typelem == InvalidOid) if (type_struct_array->typelem == InvalidOid)
{ {
elog(WARN, "make_array_ref: type %s is not an array", elog(ERROR, "make_array_ref: type %s is not an array",
(Name) &(type_struct_array->typname.data[0])); (Name) &(type_struct_array->typname.data[0]));
} }
@ -328,7 +328,7 @@ make_array_ref(Node *expr,
ObjectIdGetDatum(type_struct_array->typelem), ObjectIdGetDatum(type_struct_array->typelem),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_tuple)) if (!HeapTupleIsValid(type_tuple))
elog(WARN, "make_array_ref: Cache lookup failed for type %d\n", elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
typearray); typearray);
type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple); type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple);
@ -393,7 +393,7 @@ make_array_set(Expr *target_expr,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_tuple)) if (!HeapTupleIsValid(type_tuple))
elog(WARN, "make_array_ref: Cache lookup failed for type %d\n", elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
typearray); typearray);
/* get the array type struct from the type tuple */ /* get the array type struct from the type tuple */
@ -401,7 +401,7 @@ make_array_set(Expr *target_expr,
if (type_struct_array->typelem == InvalidOid) if (type_struct_array->typelem == InvalidOid)
{ {
elog(WARN, "make_array_ref: type %s is not an array", elog(ERROR, "make_array_ref: type %s is not an array",
(Name) &(type_struct_array->typname.data[0])); (Name) &(type_struct_array->typname.data[0]));
} }
/* get the type tuple for the element type */ /* get the type tuple for the element type */
@ -410,7 +410,7 @@ make_array_set(Expr *target_expr,
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_tuple)) if (!HeapTupleIsValid(type_tuple))
elog(WARN, "make_array_ref: Cache lookup failed for type %d\n", elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
typearray); typearray);
type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple); type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.4 1998/01/01 05:44:54 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.5 1998/01/05 03:32:29 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -367,7 +367,7 @@ oper(char *op, Oid arg1, Oid arg2, bool noWarnings)
elog(NOTICE, "there is more than one operator %s for types", op); elog(NOTICE, "there is more than one operator %s for types", op);
elog(NOTICE, "%s and %s. You will have to retype this query", elog(NOTICE, "%s and %s. You will have to retype this query",
typeTypeName(tp1), typeTypeName(tp2)); typeTypeName(tp1), typeTypeName(tp2));
elog(WARN, "using an explicit cast"); elog(ERROR, "using an explicit cast");
} }
return (NULL); return (NULL);
} }
@ -473,7 +473,7 @@ right_oper(char *op, Oid arg)
ncandidates = unary_oper_get_candidates(op, arg, &candidates, 'r'); ncandidates = unary_oper_get_candidates(op, arg, &candidates, 'r');
if (ncandidates == 0) if (ncandidates == 0)
{ {
elog(WARN, elog(ERROR,
"Can't find right op: %s for type %d", op, arg); "Can't find right op: %s for type %d", op, arg);
return (NULL); return (NULL);
} }
@ -490,7 +490,7 @@ right_oper(char *op, Oid arg)
{ {
elog(NOTICE, "there is more than one right operator %s", op); elog(NOTICE, "there is more than one right operator %s", op);
elog(NOTICE, "you will have to retype this query"); elog(NOTICE, "you will have to retype this query");
elog(WARN, "using an explicit cast"); elog(ERROR, "using an explicit cast");
return (NULL); return (NULL);
} }
} }
@ -518,7 +518,7 @@ left_oper(char *op, Oid arg)
ncandidates = unary_oper_get_candidates(op, arg, &candidates, 'l'); ncandidates = unary_oper_get_candidates(op, arg, &candidates, 'l');
if (ncandidates == 0) if (ncandidates == 0)
{ {
elog(WARN, elog(ERROR,
"Can't find left op: %s for type %d", op, arg); "Can't find left op: %s for type %d", op, arg);
return (NULL); return (NULL);
} }
@ -535,7 +535,7 @@ left_oper(char *op, Oid arg)
{ {
elog(NOTICE, "there is more than one left operator %s", op); elog(NOTICE, "there is more than one left operator %s", op);
elog(NOTICE, "you will have to retype this query"); elog(NOTICE, "you will have to retype this query");
elog(WARN, "using an explicit cast"); elog(ERROR, "using an explicit cast");
return (NULL); return (NULL);
} }
} }
@ -575,7 +575,7 @@ op_error(char *op, Oid arg1, Oid arg2)
} }
else else
{ {
elog(WARN, "left hand side of operator %s has an unknown type, probably a bad attribute name", op); elog(ERROR, "left hand side of operator %s has an unknown type, probably a bad attribute name", op);
} }
if (typeidIsValid(arg2)) if (typeidIsValid(arg2))
@ -584,7 +584,7 @@ op_error(char *op, Oid arg1, Oid arg2)
} }
else else
{ {
elog(WARN, "right hand side of operator %s has an unknown type, probably a bad attribute name", op); elog(ERROR, "right hand side of operator %s has an unknown type, probably a bad attribute name", op);
} }
#if FALSE #if FALSE
@ -592,10 +592,10 @@ op_error(char *op, Oid arg1, Oid arg2)
op, typeTypeName(tp1), typeTypeName(tp2)); op, typeTypeName(tp1), typeTypeName(tp2));
elog(NOTICE, "You will either have to retype this query using an"); elog(NOTICE, "You will either have to retype this query using an");
elog(NOTICE, "explicit cast, or you will have to define the operator"); elog(NOTICE, "explicit cast, or you will have to define the operator");
elog(WARN, "%s for %s and %s using CREATE OPERATOR", elog(ERROR, "%s for %s and %s using CREATE OPERATOR",
op, typeTypeName(tp1), typeTypeName(tp2)); op, typeTypeName(tp1), typeTypeName(tp2));
#endif #endif
elog(WARN, "There is no operator '%s' for types '%s' and '%s'" elog(ERROR, "There is no operator '%s' for types '%s' and '%s'"
"\n\tYou will either have to retype this query using an explicit cast," "\n\tYou will either have to retype this query using an explicit cast,"
"\n\tor you will have to define the operator using CREATE OPERATOR", "\n\tor you will have to define the operator using CREATE OPERATOR",
op, typeTypeName(tp1), typeTypeName(tp2)); op, typeTypeName(tp1), typeTypeName(tp2));

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.4 1998/01/04 04:31:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.5 1998/01/05 03:32:30 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -130,7 +130,7 @@ colnameRangeTableEntry(ParseState *pstate, char *colname)
{ {
if (!pstate->p_is_insert || if (!pstate->p_is_insert ||
rte != pstate->p_target_rangetblentry) rte != pstate->p_target_rangetblentry)
elog(WARN, "Column %s is ambiguous", colname); elog(ERROR, "Column %s is ambiguous", colname);
} }
else else
rte_result = rte; rte_result = rte;
@ -155,7 +155,7 @@ addRangeTableEntry(ParseState *pstate,
if (pstate != NULL && if (pstate != NULL &&
refnameRangeTableEntry(pstate->p_rtable, refname) != NULL) refnameRangeTableEntry(pstate->p_rtable, refname) != NULL)
elog(WARN, "Table name %s specified more than once", refname); elog(ERROR, "Table name %s specified more than once", refname);
rte->relname = pstrdup(relname); rte->relname = pstrdup(relname);
rte->refname = pstrdup(refname); rte->refname = pstrdup(refname);
@ -163,7 +163,7 @@ addRangeTableEntry(ParseState *pstate,
relation = heap_openr(relname); relation = heap_openr(relname);
if (relation == NULL) if (relation == NULL)
{ {
elog(WARN, "%s: %s", elog(ERROR, "%s: %s",
relname, aclcheck_error_strings[ACLCHECK_NO_CLASS]); relname, aclcheck_error_strings[ACLCHECK_NO_CLASS]);
} }
@ -216,7 +216,7 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno)
if (rdesc == NULL) if (rdesc == NULL)
{ {
elog(WARN, "Unable to expand all -- heap_open failed on %s", elog(ERROR, "Unable to expand all -- heap_open failed on %s",
rte->refname); rte->refname);
return NIL; return NIL;
} }
@ -274,7 +274,7 @@ attnameAttNum(Relation rd, char *a)
return (special_attr[i].code); return (special_attr[i].code);
/* on failure */ /* on failure */
elog(WARN, "Relation %s does not have attribute %s", elog(ERROR, "Relation %s does not have attribute %s",
RelationGetRelationName(rd), a); RelationGetRelationName(rd), a);
return 0; /* lint */ return 0; /* lint */
} }
@ -319,7 +319,7 @@ attnumAttName(Relation rd, int attrno)
return (name); return (name);
} }
} }
elog(WARN, "Illegal attr no %d for relation %s", elog(ERROR, "Illegal attr no %d for relation %s",
attrno, RelationGetRelationName(rd)); attrno, RelationGetRelationName(rd));
} }
else if (attrno >= 1 && attrno <= RelationGetNumberOfAttributes(rd)) else if (attrno >= 1 && attrno <= RelationGetNumberOfAttributes(rd))
@ -329,7 +329,7 @@ attnumAttName(Relation rd, int attrno)
} }
else else
{ {
elog(WARN, "Illegal attr no %d for relation %s", elog(ERROR, "Illegal attr no %d for relation %s",
attrno, RelationGetRelationName(rd)); attrno, RelationGetRelationName(rd));
} }
@ -380,7 +380,7 @@ handleTargetColname(ParseState *pstate, char **resname,
pstate->p_insert_columns = lnext(pstate->p_insert_columns); pstate->p_insert_columns = lnext(pstate->p_insert_columns);
} }
else else
elog(WARN, "insert: more expressions than target columns"); elog(ERROR, "insert: more expressions than target columns");
} }
if (pstate->p_is_insert || pstate->p_is_update) if (pstate->p_is_insert || pstate->p_is_update)
checkTargetTypes(pstate, *resname, refname, colname); checkTargetTypes(pstate, *resname, refname, colname);
@ -410,13 +410,13 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
{ {
rte = colnameRangeTableEntry(pstate, colname); rte = colnameRangeTableEntry(pstate, colname);
if (rte == (RangeTblEntry *) NULL) if (rte == (RangeTblEntry *) NULL)
elog(WARN, "attribute %s not found", colname); elog(ERROR, "attribute %s not found", colname);
refname = rte->refname; refname = rte->refname;
} }
/* /*
if (pstate->p_is_insert && rte == pstate->p_target_rangetblentry) if (pstate->p_is_insert && rte == pstate->p_target_rangetblentry)
elog(WARN, "%s not available in this context", colname); elog(ERROR, "%s not available in this context", colname);
*/ */
rd = heap_open(rte->relid); rd = heap_open(rte->relid);
@ -427,13 +427,13 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
attrtype_target = attnumTypeId(pstate->p_target_relation, resdomno_target); attrtype_target = attnumTypeId(pstate->p_target_relation, resdomno_target);
if (attrtype_id != attrtype_target) if (attrtype_id != attrtype_target)
elog(WARN, "Type of %s does not match target column %s", elog(ERROR, "Type of %s does not match target column %s",
colname, target_colname); colname, target_colname);
if ((attrtype_id == BPCHAROID || attrtype_id == VARCHAROID) && if ((attrtype_id == BPCHAROID || attrtype_id == VARCHAROID) &&
rd->rd_att->attrs[resdomno_id - 1]->attlen != rd->rd_att->attrs[resdomno_id - 1]->attlen !=
pstate->p_target_relation->rd_att->attrs[resdomno_target - 1]->attlen) pstate->p_target_relation->rd_att->attrs[resdomno_target - 1]->attlen)
elog(WARN, "Length of %s does not match length of target column %s", elog(ERROR, "Length of %s does not match length of target column %s",
colname, target_colname); colname, target_colname);
heap_close(rd); heap_close(rd);

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.4 1998/01/04 04:31:22 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.5 1998/01/05 03:32:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -105,7 +105,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
if (exprType(expr) != UNKNOWNOID || if (exprType(expr) != UNKNOWNOID ||
!IsA(expr, Const)) !IsA(expr, Const))
elog(WARN, "yyparse: string constant expected"); elog(ERROR, "yyparse: string constant expected");
val = (char *) textout((struct varlena *) val = (char *) textout((struct varlena *)
((Const *) expr)->constvalue); ((Const *) expr)->constvalue);
@ -116,14 +116,14 @@ transformTargetList(ParseState *pstate, List *targetlist)
aind->uidx = transformExpr(pstate, aind->uidx, EXPR_COLUMN_FIRST); aind->uidx = transformExpr(pstate, aind->uidx, EXPR_COLUMN_FIRST);
if (!IsA(aind->uidx, Const)) if (!IsA(aind->uidx, Const))
elog(WARN, elog(ERROR,
"Array Index for Append should be a constant"); "Array Index for Append should be a constant");
uindx[i] = ((Const *) aind->uidx)->constvalue; uindx[i] = ((Const *) aind->uidx)->constvalue;
if (aind->lidx != NULL) if (aind->lidx != NULL)
{ {
aind->lidx = transformExpr(pstate, aind->lidx, EXPR_COLUMN_FIRST); aind->lidx = transformExpr(pstate, aind->lidx, EXPR_COLUMN_FIRST);
if (!IsA(aind->lidx, Const)) if (!IsA(aind->lidx, Const))
elog(WARN, elog(ERROR,
"Array Index for Append should be a constant"); "Array Index for Append should be a constant");
lindx[i] = ((Const *) aind->lidx)->constvalue; lindx[i] = ((Const *) aind->lidx)->constvalue;
} }
@ -132,7 +132,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
lindx[i] = 1; lindx[i] = 1;
} }
if (lindx[i] > uindx[i]) if (lindx[i] > uindx[i])
elog(WARN, "yyparse: lower index cannot be greater than upper index"); elog(ERROR, "yyparse: lower index cannot be greater than upper index");
sprintf(str, "[%d:%d]", lindx[i], uindx[i]); sprintf(str, "[%d:%d]", lindx[i], uindx[i]);
str += strlen(str); str += strlen(str);
i++; i++;
@ -143,7 +143,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
resdomno = attnameAttNum(rd, res->name); resdomno = attnameAttNum(rd, res->name);
ndims = attnumAttNelems(rd, resdomno); ndims = attnumAttNelems(rd, resdomno);
if (i != ndims) if (i != ndims)
elog(WARN, "yyparse: array dimensions do not match"); elog(ERROR, "yyparse: array dimensions do not match");
constval = makeNode(Value); constval = makeNode(Value);
constval->type = T_String; constval->type = T_String;
constval->val.str = save_str; constval->val.str = save_str;
@ -290,7 +290,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
} }
default: default:
/* internal error */ /* internal error */
elog(WARN, elog(ERROR,
"internal error: do not know how to transform targetlist"); "internal error: do not know how to transform targetlist");
break; break;
} }
@ -334,7 +334,7 @@ make_targetlist_expr(ParseState *pstate,
Resdom *resnode; Resdom *resnode;
if (expr == NULL) if (expr == NULL)
elog(WARN, "make_targetlist_expr: invalid use of NULL expression"); elog(ERROR, "make_targetlist_expr: invalid use of NULL expression");
type_id = exprType(expr); type_id = exprType(expr);
if (type_id == InvalidOid) if (type_id == InvalidOid)
@ -417,7 +417,7 @@ make_targetlist_expr(ParseState *pstate,
else if ((attrtype == FLOAT4OID) && (type_id == FLOAT8OID)) else if ((attrtype == FLOAT4OID) && (type_id == FLOAT8OID))
lfirst(expr) = lispInteger(FLOAT4OID); lfirst(expr) = lispInteger(FLOAT4OID);
else else
elog(WARN, "unequal type in tlist : %s \n", colname); elog(ERROR, "unequal type in tlist : %s \n", colname);
} }
Input_is_string = false; Input_is_string = false;
@ -449,7 +449,7 @@ make_targetlist_expr(ParseState *pstate,
else else
{ {
/* currently, we can't handle casting of expressions */ /* currently, we can't handle casting of expressions */
elog(WARN, "parser: attribute '%s' is of type '%s' but expression is of type '%s'", elog(ERROR, "parser: attribute '%s' is of type '%s' but expression is of type '%s'",
colname, colname,
typeidTypeName(attrtype), typeidTypeName(attrtype),
typeidTypeName(type_id)); typeidTypeName(type_id));
@ -564,7 +564,7 @@ makeTargetNames(ParseState *pstate, List *cols)
attnameAttNum(pstate->p_target_relation, name); attnameAttNum(pstate->p_target_relation, name);
foreach(nxt, lnext(tl)) foreach(nxt, lnext(tl))
if (!strcmp(name, ((Ident *) lfirst(nxt))->name)) if (!strcmp(name, ((Ident *) lfirst(nxt))->name))
elog (WARN, "Attribute '%s' should be specified only once", name); elog(ERROR, "Attribute '%s' should be specified only once", name);
} }
} }
@ -596,7 +596,7 @@ expandAllTables(ParseState *pstate)
/* this should not happen */ /* this should not happen */
if (rtable == NULL) if (rtable == NULL)
elog(WARN, "cannot expand: null p_rtable"); elog(ERROR, "cannot expand: null p_rtable");
/* /*
* go through the range table and make a list of range table entries * go through the range table and make a list of range table entries

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.2 1997/11/26 01:11:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.3 1998/01/05 03:32:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -44,7 +44,7 @@ typeidTypeName(Oid id)
if (!(tup = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(id), if (!(tup = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(id),
0, 0, 0))) 0, 0, 0)))
{ {
elog(WARN, "type id lookup of %ud failed", id); elog(ERROR, "type id lookup of %ud failed", id);
return (NULL); return (NULL);
} }
typetuple = (TypeTupleForm) GETSTRUCT(tup); typetuple = (TypeTupleForm) GETSTRUCT(tup);
@ -60,7 +60,7 @@ typeidType(Oid id)
if (!(tup = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(id), if (!(tup = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(id),
0, 0, 0))) 0, 0, 0)))
{ {
elog(WARN, "type id lookup of %ud failed", id); elog(ERROR, "type id lookup of %ud failed", id);
return (NULL); return (NULL);
} }
return ((Type) tup); return ((Type) tup);
@ -74,12 +74,12 @@ typenameType(char *s)
if (s == NULL) if (s == NULL)
{ {
elog(WARN, "type(): Null type"); elog(ERROR, "type(): Null type");
} }
if (!(tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(s), 0, 0, 0))) if (!(tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(s), 0, 0, 0)))
{ {
elog(WARN, "type name lookup of %s failed", s); elog(ERROR, "type name lookup of %s failed", s);
} }
return ((Type) tup); return ((Type) tup);
} }
@ -89,7 +89,7 @@ Oid
typeTypeId(Type tp) typeTypeId(Type tp)
{ {
if (tp == NULL) if (tp == NULL)
elog(WARN, "typeTypeId() called with NULL type struct"); elog(ERROR, "typeTypeId() called with NULL type struct");
return (tp->t_oid); return (tp->t_oid);
} }
@ -159,7 +159,7 @@ typeidRetoutfunc(Oid type_id)
ObjectIdGetDatum(type_id), ObjectIdGetDatum(type_id),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(typeTuple)) if (!HeapTupleIsValid(typeTuple))
elog(WARN, "typeidRetoutfunc: Invalid type - oid = %u", type_id); elog(ERROR, "typeidRetoutfunc: Invalid type - oid = %u", type_id);
type = (TypeTupleForm) GETSTRUCT(typeTuple); type = (TypeTupleForm) GETSTRUCT(typeTuple);
outfunc = type->typoutput; outfunc = type->typoutput;
@ -177,7 +177,7 @@ typeidTypeRelid(Oid type_id)
ObjectIdGetDatum(type_id), ObjectIdGetDatum(type_id),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(typeTuple)) if (!HeapTupleIsValid(typeTuple))
elog(WARN, "typeidTypeRelid: Invalid type - oid = %u", type_id); elog(ERROR, "typeidTypeRelid: Invalid type - oid = %u", type_id);
type = (TypeTupleForm) GETSTRUCT(typeTuple); type = (TypeTupleForm) GETSTRUCT(typeTuple);
infunc = type->typrelid; infunc = type->typrelid;
@ -204,7 +204,7 @@ typeidTypElem(Oid type_id)
ObjectIdGetDatum(type_id), ObjectIdGetDatum(type_id),
0, 0, 0))) 0, 0, 0)))
{ {
elog(WARN, "type id lookup of %u failed", type_id); elog(ERROR, "type id lookup of %u failed", type_id);
} }
type = (TypeTupleForm) GETSTRUCT(typeTuple); type = (TypeTupleForm) GETSTRUCT(typeTuple);
@ -225,7 +225,7 @@ GetArrayElementType(Oid typearray)
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(type_tuple)) if (!HeapTupleIsValid(type_tuple))
elog(WARN, "GetArrayElementType: Cache lookup failed for type %d", elog(ERROR, "GetArrayElementType: Cache lookup failed for type %d",
typearray); typearray);
/* get the array type struct from the type tuple */ /* get the array type struct from the type tuple */
@ -233,7 +233,7 @@ GetArrayElementType(Oid typearray)
if (type_struct_array->typelem == InvalidOid) if (type_struct_array->typelem == InvalidOid)
{ {
elog(WARN, "GetArrayElementType: type %s is not an array", elog(ERROR, "GetArrayElementType: type %s is not an array",
(Name) &(type_struct_array->typname.data[0])); (Name) &(type_struct_array->typname.data[0]));
} }
@ -252,7 +252,7 @@ typeidRetinfunc(Oid type_id)
ObjectIdGetDatum(type_id), ObjectIdGetDatum(type_id),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(typeTuple)) if (!HeapTupleIsValid(typeTuple))
elog(WARN, "typeidRetinfunc: Invalid type - oid = %u", type_id); elog(ERROR, "typeidRetinfunc: Invalid type - oid = %u", type_id);
type = (TypeTupleForm) GETSTRUCT(typeTuple); type = (TypeTupleForm) GETSTRUCT(typeTuple);
infunc = type->typinput; infunc = type->typinput;
@ -273,7 +273,7 @@ FindDelimiter(char *typename)
PointerGetDatum(typename), PointerGetDatum(typename),
0, 0, 0))) 0, 0, 0)))
{ {
elog(WARN, "type name lookup of %s failed", typename); elog(ERROR, "type name lookup of %s failed", typename);
} }
type = (TypeTupleForm) GETSTRUCT(typeTuple); type = (TypeTupleForm) GETSTRUCT(typeTuple);

View File

@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.5 1997/12/09 03:11:00 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.6 1998/01/05 03:32:34 momjian Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
@ -539,7 +539,7 @@ char *yytext;
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.5 1997/12/09 03:11:00 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.6 1998/01/05 03:32:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -954,7 +954,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.ival = strtol((char *)literal,&endptr,2); yylval.ival = strtol((char *)literal,&endptr,2);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad binary integer input '%s'",literal); elog(ABORT,"Bad binary integer input '%s'",literal);
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
@ -965,7 +965,7 @@ YY_RULE_SETUP
#line 206 "scan.l" #line 206 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -997,7 +997,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.ival = strtol((char *)literal,&endptr,16); yylval.ival = strtol((char *)literal,&endptr,16);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad hexadecimal integer input '%s'",literal); elog(ABORT,"Bad hexadecimal integer input '%s'",literal);
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
@ -1026,7 +1026,7 @@ YY_RULE_SETUP
#line 243 "scan.l" #line 243 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -1036,7 +1036,7 @@ YY_RULE_SETUP
#line 249 "scan.l" #line 249 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
*(literal+llen) = '\''; *(literal+llen) = '\'';
llen += yyleng; llen += yyleng;
@ -1047,7 +1047,7 @@ YY_RULE_SETUP
#line 257 "scan.l" #line 257 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -1081,7 +1081,7 @@ YY_RULE_SETUP
#line 277 "scan.l" #line 277 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -1159,7 +1159,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,10); yylval.ival = strtol((char *)yytext,&endptr,10);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad integer input '%s'",yytext); elog(ABORT,"Bad integer input '%s'",yytext);
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
@ -1173,7 +1173,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.dval = strtod(((char *)yytext),&endptr); yylval.dval = strtod(((char *)yytext),&endptr);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad float8 input '%s'",yytext); elog(ABORT,"Bad float8 input '%s'",yytext);
CheckFloat8Val(yylval.dval); CheckFloat8Val(yylval.dval);
return (FCONST); return (FCONST);
} }
@ -1187,7 +1187,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,10); yylval.ival = strtol((char *)yytext,&endptr,10);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad integer input '%s'",yytext); elog(ABORT,"Bad integer input '%s'",yytext);
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
@ -1200,7 +1200,7 @@ YY_RULE_SETUP
errno = 0; errno = 0;
yylval.dval = strtod((char *)yytext,&endptr); yylval.dval = strtod((char *)yytext,&endptr);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad float input '%s'",yytext); elog(ABORT,"Bad float input '%s'",yytext);
CheckFloat8Val(yylval.dval); CheckFloat8Val(yylval.dval);
return (FCONST); return (FCONST);
} }
@ -2133,7 +2133,7 @@ int main()
void yyerror(char message[]) void yyerror(char message[])
{ {
elog(WARN, "parser: %s at or near \"%s\"", message, yytext); elog(ABORT, "parser: %s at or near \"%s\"", message, yytext);
} }
int yywrap() int yywrap()

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.32 1997/12/05 01:12:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.33 1998/01/05 03:32:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -199,13 +199,13 @@ other .
errno = 0; errno = 0;
yylval.ival = strtol((char *)literal,&endptr,2); yylval.ival = strtol((char *)literal,&endptr,2);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad binary integer input '%s'",literal); elog(ABORT,"Bad binary integer input '%s'",literal);
return (ICONST); return (ICONST);
} }
<xh>{xhinside} | <xh>{xhinside} |
<xb>{xbinside} { <xb>{xbinside} {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -225,7 +225,7 @@ other .
errno = 0; errno = 0;
yylval.ival = strtol((char *)literal,&endptr,16); yylval.ival = strtol((char *)literal,&endptr,16);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad hexadecimal integer input '%s'",literal); elog(ABORT,"Bad hexadecimal integer input '%s'",literal);
return (ICONST); return (ICONST);
} }
@ -242,13 +242,13 @@ other .
<xq>{xqdouble} | <xq>{xqdouble} |
<xq>{xqinside} { <xq>{xqinside} {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
<xq>{xqembedded} { <xq>{xqembedded} {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
*(literal+llen) = '\''; *(literal+llen) = '\'';
llen += yyleng; llen += yyleng;
@ -256,7 +256,7 @@ other .
<xq>{xqliteral} { <xq>{xqliteral} {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -276,7 +276,7 @@ other .
} }
<xd>{xdinside} { <xd>{xdinside} {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1); memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng; llen += yyleng;
} }
@ -318,7 +318,7 @@ other .
errno = 0; errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,10); yylval.ival = strtol((char *)yytext,&endptr,10);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad integer input '%s'",yytext); elog(ABORT,"Bad integer input '%s'",yytext);
return (ICONST); return (ICONST);
} }
{real}/{space}*-{number} { {real}/{space}*-{number} {
@ -328,7 +328,7 @@ other .
errno = 0; errno = 0;
yylval.dval = strtod(((char *)yytext),&endptr); yylval.dval = strtod(((char *)yytext),&endptr);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad float8 input '%s'",yytext); elog(ABORT,"Bad float8 input '%s'",yytext);
CheckFloat8Val(yylval.dval); CheckFloat8Val(yylval.dval);
return (FCONST); return (FCONST);
} }
@ -338,7 +338,7 @@ other .
errno = 0; errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,10); yylval.ival = strtol((char *)yytext,&endptr,10);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad integer input '%s'",yytext); elog(ABORT,"Bad integer input '%s'",yytext);
return (ICONST); return (ICONST);
} }
{real} { {real} {
@ -347,7 +347,7 @@ other .
errno = 0; errno = 0;
yylval.dval = strtod((char *)yytext,&endptr); yylval.dval = strtod((char *)yytext,&endptr);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad float input '%s'",yytext); elog(ABORT,"Bad float input '%s'",yytext);
CheckFloat8Val(yylval.dval); CheckFloat8Val(yylval.dval);
return (FCONST); return (FCONST);
} }
@ -377,7 +377,7 @@ other .
void yyerror(char message[]) void yyerror(char message[])
{ {
elog(WARN, "parser: %s at or near \"%s\"", message, yytext); elog(ABORT, "parser: %s at or near \"%s\"", message, yytext);
} }
int yywrap() int yywrap()

View File

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

Some files were not shown because too many files have changed in this diff Show More