Skip to content

Commit f439eb3

Browse files
committed
ABORT to ERROR in catalog/.
1 parent 845f82e commit f439eb3

File tree

7 files changed

+83
-83
lines changed

7 files changed

+83
-83
lines changed

src/backend/catalog/catalog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.11 1998/01/05 03:30:22 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.12 1998/01/06 19:42:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -132,7 +132,7 @@ newoid()
132132

133133
GetNewObjectId(&lastoid);
134134
if (!OidIsValid(lastoid))
135-
elog(ABORT, "newoid: GetNewObjectId returns invalid oid");
135+
elog(ERROR, "newoid: GetNewObjectId returns invalid oid");
136136
return lastoid;
137137
}
138138

@@ -162,7 +162,7 @@ fillatt(TupleDesc tupleDesc)
162162
AttributeTupleForm *att = tupleDesc->attrs;
163163

164164
if (natts < 0 || natts > MaxHeapAttributeNumber)
165-
elog(ABORT, "fillatt: %d attributes is too large", natts);
165+
elog(ERROR, "fillatt: %d attributes is too large", natts);
166166
if (natts == 0)
167167
{
168168
elog(DEBUG, "fillatt: called with natts == 0");
@@ -178,7 +178,7 @@ fillatt(TupleDesc tupleDesc)
178178
0, 0, 0);
179179
if (!HeapTupleIsValid(tuple))
180180
{
181-
elog(ABORT, "fillatt: unknown atttypid %ld",
181+
elog(ERROR, "fillatt: unknown atttypid %ld",
182182
(*attributeP)->atttypid);
183183
}
184184
else

src/backend/catalog/heap.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.42 1998/01/05 03:30:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.43 1998/01/06 19:42:27 momjian Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
* heap_create() - Create an uncataloged heap relation
@@ -194,7 +194,7 @@ heap_create(char *name,
194194

195195
if (IsSystemRelationName(relname) && IsNormalProcessingMode())
196196
{
197-
elog(ABORT,
197+
elog(ERROR,
198198
"Illegal class name: %s -- pg_ is reserved for system catalogs",
199199
relname);
200200
}
@@ -396,7 +396,7 @@ heap_create(char *name,
396396
*
397397
* this is used to make certain the tuple descriptor contains a
398398
* valid set of attribute names. a problem simply generates
399-
* elog(ABORT) which aborts the current transaction.
399+
* elog(ERROR) which aborts the current transaction.
400400
* --------------------------------
401401
*/
402402
static void
@@ -421,7 +421,7 @@ CheckAttributeNames(TupleDesc tupdesc)
421421
if (nameeq(&(HeapAtt[j]->attname),
422422
&(tupdesc->attrs[i]->attname)))
423423
{
424-
elog(ABORT,
424+
elog(ERROR,
425425
"create: system attribute named \"%s\"",
426426
HeapAtt[j]->attname.data);
427427
}
@@ -445,7 +445,7 @@ CheckAttributeNames(TupleDesc tupdesc)
445445
if (nameeq(&(tupdesc->attrs[j]->attname),
446446
&(tupdesc->attrs[i]->attname)))
447447
{
448-
elog(ABORT,
448+
elog(ERROR,
449449
"create: repeated attribute \"%s\"",
450450
tupdesc->attrs[j]->attname.data);
451451
}
@@ -762,7 +762,7 @@ heap_create_with_catalog(char relname[],
762762
*/
763763
AssertState(IsNormalProcessingMode() || IsBootstrapProcessingMode());
764764
if (natts == 0 || natts > MaxHeapAttributeNumber)
765-
elog(ABORT, "amcreate: from 1 to %d attributes must be specified",
765+
elog(ERROR, "amcreate: from 1 to %d attributes must be specified",
766766
MaxHeapAttributeNumber);
767767

768768
CheckAttributeNames(tupdesc);
@@ -777,7 +777,7 @@ heap_create_with_catalog(char relname[],
777777
if (RelationAlreadyExists(pg_class_desc, relname))
778778
{
779779
heap_close(pg_class_desc);
780-
elog(ABORT, "amcreate: %s relation already exists", relname);
780+
elog(ERROR, "amcreate: %s relation already exists", relname);
781781
}
782782

783783
/* ----------------
@@ -910,7 +910,7 @@ RelationRemoveInheritance(Relation relation)
910910
heap_endscan(scan);
911911
heap_close(catalogRelation);
912912

913-
elog(ABORT, "relation <%d> inherits \"%s\"",
913+
elog(ERROR, "relation <%d> inherits \"%s\"",
914914
((InheritsTupleForm) GETSTRUCT(tuple))->inhrel,
915915
RelationGetRelationName(relation));
916916
}
@@ -1054,7 +1054,7 @@ DeletePgRelationTuple(Relation rdesc)
10541054
{
10551055
heap_endscan(pg_class_scan);
10561056
heap_close(pg_class_desc);
1057-
elog(ABORT, "DeletePgRelationTuple: %s relation nonexistent",
1057+
elog(ERROR, "DeletePgRelationTuple: %s relation nonexistent",
10581058
&rdesc->rd_rel->relname);
10591059
}
10601060

@@ -1187,7 +1187,7 @@ DeletePgTypeTuple(Relation rdesc)
11871187
{
11881188
heap_endscan(pg_type_scan);
11891189
heap_close(pg_type_desc);
1190-
elog(ABORT, "DeletePgTypeTuple: %s type nonexistent",
1190+
elog(ERROR, "DeletePgTypeTuple: %s type nonexistent",
11911191
&rdesc->rd_rel->relname);
11921192
}
11931193

@@ -1229,7 +1229,7 @@ DeletePgTypeTuple(Relation rdesc)
12291229
heap_endscan(pg_attribute_scan);
12301230
heap_close(pg_attribute_desc);
12311231

1232-
elog(ABORT, "DeletePgTypeTuple: att of type %s exists in relation %d",
1232+
elog(ERROR, "DeletePgTypeTuple: att of type %s exists in relation %d",
12331233
&rdesc->rd_rel->relname, relid);
12341234
}
12351235
heap_endscan(pg_attribute_scan);
@@ -1265,7 +1265,7 @@ heap_destroy_with_catalog(char *relname)
12651265
*/
12661266
rdesc = heap_openr(relname);
12671267
if (rdesc == NULL)
1268-
elog(ABORT, "Relation %s Does Not Exist!", relname);
1268+
elog(ERROR, "Relation %s Does Not Exist!", relname);
12691269

12701270
RelationSetLockForWrite(rdesc);
12711271
rid = rdesc->rd_id;
@@ -1275,7 +1275,7 @@ heap_destroy_with_catalog(char *relname)
12751275
* ----------------
12761276
*/
12771277
if (IsSystemRelationName(RelationGetRelationName(rdesc)->data))
1278-
elog(ABORT, "amdestroy: cannot destroy %s relation",
1278+
elog(ERROR, "amdestroy: cannot destroy %s relation",
12791279
&rdesc->rd_rel->relname);
12801280

12811281
/* ----------------
@@ -1516,7 +1516,7 @@ start:;
15161516

15171517
if (length(query->rtable) > 1 ||
15181518
flatten_tlist(query->targetList) != NIL)
1519-
elog(ABORT, "DEFAULT: cannot use attribute(s)");
1519+
elog(ERROR, "DEFAULT: cannot use attribute(s)");
15201520
te = (TargetEntry *) lfirst(query->targetList);
15211521
resdom = te->resdom;
15221522
expr = te->expr;
@@ -1526,13 +1526,13 @@ start:;
15261526
if (((Const *) expr)->consttype != atp->atttypid)
15271527
{
15281528
if (*cast != 0)
1529-
elog(ABORT, "DEFAULT: const type mismatched");
1529+
elog(ERROR, "DEFAULT: const type mismatched");
15301530
sprintf(cast, ":: %s", typeidTypeName(atp->atttypid));
15311531
goto start;
15321532
}
15331533
}
15341534
else if (exprType(expr) != atp->atttypid)
1535-
elog(ABORT, "DEFAULT: type mismatched");
1535+
elog(ERROR, "DEFAULT: type mismatched");
15361536

15371537
adbin = nodeToString(expr);
15381538
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
@@ -1585,7 +1585,7 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
15851585
query = (Query *) (queryTree_list->qtrees[0]);
15861586

15871587
if (length(query->rtable) > 1)
1588-
elog(ABORT, "CHECK: only relation %.*s can be referenced",
1588+
elog(ERROR, "CHECK: only relation %.*s can be referenced",
15891589
NAMEDATALEN, rel->rd_rel->relname.data);
15901590

15911591
plan = (Plan *) lfirst(planTree_list);

src/backend/catalog/index.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.32 1998/01/05 03:30:30 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.33 1998/01/06 19:42:29 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -237,7 +237,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName)
237237
false);
238238

239239
if (OidIsValid(indoid))
240-
elog(ABORT, "Cannot create index: '%s' already exists",
240+
elog(ERROR, "Cannot create index: '%s' already exists",
241241
indexRelationName);
242242

243243
/* ----------------
@@ -253,7 +253,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName)
253253
* ----------------
254254
*/
255255
if (!OidIsValid(heapoid))
256-
elog(ABORT, "Cannot create index on '%s': relation does not exist",
256+
elog(ERROR, "Cannot create index on '%s': relation does not exist",
257257
heapRelationName);
258258

259259
/* ----------------
@@ -306,7 +306,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
306306
ObjectIdGetDatum(retType),
307307
0, 0, 0);
308308
if (!HeapTupleIsValid(tuple))
309-
elog(ABORT, "Function %s return type does not exist", FIgetname(funcInfo));
309+
elog(ERROR, "Function %s return type does not exist", FIgetname(funcInfo));
310310

311311
/*
312312
* Assign some of the attributes values. Leave the rest as 0.
@@ -374,7 +374,7 @@ ConstructTupleDescriptor(Oid heapoid,
374374
*/
375375
atnum = attNums[i];
376376
if (atnum > natts)
377-
elog(ABORT, "Cannot create index: attribute %d does not exist",
377+
elog(ERROR, "Cannot create index: attribute %d does not exist",
378378
atnum);
379379
if (attributeList)
380380
{
@@ -404,7 +404,7 @@ ConstructTupleDescriptor(Oid heapoid,
404404
* ----------------
405405
*/
406406
if (atnum <= FirstLowInvalidHeapAttributeNumber || atnum >= 0)
407-
elog(ABORT, "Cannot create index on system attribute: attribute number out of range (%d)", atnum);
407+
elog(ERROR, "Cannot create index on system attribute: attribute number out of range (%d)", atnum);
408408
atind = (-atnum) - 1;
409409

410410
from = (char *) (&sysatts[atind]);
@@ -450,7 +450,7 @@ ConstructTupleDescriptor(Oid heapoid,
450450
PointerGetDatum(IndexKeyType->name),
451451
0, 0, 0);
452452
if (!HeapTupleIsValid(tup))
453-
elog(ABORT, "create index: type '%s' undefined",
453+
elog(ERROR, "create index: type '%s' undefined",
454454
IndexKeyType->name);
455455
((AttributeTupleForm) to)->atttypid = tup->t_oid;
456456
((AttributeTupleForm) to)->attbyval =
@@ -1082,7 +1082,7 @@ index_create(char *heapRelationName,
10821082
* ----------------
10831083
*/
10841084
if (numatts < 1)
1085-
elog(ABORT, "must index at least one attribute");
1085+
elog(ERROR, "must index at least one attribute");
10861086

10871087
/* ----------------
10881088
* get heap relation oid and open the heap relation
@@ -1297,7 +1297,7 @@ index_destroy(Oid indexId)
12971297
* physically remove the file
12981298
*/
12991299
if (FileNameUnlink(relpath(indexRelation->rd_rel->relname.data)) < 0)
1300-
elog(ABORT, "amdestroyr: unlink: %m");
1300+
elog(ERROR, "amdestroyr: unlink: %m");
13011301

13021302
index_close(indexRelation);
13031303
}
@@ -1398,7 +1398,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
13981398
whichRel = RelationIdGetRelation(relid);
13991399

14001400
if (!RelationIsValid(whichRel))
1401-
elog(ABORT, "UpdateStats: cannot open relation id %d", relid);
1401+
elog(ERROR, "UpdateStats: cannot open relation id %d", relid);
14021402

14031403
/* ----------------
14041404
* Find the RELATION relation tuple for the given relation.
@@ -1407,7 +1407,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
14071407
pg_class = heap_openr(RelationRelationName);
14081408
if (!RelationIsValid(pg_class))
14091409
{
1410-
elog(ABORT, "UpdateStats: could not open RELATION relation");
1410+
elog(ERROR, "UpdateStats: could not open RELATION relation");
14111411
}
14121412
key[0].sk_argument = ObjectIdGetDatum(relid);
14131413

@@ -1417,7 +1417,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
14171417
if (!HeapScanIsValid(pg_class_scan))
14181418
{
14191419
heap_close(pg_class);
1420-
elog(ABORT, "UpdateStats: cannot scan RELATION relation");
1420+
elog(ERROR, "UpdateStats: cannot scan RELATION relation");
14211421
}
14221422

14231423
/* if the heap_open above succeeded, then so will this heap_getnext() */
@@ -1784,7 +1784,7 @@ IndexIsUnique(Oid indexId)
17841784
0, 0, 0);
17851785
if (!HeapTupleIsValid(tuple))
17861786
{
1787-
elog(ABORT, "IndexIsUnique: can't find index id %d",
1787+
elog(ERROR, "IndexIsUnique: can't find index id %d",
17881788
indexId);
17891789
}
17901790
index = (IndexTupleForm) GETSTRUCT(tuple);
@@ -1827,7 +1827,7 @@ IndexIsUniqueNoCache(Oid indexId)
18271827
tuple = heap_getnext(scandesc, 0, NULL);
18281828
if (!HeapTupleIsValid(tuple))
18291829
{
1830-
elog(ABORT, "IndexIsUniqueNoCache: can't find index id %d",
1830+
elog(ERROR, "IndexIsUniqueNoCache: can't find index id %d",
18311831
indexId);
18321832
}
18331833
index = (IndexTupleForm) GETSTRUCT(tuple);

0 commit comments

Comments
 (0)