Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit679d39b

Browse files
committed
Goodbye ABORT. Hello ERROR for all errors.
1 parente6c6146 commit679d39b

File tree

99 files changed

+493
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+493
-497
lines changed

‎src/backend/access/common/heaptuple.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.29 1998/01/05 03:28:57 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.30 1998/01/07 21:00:40 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -93,7 +93,7 @@ ComputeDataSize(TupleDesc tupleDesc,
9393
break;
9494
default:
9595
if (att[i]->attlen<sizeof(int32))
96-
elog(ABORT,"ComputeDataSize: attribute %d has len %d",
96+
elog(ERROR,"ComputeDataSize: attribute %d has len %d",
9797
i,att[i]->attlen);
9898
if (att[i]->attalign=='d')
9999
data_length=DOUBLEALIGN(data_length)+att[i]->attlen;
@@ -194,7 +194,7 @@ DataFill(char *data,
194194
break;
195195
default:
196196
if (att[i]->attlen<sizeof(int32))
197-
elog(ABORT,"DataFill: attribute %d has len %d",
197+
elog(ERROR,"DataFill: attribute %d has len %d",
198198
i,att[i]->attlen);
199199
if (att[i]->attalign=='d')
200200
{
@@ -249,10 +249,10 @@ heap_attisnull(HeapTuple tup, int attnum)
249249
break;
250250

251251
case0:
252-
elog(ABORT,"heap_attisnull: zero attnum disallowed");
252+
elog(ERROR,"heap_attisnull: zero attnum disallowed");
253253

254254
default:
255-
elog(ABORT,"heap_attisnull: undefined negative attnum");
255+
elog(ERROR,"heap_attisnull: undefined negative attnum");
256256
}
257257

258258
return (0);
@@ -290,7 +290,7 @@ heap_sysattrlen(AttrNumber attno)
290290
returnsizeoff->t_cmax;
291291

292292
default:
293-
elog(ABORT,"sysattrlen: System attribute number %d unknown.",attno);
293+
elog(ERROR,"sysattrlen: System attribute number %d unknown.",attno);
294294
return0;
295295
}
296296
}
@@ -328,7 +328,7 @@ heap_sysattrbyval(AttrNumber attno)
328328
break;
329329
default:
330330
byval= true;
331-
elog(ABORT,"sysattrbyval: System attribute number %d unknown.",
331+
elog(ERROR,"sysattrbyval: System attribute number %d unknown.",
332332
attno);
333333
break;
334334
}
@@ -358,7 +358,7 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
358358
caseMaxCommandIdAttributeNumber:
359359
return ((Datum) (long)tup->t_cmax);
360360
default:
361-
elog(ABORT,"heap_getsysattr: undefined attnum %d",attnum);
361+
elog(ERROR,"heap_getsysattr: undefined attnum %d",attnum);
362362
}
363363
return ((Datum)NULL);
364364
}
@@ -538,7 +538,7 @@ fastgetattr(HeapTuple tup,
538538
default:
539539
if (att[j]->attlen<sizeof(int32))
540540
{
541-
elog(ABORT,
541+
elog(ERROR,
542542
"fastgetattr: attribute %d has len %d",
543543
j,att[j]->attlen);
544544
}
@@ -598,7 +598,7 @@ fastgetattr(HeapTuple tup,
598598
break;
599599
default:
600600
if (att[i]->attlen<sizeof(int32))
601-
elog(ABORT,
601+
elog(ERROR,
602602
"fastgetattr2: attribute %d has len %d",
603603
i,att[i]->attlen);
604604
if (att[i]->attalign=='d')
@@ -657,7 +657,7 @@ fastgetattr(HeapTuple tup,
657657
break;
658658
default:
659659
if (att[attnum]->attlen<sizeof(int32))
660-
elog(ABORT,"fastgetattr3: attribute %d has len %d",
660+
elog(ERROR,"fastgetattr3: attribute %d has len %d",
661661
attnum,att[attnum]->attlen);
662662
if (att[attnum]->attalign=='d')
663663
off=DOUBLEALIGN(off);
@@ -686,7 +686,7 @@ heap_copytuple(HeapTuple tuple)
686686
/* XXX For now, just prevent an undetectable executor related error */
687687
if (tuple->t_len>MAXTUPLEN)
688688
{
689-
elog(ABORT,"palloctup: cannot handle length %d tuples",
689+
elog(ERROR,"palloctup: cannot handle length %d tuples",
690690
tuple->t_len);
691691
}
692692

@@ -773,7 +773,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
773773
}
774774

775775
if (numberOfAttributes>MaxHeapAttributeNumber)
776-
elog(ABORT,"heap_formtuple: numberOfAttributes of %d > %d",
776+
elog(ERROR,"heap_formtuple: numberOfAttributes of %d > %d",
777777
numberOfAttributes,MaxHeapAttributeNumber);
778778

779779
if (hasnull)
@@ -883,7 +883,7 @@ heap_modifytuple(HeapTuple tuple,
883883
}
884884
elseif (repl[attoff]!='r')
885885
{
886-
elog(ABORT,"heap_modifytuple: repl is \\%3d",repl[attoff]);
886+
elog(ERROR,"heap_modifytuple: repl is \\%3d",repl[attoff]);
887887

888888
}
889889
else

‎src/backend/access/common/indextuple.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.21 1998/01/05 03:28:59 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.22 1998/01/07 21:00:43 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -56,7 +56,7 @@ index_formtuple(TupleDesc tupleDescriptor,
5656
intnumberOfAttributes=tupleDescriptor->natts;
5757

5858
if (numberOfAttributes>MaxIndexAttributeNumber)
59-
elog(ABORT,"index_formtuple: numberOfAttributes of %d > %d",
59+
elog(ERROR,"index_formtuple: numberOfAttributes of %d > %d",
6060
numberOfAttributes,MaxIndexAttributeNumber);
6161

6262

@@ -103,7 +103,7 @@ index_formtuple(TupleDesc tupleDescriptor,
103103
*/
104104

105105
if (size&0xE000)
106-
elog(ABORT,"index_formtuple: data takes %d bytes: too big",size);
106+
elog(ERROR,"index_formtuple: data takes %d bytes: too big",size);
107107

108108

109109
infomask |=size;
@@ -314,7 +314,7 @@ fastgetiattr(IndexTuple tup,
314314
off= (att[j]->attalign=='d') ?
315315
DOUBLEALIGN(off) :LONGALIGN(off);
316316
else
317-
elog(ABORT,"fastgetiattr: attribute %d has len %d",
317+
elog(ERROR,"fastgetiattr: attribute %d has len %d",
318318
j,att[j]->attlen);
319319
break;
320320

@@ -382,7 +382,7 @@ fastgetiattr(IndexTuple tup,
382382
DOUBLEALIGN(off)+att[i]->attlen :
383383
LONGALIGN(off)+att[i]->attlen;
384384
else
385-
elog(ABORT,"fastgetiattr2: attribute %d has len %d",
385+
elog(ERROR,"fastgetiattr2: attribute %d has len %d",
386386
i,att[i]->attlen);
387387

388388
break;
@@ -409,7 +409,7 @@ fastgetiattr(IndexTuple tup,
409409
break;
410410
default:
411411
if (att[attnum]->attlen<sizeof(int32))
412-
elog(ABORT,"fastgetattr3: attribute %d has len %d",
412+
elog(ERROR,"fastgetattr3: attribute %d has len %d",
413413
attnum,att[attnum]->attlen);
414414
if (att[attnum]->attalign=='d')
415415
off=DOUBLEALIGN(off);

‎src/backend/access/common/printtup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.21 1998/01/05 03:29:00 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.22 1998/01/07 21:00:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -45,7 +45,7 @@ typtoout(Oid type)
4545
return ((Oid)
4646
((TypeTupleForm)GETSTRUCT(typeTuple))->typoutput);
4747

48-
elog(ABORT,"typtoout: Cache lookup of type %d failed",type);
48+
elog(ERROR,"typtoout: Cache lookup of type %d failed",type);
4949
return (InvalidOid);
5050
}
5151

@@ -62,7 +62,7 @@ gettypelem(Oid type)
6262
return ((Oid)
6363
((TypeTupleForm)GETSTRUCT(typeTuple))->typelem);
6464

65-
elog(ABORT,"typtoout: Cache lookup of type %d failed",type);
65+
elog(ERROR,"typtoout: Cache lookup of type %d failed",type);
6666
return (InvalidOid);
6767
}
6868

‎src/backend/access/common/tupdesc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.30 1998/01/05 03:29:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.31 1998/01/07 21:00:45 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -321,7 +321,7 @@ TupleDescInitEntry(TupleDesc desc,
321321
*RelationNameCreateHeapRelation() calls BuildDesc() which
322322
*calls this routine and since EMP does not exist yet, the
323323
*system cache lookup below fails. That's fine, but rather
324-
*then doing a elog(ABORT) we just leave that information
324+
*then doing a elog(ERROR) we just leave that information
325325
*uninitialized, return false, then fix things up later.
326326
*-cim 6/14/90
327327
* ----------------
@@ -508,7 +508,7 @@ BuildDescForRelation(List *schema, char *relname)
508508
TupleDescMakeSelfReference(desc,attnum,relname);
509509
}
510510
else
511-
elog(ABORT,"DefineRelation: no such type %s",
511+
elog(ERROR,"DefineRelation: no such type %s",
512512
typename);
513513
}
514514

‎src/backend/access/gist/gist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ gistbuild(Relation heap,
130130
*/
131131

132132
if (oldPred==NULL&& (nb=RelationGetNumberOfBlocks(index))!=0)
133-
elog(ABORT,"%.16s already contains data",&(index->rd_rel->relname.data[0]));
133+
elog(ERROR,"%.16s already contains data",&(index->rd_rel->relname.data[0]));
134134

135135
/* initialize the root page (if this is a new index) */
136136
if (oldPred==NULL)
@@ -1182,7 +1182,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
11821182
0,0,0);
11831183
itupform= (IndexTupleForm)GETSTRUCT(htup);
11841184
if (!HeapTupleIsValid(htup))
1185-
elog(ABORT,"initGISTstate: index %d not found",index->rd_id);
1185+
elog(ERROR,"initGISTstate: index %d not found",index->rd_id);
11861186
giststate->haskeytype=itupform->indhaskeytype;
11871187
if (giststate->haskeytype)
11881188
{
@@ -1193,7 +1193,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
11931193
0,0);
11941194
if (!HeapTupleIsValid(htup))
11951195
{
1196-
elog(ABORT,"initGISTstate: no attribute tuple %d %d",
1196+
elog(ERROR,"initGISTstate: no attribute tuple %d %d",
11971197
itupform->indexrelid,FirstOffsetNumber);
11981198
return;
11991199
}

‎src/backend/access/gist/gistscan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
8383

8484
if (!IndexScanIsValid(s))
8585
{
86-
elog(ABORT,"gistrescan: invalid scan.");
86+
elog(ERROR,"gistrescan: invalid scan.");
8787
return;
8888
}
8989

@@ -281,7 +281,7 @@ gistdropscan(IndexScanDesc s)
281281
}
282282

283283
if (l== (GISTScanList)NULL)
284-
elog(ABORT,"GiST scan list corrupted -- cannot find 0x%lx",s);
284+
elog(ERROR,"GiST scan list corrupted -- cannot find 0x%lx",s);
285285

286286
if (prev== (GISTScanList)NULL)
287287
GISTScans=l->gsl_next;
@@ -397,7 +397,7 @@ adjustiptr(IndexScanDesc s,
397397
break;
398398

399399
default:
400-
elog(ABORT,"Bad operation in GiST scan adjust: %d",op);
400+
elog(ERROR,"Bad operation in GiST scan adjust: %d",op);
401401
}
402402
}
403403
}

‎src/backend/access/hash/hashinsert.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.11 1998/01/05 03:29:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.12 1998/01/07 21:00:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -49,7 +49,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
4949
/* we need a scan key to do our search, so build one */
5050
itup=&(hitem->hash_itup);
5151
if ((natts=rel->rd_rel->relnatts)!=1)
52-
elog(ABORT,"Hash indices valid for only one index key.");
52+
elog(ERROR,"Hash indices valid for only one index key.");
5353
itup_scankey=_hash_mkscankey(rel,itup,metap);
5454

5555
/*
@@ -167,7 +167,7 @@ _hash_insertonpg(Relation rel,
167167
if (PageGetFreeSpace(page)<itemsz)
168168
{
169169
/* it doesn't fit on an empty page -- give up */
170-
elog(ABORT,"hash item too large");
170+
elog(ERROR,"hash item too large");
171171
}
172172
}
173173
_hash_checkpage(page,LH_OVERFLOW_PAGE);

‎src/backend/access/hash/hashovfl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.14 1998/01/05 03:29:20 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.15 1998/01/07 21:01:00 momjian Exp $
1111
*
1212
* NOTES
1313
* Overflow pages look like ordinary relation pages.
@@ -65,7 +65,7 @@ _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
6565
oaddr=_hash_getovfladdr(rel,metabufp);
6666
if (oaddr==InvalidOvflAddress)
6767
{
68-
elog(ABORT,"_hash_addovflpage: problem with _hash_getovfladdr.");
68+
elog(ERROR,"_hash_addovflpage: problem with _hash_getovfladdr.");
6969
}
7070
ovflblkno=OADDR_TO_BLKNO(OADDR_OF(SPLITNUM(oaddr),OPAGENUM(oaddr)));
7171
Assert(BlockNumberIsValid(ovflblkno));
@@ -172,7 +172,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
172172
{
173173
if (++splitnum >=NCACHED)
174174
{
175-
elog(ABORT,OVMSG);
175+
elog(ERROR,OVMSG);
176176
}
177177
metap->OVFL_POINT=splitnum;
178178
metap->SPARES[splitnum]=metap->SPARES[splitnum-1];
@@ -190,7 +190,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
190190
free_page++;
191191
if (free_page >=NCACHED)
192192
{
193-
elog(ABORT,OVMSG);
193+
elog(ERROR,OVMSG);
194194
}
195195

196196
/*
@@ -206,15 +206,15 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
206206
if (_hash_initbitmap(rel,metap,OADDR_OF(splitnum,offset),
207207
1,free_page))
208208
{
209-
elog(ABORT,"overflow_page: problem with _hash_initbitmap.");
209+
elog(ERROR,"overflow_page: problem with _hash_initbitmap.");
210210
}
211211
metap->SPARES[splitnum]++;
212212
offset++;
213213
if (offset>SPLITMASK)
214214
{
215215
if (++splitnum >=NCACHED)
216216
{
217-
elog(ABORT,OVMSG);
217+
elog(ERROR,OVMSG);
218218
}
219219
metap->OVFL_POINT=splitnum;
220220
metap->SPARES[splitnum]=metap->SPARES[splitnum-1];
@@ -262,7 +262,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
262262
offset= (i ?bit-metap->SPARES[i-1] :bit);
263263
if (offset >=SPLITMASK)
264264
{
265-
elog(ABORT,OVMSG);
265+
elog(ERROR,OVMSG);
266266
}
267267

268268
/* initialize this page */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp