ABORT to ERROR in catalog/.

This commit is contained in:
Bruce Momjian 1998-01-06 19:42:33 +00:00
parent 845f82e541
commit f439eb35b8
7 changed files with 83 additions and 83 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.11 1998/01/05 03:30:22 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.12 1998/01/06 19:42:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -132,7 +132,7 @@ newoid()
GetNewObjectId(&lastoid);
if (!OidIsValid(lastoid))
elog(ABORT, "newoid: GetNewObjectId returns invalid oid");
elog(ERROR, "newoid: GetNewObjectId returns invalid oid");
return lastoid;
}
@ -162,7 +162,7 @@ fillatt(TupleDesc tupleDesc)
AttributeTupleForm *att = tupleDesc->attrs;
if (natts < 0 || natts > MaxHeapAttributeNumber)
elog(ABORT, "fillatt: %d attributes is too large", natts);
elog(ERROR, "fillatt: %d attributes is too large", natts);
if (natts == 0)
{
elog(DEBUG, "fillatt: called with natts == 0");
@ -178,7 +178,7 @@ fillatt(TupleDesc tupleDesc)
0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
elog(ABORT, "fillatt: unknown atttypid %ld",
elog(ERROR, "fillatt: unknown atttypid %ld",
(*attributeP)->atttypid);
}
else

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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