mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Goodbye ABORT. Hello ERROR for all errors.
This commit is contained in:
8
src/backend/utils/cache/catcache.c
vendored
8
src/backend/utils/cache/catcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.19 1998/01/05 03:34:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.20 1998/01/07 21:06:08 momjian Exp $
|
||||
*
|
||||
* Notes:
|
||||
* XXX This needs to use exception.h to handle recovery when
|
||||
@@ -568,7 +568,7 @@ ResetSystemCache()
|
||||
CACHE1_elog(DEBUG, "ResetSystemCache called");
|
||||
if (DisableCache)
|
||||
{
|
||||
elog(ABORT, "ResetSystemCache: Called while cache disabled");
|
||||
elog(ERROR, "ResetSystemCache: Called while cache disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ ResetSystemCache()
|
||||
nextelt = DLGetSucc(elt);
|
||||
CatCacheRemoveCTup(cache, elt);
|
||||
if (cache->cc_ntup == -1)
|
||||
elog(ABORT, "ResetSystemCache: cc_ntup<0 (software error)");
|
||||
elog(ERROR, "ResetSystemCache: cc_ntup<0 (software error)");
|
||||
}
|
||||
}
|
||||
cache->cc_ntup = 0; /* in case of WARN error above */
|
||||
@@ -892,7 +892,7 @@ SearchSysCache(struct catcache * cache,
|
||||
|
||||
if (DisableCache)
|
||||
{
|
||||
elog(ABORT, "SearchSysCache: Called while cache disabled");
|
||||
elog(ERROR, "SearchSysCache: Called while cache disabled");
|
||||
return ((HeapTuple) NULL);
|
||||
}
|
||||
|
||||
|
||||
12
src/backend/utils/cache/fcache.c
vendored
12
src/backend/utils/cache/fcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.8 1998/01/05 03:34:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.9 1998/01/07 21:06:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ GetDynamicFuncArgType(Var *arg, ExprContext *econtext)
|
||||
tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(relname),
|
||||
0, 0, 0);
|
||||
if (!tup)
|
||||
elog(ABORT, "Lookup failed on type tuple for class %s",
|
||||
elog(ERROR, "Lookup failed on type tuple for class %s",
|
||||
relname);
|
||||
|
||||
return tup->t_oid;
|
||||
@@ -100,14 +100,14 @@ init_fcache(Oid foid,
|
||||
retval = (FunctionCachePtr) palloc(sizeof(FunctionCache));
|
||||
|
||||
if (!use_syscache)
|
||||
elog(ABORT, "what the ????, init the fcache without the catalogs?");
|
||||
elog(ERROR, "what the ????, init the fcache without the catalogs?");
|
||||
|
||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
||||
ObjectIdGetDatum(foid),
|
||||
0, 0, 0);
|
||||
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"init_fcache: %s %d",
|
||||
"Cache lookup failed for procedure", foid);
|
||||
|
||||
@@ -128,7 +128,7 @@ init_fcache(Oid foid,
|
||||
0, 0, 0);
|
||||
|
||||
if (!HeapTupleIsValid(typeTuple))
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"init_fcache: %s %d",
|
||||
"Cache lookup failed for type",
|
||||
(procedureStruct)->prorettype);
|
||||
@@ -311,6 +311,6 @@ setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ABORT, "init_fcache: node must be Oper or Func!");
|
||||
elog(ERROR, "init_fcache: node must be Oper or Func!");
|
||||
}
|
||||
}
|
||||
|
||||
6
src/backend/utils/cache/lsyscache.c
vendored
6
src/backend/utils/cache/lsyscache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.8 1998/01/05 03:34:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.9 1998/01/07 21:06:12 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Eventually, the index information should go through here, too.
|
||||
@@ -148,7 +148,7 @@ get_attisset(Oid relid, char *attname)
|
||||
PointerGetDatum(attname),
|
||||
0, 0);
|
||||
if (!HeapTupleIsValid(htup))
|
||||
elog(ABORT, "get_attisset: no attribute %s in relation %d",
|
||||
elog(ERROR, "get_attisset: no attribute %s in relation %d",
|
||||
attname, relid);
|
||||
if (heap_attisnull(htup, attno))
|
||||
return (false);
|
||||
@@ -203,7 +203,7 @@ get_opname(Oid opno)
|
||||
return (pstrdup(optup.oprname.data));
|
||||
else
|
||||
{
|
||||
elog(ABORT, "can't look up operator %d\n", opno);
|
||||
elog(ERROR, "can't look up operator %d\n", opno);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
30
src/backend/utils/cache/relcache.c
vendored
30
src/backend/utils/cache/relcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.31 1998/01/05 03:34:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.32 1998/01/07 21:06:13 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -371,7 +371,7 @@ scan_pg_rel_seq(RelationBuildDescInfo buildinfo)
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ABORT, "ScanPgRelation: bad buildinfo");
|
||||
elog(ERROR, "ScanPgRelation: bad buildinfo");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ scan_pg_rel_ind(RelationBuildDescInfo buildinfo)
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ABORT, "ScanPgRelation: bad buildinfo");
|
||||
elog(ERROR, "ScanPgRelation: bad buildinfo");
|
||||
|
||||
/*
|
||||
* XXX I hope this is right. It seems better than returning
|
||||
@@ -583,7 +583,7 @@ build_tupdesc_seq(RelationBuildDescInfo buildinfo,
|
||||
}
|
||||
|
||||
if (need > 0)
|
||||
elog(ABORT, "catalog is missing %d attribute%s for relid %d",
|
||||
elog(ERROR, "catalog is missing %d attribute%s for relid %d",
|
||||
need, (need == 1 ? "" : "s"), relation->rd_id);
|
||||
|
||||
/* ----------------
|
||||
@@ -617,7 +617,7 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
|
||||
atttup = (HeapTuple) AttributeNumIndexScan(attrel, relation->rd_id, i);
|
||||
|
||||
if (!HeapTupleIsValid(atttup))
|
||||
elog(ABORT, "cannot find attribute %d of relation %.*s", i,
|
||||
elog(ERROR, "cannot find attribute %d of relation %.*s", i,
|
||||
NAMEDATALEN, &(relation->rd_rel->relname.data[0]));
|
||||
attp = (AttributeTupleForm) GETSTRUCT(atttup);
|
||||
|
||||
@@ -1738,7 +1738,7 @@ AttrDefaultFetch(Relation relation)
|
||||
if (adform->adnum != attrdef[i].adnum)
|
||||
continue;
|
||||
if (attrdef[i].adsrc != NULL)
|
||||
elog(ABORT, "AttrDefaultFetch: second record found for attr %.*s in rel %.*s",
|
||||
elog(ERROR, "AttrDefaultFetch: second record found for attr %.*s in rel %.*s",
|
||||
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
|
||||
@@ -1746,7 +1746,7 @@ AttrDefaultFetch(Relation relation)
|
||||
Anum_pg_attrdef_adbin,
|
||||
adrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(ABORT, "AttrDefaultFetch: adbin IS NULL for attr %.*s in rel %.*s",
|
||||
elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %.*s in rel %.*s",
|
||||
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
attrdef[i].adbin = textout(val);
|
||||
@@ -1754,7 +1754,7 @@ AttrDefaultFetch(Relation relation)
|
||||
Anum_pg_attrdef_adsrc,
|
||||
adrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(ABORT, "AttrDefaultFetch: adsrc IS NULL for attr %.*s in rel %.*s",
|
||||
elog(ERROR, "AttrDefaultFetch: adsrc IS NULL for attr %.*s in rel %.*s",
|
||||
NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
attrdef[i].adsrc = textout(val);
|
||||
@@ -1762,14 +1762,14 @@ AttrDefaultFetch(Relation relation)
|
||||
}
|
||||
|
||||
if (i >= ndef)
|
||||
elog(ABORT, "AttrDefaultFetch: unexpected record found for attr %d in rel %.*s",
|
||||
elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %.*s",
|
||||
adform->adnum,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
ReleaseBuffer(buffer);
|
||||
}
|
||||
|
||||
if (found < ndef)
|
||||
elog(ABORT, "AttrDefaultFetch: %d record not found for rel %.*s",
|
||||
elog(ERROR, "AttrDefaultFetch: %d record not found for rel %.*s",
|
||||
ndef - found,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
|
||||
@@ -1821,28 +1821,28 @@ RelCheckFetch(Relation relation)
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
continue;
|
||||
if (found == ncheck)
|
||||
elog(ABORT, "RelCheckFetch: unexpected record found for rel %.*s",
|
||||
elog(ERROR, "RelCheckFetch: unexpected record found for rel %.*s",
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
|
||||
rcname = (Name) fastgetattr(tuple,
|
||||
Anum_pg_relcheck_rcname,
|
||||
rcrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(ABORT, "RelCheckFetch: rcname IS NULL for rel %.*s",
|
||||
elog(ERROR, "RelCheckFetch: rcname IS NULL for rel %.*s",
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
check[found].ccname = nameout(rcname);
|
||||
val = (struct varlena *) fastgetattr(tuple,
|
||||
Anum_pg_relcheck_rcbin,
|
||||
rcrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(ABORT, "RelCheckFetch: rcbin IS NULL for rel %.*s",
|
||||
elog(ERROR, "RelCheckFetch: rcbin IS NULL for rel %.*s",
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
check[found].ccbin = textout(val);
|
||||
val = (struct varlena *) fastgetattr(tuple,
|
||||
Anum_pg_relcheck_rcsrc,
|
||||
rcrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(ABORT, "RelCheckFetch: rcsrc IS NULL for rel %.*s",
|
||||
elog(ERROR, "RelCheckFetch: rcsrc IS NULL for rel %.*s",
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
check[found].ccsrc = textout(val);
|
||||
found++;
|
||||
@@ -1851,7 +1851,7 @@ RelCheckFetch(Relation relation)
|
||||
}
|
||||
|
||||
if (found < ncheck)
|
||||
elog(ABORT, "RelCheckFetch: %d record not found for rel %.*s",
|
||||
elog(ERROR, "RelCheckFetch: %d record not found for rel %.*s",
|
||||
ncheck - found,
|
||||
NAMEDATALEN, relation->rd_rel->relname.data);
|
||||
|
||||
|
||||
12
src/backend/utils/cache/syscache.c
vendored
12
src/backend/utils/cache/syscache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.11 1998/01/05 03:34:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.12 1998/01/07 21:06:15 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These routines allow the parser/planner/executor to perform
|
||||
@@ -371,7 +371,7 @@ InitCatalogCache()
|
||||
cacheinfo[cacheId].iScanFunc);
|
||||
if (!PointerIsValid((char *) SysCache[cacheId]))
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"InitCatalogCache: Can't init cache %.16s(%d)",
|
||||
cacheinfo[cacheId].name,
|
||||
cacheId);
|
||||
@@ -402,7 +402,7 @@ SearchSysCacheTuple(int cacheId, /* cache selection code */
|
||||
|
||||
if (cacheId < 0 || cacheId >= SysCacheSize)
|
||||
{
|
||||
elog(ABORT, "SearchSysCacheTuple: Bad cache id %d", cacheId);
|
||||
elog(ERROR, "SearchSysCacheTuple: Bad cache id %d", cacheId);
|
||||
return ((HeapTuple) NULL);
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ SearchSysCacheTuple(int cacheId, /* cache selection code */
|
||||
cacheinfo[cacheId].iScanFunc);
|
||||
if (!PointerIsValid(SysCache[cacheId]))
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"InitCatalogCache: Can't init cache %.16s(%d)",
|
||||
cacheinfo[cacheId].name,
|
||||
cacheId);
|
||||
@@ -469,7 +469,7 @@ SearchSysCacheStruct(int cacheId, /* cache selection code */
|
||||
|
||||
if (!PointerIsValid(returnStruct))
|
||||
{
|
||||
elog(ABORT, "SearchSysCacheStruct: No receiving struct");
|
||||
elog(ERROR, "SearchSysCacheStruct: No receiving struct");
|
||||
return (0);
|
||||
}
|
||||
tp = SearchSysCacheTuple(cacheId, key1, key2, key3, key4);
|
||||
@@ -537,7 +537,7 @@ SearchSysCacheGetAttribute(int cacheId,
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"SearchSysCacheGetAttribute: Bad attr # %d in %s(%d)",
|
||||
attributeNumber, cacheName, cacheId);
|
||||
return (NULL);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.23 1998/01/05 04:10:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.24 1998/01/07 21:06:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -90,9 +90,6 @@ elog(int lev, const char *fmt,...)
|
||||
case ERROR:
|
||||
cp = "ERROR: ";
|
||||
break;
|
||||
case ABORT:
|
||||
cp = "ABORT: ";
|
||||
break;
|
||||
default:
|
||||
sprintf(line, "FATAL %d: ", lev);
|
||||
cp = line;
|
||||
@@ -173,12 +170,12 @@ elog(int lev, const char *fmt,...)
|
||||
}
|
||||
#endif /* !PG_STANDALONE */
|
||||
|
||||
if (lev == ERROR || lev == ABORT)
|
||||
if (lev == ERROR)
|
||||
{
|
||||
extern int InErrorOrAbort;
|
||||
extern int InError;
|
||||
|
||||
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
|
||||
if (!InErrorOrAbort)
|
||||
if (!InError)
|
||||
{
|
||||
kill(getpid(), 1); /* abort to traffic cop */
|
||||
pause();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.15 1998/01/05 03:34:41 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.16 1998/01/07 21:06:26 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
{
|
||||
elog(ABORT, "fmgr: Cache lookup failed for procedure %d\n",
|
||||
elog(ERROR, "fmgr: Cache lookup failed for procedure %d\n",
|
||||
procedureId);
|
||||
return ((func_ptr) NULL);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
rdesc = heap_openr(ProcedureRelationName);
|
||||
if (!RelationIsValid(rdesc))
|
||||
{
|
||||
elog(ABORT, "fmgr: Could not open relation %s",
|
||||
elog(ERROR, "fmgr: Could not open relation %s",
|
||||
ProcedureRelationName);
|
||||
return ((func_ptr) NULL);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
if (!PointerIsValid(probinattr) /* || isnull */ )
|
||||
{
|
||||
heap_close(rdesc);
|
||||
elog(ABORT, "fmgr: Could not extract probin for %d from %s",
|
||||
elog(ERROR, "fmgr: Could not extract probin for %d from %s",
|
||||
procedureId, ProcedureRelationName);
|
||||
return ((func_ptr) NULL);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ handle_load(char *filename, char *funcname)
|
||||
{
|
||||
if (stat(filename, &stat_buf) == -1)
|
||||
{
|
||||
elog(ABORT, "stat failed on file %s", filename);
|
||||
elog(ERROR, "stat failed on file %s", filename);
|
||||
}
|
||||
|
||||
for (file_scanner = file_list;
|
||||
@@ -211,7 +211,7 @@ handle_load(char *filename, char *funcname)
|
||||
}
|
||||
|
||||
free((char *) file_scanner);
|
||||
elog(ABORT, "Load of file %s failed: %s", filename, load_error);
|
||||
elog(ERROR, "Load of file %s failed: %s", filename, load_error);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -227,7 +227,7 @@ handle_load(char *filename, char *funcname)
|
||||
|
||||
if (retval == (func_ptr) NULL)
|
||||
{
|
||||
elog(ABORT, "Can't find function %s in file %s", funcname, filename);
|
||||
elog(ERROR, "Can't find function %s in file %s", funcname, filename);
|
||||
}
|
||||
|
||||
return (retval);
|
||||
@@ -255,7 +255,7 @@ load_file(char *filename)
|
||||
|
||||
if (stat(filename, &stat_buf) == -1)
|
||||
{
|
||||
elog(ABORT, "stat failed on file %s", filename);
|
||||
elog(ERROR, "stat failed on file %s", filename);
|
||||
}
|
||||
|
||||
if (file_list != (DynamicFileList *) NULL
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.8 1998/01/05 03:34:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.9 1998/01/07 21:06:28 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ fmgr_pl(Oid func_id,
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
{
|
||||
elog(ABORT, "fmgr_pl(): Cache lookup of procedure %ld failed.",
|
||||
elog(ERROR, "fmgr_pl(): Cache lookup of procedure %ld failed.",
|
||||
ObjectIdGetDatum(func_id));
|
||||
}
|
||||
procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple);
|
||||
@@ -62,7 +62,7 @@ fmgr_pl(Oid func_id,
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(languageTuple))
|
||||
{
|
||||
elog(ABORT, "fmgr_pl(): Cache lookup of language %ld for procedure %ld failed.",
|
||||
elog(ERROR, "fmgr_pl(): Cache lookup of language %ld for procedure %ld failed.",
|
||||
ObjectIdGetDatum(procedureStruct->prolang),
|
||||
ObjectIdGetDatum(func_id));
|
||||
}
|
||||
@@ -72,7 +72,7 @@ fmgr_pl(Oid func_id,
|
||||
fmgr_info(languageStruct->lanplcallfoid, &plcall_fn, &plcall_nargs);
|
||||
if (plcall_fn == NULL)
|
||||
{
|
||||
elog(ABORT, "fmgr_pl(): failed to load PL handler for procedure %ld.",
|
||||
elog(ERROR, "fmgr_pl(): failed to load PL handler for procedure %ld.",
|
||||
ObjectIdGetDatum(func_id));
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ fmgr_c(func_ptr user_fn,
|
||||
values->data[8]);
|
||||
break;
|
||||
default:
|
||||
elog(ABORT, "fmgr_c: function %d: too many arguments (%d > %d)",
|
||||
elog(ERROR, "fmgr_c: function %d: too many arguments (%d > %d)",
|
||||
func_id, n_arguments, MAXFMGRARGS);
|
||||
break;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
{
|
||||
elog(ABORT, "fmgr_info: function %d: cache lookup failed\n",
|
||||
elog(ERROR, "fmgr_info: function %d: cache lookup failed\n",
|
||||
procedureId);
|
||||
}
|
||||
procedureStruct = (FormData_pg_proc *)
|
||||
@@ -205,7 +205,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
|
||||
case INTERNALlanguageId:
|
||||
user_fn = fmgr_lookupByName(procedureStruct->proname.data);
|
||||
if (!user_fn)
|
||||
elog(ABORT, "fmgr_info: function %s: not in internal table",
|
||||
elog(ERROR, "fmgr_info: function %s: not in internal table",
|
||||
procedureStruct->proname.data);
|
||||
break;
|
||||
case ClanguageId:
|
||||
@@ -228,7 +228,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(languageTuple))
|
||||
{
|
||||
elog(ABORT, "fmgr_info: %s %ld",
|
||||
elog(ERROR, "fmgr_info: %s %ld",
|
||||
"Cache lookup for language %d failed",
|
||||
ObjectIdGetDatum(procedureStruct->prolang));
|
||||
}
|
||||
@@ -241,7 +241,7 @@ fmgr_info(Oid procedureId, func_ptr * function, int *nargs)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ABORT, "fmgr_info: function %d: unknown language %d",
|
||||
elog(ERROR, "fmgr_info: function %d: unknown language %d",
|
||||
procedureId, language);
|
||||
}
|
||||
break;
|
||||
@@ -282,7 +282,7 @@ fmgr(Oid procedureId,...)
|
||||
|
||||
if (pronargs > MAXFMGRARGS)
|
||||
{
|
||||
elog(ABORT, "fmgr: function %d: too many arguments (%d > %d)",
|
||||
elog(ERROR, "fmgr: function %d: too many arguments (%d > %d)",
|
||||
procedureId, pronargs, MAXFMGRARGS);
|
||||
}
|
||||
for (i = 0; i < pronargs; ++i)
|
||||
@@ -317,7 +317,7 @@ fmgr_ptr(func_ptr user_fn, Oid func_id,...)
|
||||
n_arguments = va_arg(pvar, int);
|
||||
if (n_arguments > MAXFMGRARGS)
|
||||
{
|
||||
elog(ABORT, "fmgr_ptr: function %d: too many arguments (%d > %d)",
|
||||
elog(ERROR, "fmgr_ptr: function %d: too many arguments (%d > %d)",
|
||||
func_id, n_arguments, MAXFMGRARGS);
|
||||
}
|
||||
for (i = 0; i < n_arguments; ++i)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.4 1998/01/05 03:34:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.5 1998/01/07 21:06:31 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ GetDatabaseInfo(char *name, Oid *owner, char *path)
|
||||
|
||||
scan = heap_beginscan(dbrel, 0, false, 1, &scanKey);
|
||||
if (!HeapScanIsValid(scan))
|
||||
elog(ABORT, "GetDatabaseInfo: cannot begin scan of %s", DatabaseRelationName);
|
||||
elog(ERROR, "GetDatabaseInfo: cannot begin scan of %s", DatabaseRelationName);
|
||||
|
||||
/*
|
||||
* Since we're going to close the relation, copy the tuple.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.29 1998/01/05 03:34:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.30 1998/01/07 21:06:39 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Sorts the first relation into the second relation.
|
||||
@@ -205,7 +205,7 @@ inittapes(Sort * node)
|
||||
PS(node)->Tape[0].tp_prev = tp;
|
||||
|
||||
if (PS(node)->TapeRange <= 1)
|
||||
elog(ABORT, "inittapes: Could only allocate %d < 3 tapes\n",
|
||||
elog(ERROR, "inittapes: Could only allocate %d < 3 tapes\n",
|
||||
PS(node)->TapeRange + 1);
|
||||
|
||||
PS(node)->Level = 1;
|
||||
@@ -1009,7 +1009,7 @@ gettape()
|
||||
|
||||
file = AllocateFile(tp->tl_name, "w+");
|
||||
if (file == NULL)
|
||||
elog(ABORT, "Open: %s in %s line %d, %s", tp->tl_name,
|
||||
elog(ERROR, "Open: %s in %s line %d, %s", tp->tl_name,
|
||||
__FILE__, __LINE__, strerror(errno));
|
||||
|
||||
tp->tl_fd = fileno(file);
|
||||
@@ -1034,7 +1034,7 @@ resettape(FILE * file)
|
||||
for (tp = Tapes; tp != NULL && tp->tl_fd != fd; tp = tp->tl_next)
|
||||
;
|
||||
if (tp == NULL)
|
||||
elog(ABORT, "resettape: tape not found");
|
||||
elog(ERROR, "resettape: tape not found");
|
||||
|
||||
file = freopen(tp->tl_name, "w+", file);
|
||||
if (file == NULL)
|
||||
|
||||
Reference in New Issue
Block a user