Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
679d39b9
Commit
679d39b9
authored
Jan 07, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Goodbye ABORT. Hello ERROR for all errors.
parent
e6c6146e
Changes
99
Hide whitespace changes
Inline
Side-by-side
Showing
99 changed files
with
493 additions
and
497 deletions
+493
-497
src/backend/access/common/heaptuple.c
src/backend/access/common/heaptuple.c
+14
-14
src/backend/access/common/indextuple.c
src/backend/access/common/indextuple.c
+6
-6
src/backend/access/common/printtup.c
src/backend/access/common/printtup.c
+3
-3
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+3
-3
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+3
-3
src/backend/access/gist/gistscan.c
src/backend/access/gist/gistscan.c
+3
-3
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashinsert.c
+3
-3
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashovfl.c
+7
-7
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashpage.c
+12
-12
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashscan.c
+2
-2
src/backend/access/hash/hashutil.c
src/backend/access/hash/hashutil.c
+2
-2
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+14
-14
src/backend/access/heap/hio.c
src/backend/access/heap/hio.c
+3
-3
src/backend/access/index/genam.c
src/backend/access/index/genam.c
+5
-5
src/backend/access/index/indexam.c
src/backend/access/index/indexam.c
+3
-3
src/backend/access/index/istrat.c
src/backend/access/index/istrat.c
+7
-7
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtinsert.c
+3
-3
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtpage.c
+7
-7
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtscan.c
+4
-4
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsearch.c
+7
-7
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtsort.c
+6
-6
src/backend/access/nbtree/nbtutils.c
src/backend/access/nbtree/nbtutils.c
+4
-4
src/backend/access/rtree/rtproc.c
src/backend/access/rtree/rtproc.c
+5
-5
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtree.c
+3
-3
src/backend/access/rtree/rtscan.c
src/backend/access/rtree/rtscan.c
+4
-4
src/backend/access/transam/transam.c
src/backend/access/transam/transam.c
+4
-4
src/backend/access/transam/transsup.c
src/backend/access/transam/transsup.c
+2
-2
src/backend/access/transam/varsup.c
src/backend/access/transam/varsup.c
+6
-6
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+2
-2
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+3
-3
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+5
-5
src/backend/executor/execAmi.c
src/backend/executor/execAmi.c
+2
-2
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+9
-9
src/backend/executor/execProcnode.c
src/backend/executor/execProcnode.c
+2
-2
src/backend/executor/execQual.c
src/backend/executor/execQual.c
+14
-14
src/backend/executor/execTuples.c
src/backend/executor/execTuples.c
+3
-3
src/backend/executor/execUtils.c
src/backend/executor/execUtils.c
+3
-3
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAgg.c
+6
-6
src/backend/executor/nodeHash.c
src/backend/executor/nodeHash.c
+5
-5
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeIndexscan.c
+5
-5
src/backend/executor/nodeSort.c
src/backend/executor/nodeSort.c
+2
-2
src/backend/executor/nodeTee.c
src/backend/executor/nodeTee.c
+2
-2
src/backend/lib/stringinfo.c
src/backend/lib/stringinfo.c
+4
-4
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-fsstubs.c
+12
-12
src/backend/libpq/be-pqexec.c
src/backend/libpq/be-pqexec.c
+4
-4
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+5
-5
src/backend/nodes/equalfuncs.c
src/backend/nodes/equalfuncs.c
+2
-2
src/backend/nodes/list.c
src/backend/nodes/list.c
+2
-2
src/backend/nodes/read.c
src/backend/nodes/read.c
+2
-2
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+4
-4
src/backend/optimizer/geqo/geqo_erx.c
src/backend/optimizer/geqo/geqo_erx.c
+4
-4
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+2
-2
src/backend/optimizer/geqo/geqo_misc.c
src/backend/optimizer/geqo/geqo_misc.c
+2
-2
src/backend/optimizer/path/predmig.c
src/backend/optimizer/path/predmig.c
+5
-5
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/prune.c
+2
-2
src/backend/optimizer/path/xfunc.c
src/backend/optimizer/path/xfunc.c
+12
-12
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+6
-6
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planmain.c
+2
-2
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/planner.c
+12
-12
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/setrefs.c
+5
-5
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/plancat.c
+11
-11
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/linux.c
+2
-2
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteDefine.c
+8
-8
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteHandler.c
+2
-2
src/backend/rewrite/rewriteRemove.c
src/backend/rewrite/rewriteRemove.c
+5
-5
src/backend/rewrite/rewriteSupport.c
src/backend/rewrite/rewriteSupport.c
+3
-3
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_init.c
+3
-3
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/buf_table.c
+5
-5
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+5
-5
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/freelist.c
+2
-2
src/backend/storage/buffer/localbuf.c
src/backend/storage/buffer/localbuf.c
+2
-2
src/backend/storage/file/fd.c
src/backend/storage/file/fd.c
+3
-3
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipc.c
+2
-2
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/shmem.c
+5
-5
src/backend/storage/large_object/inv_api.c
src/backend/storage/large_object/inv_api.c
+5
-5
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lmgr.c
+5
-5
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+3
-3
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/multi.c
+6
-6
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/proc.c
+5
-5
src/backend/storage/page/bufpage.c
src/backend/storage/page/bufpage.c
+2
-2
src/backend/storage/smgr/md.c
src/backend/storage/smgr/md.c
+4
-4
src/backend/storage/smgr/smgr.c
src/backend/storage/smgr/smgr.c
+13
-13
src/backend/storage/smgr/smgrtype.c
src/backend/storage/smgr/smgrtype.c
+3
-3
src/backend/tcop/fastpath.c
src/backend/tcop/fastpath.c
+9
-9
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+9
-9
src/backend/tcop/pquery.c
src/backend/tcop/pquery.c
+2
-2
src/backend/utils/cache/catcache.c
src/backend/utils/cache/catcache.c
+4
-4
src/backend/utils/cache/fcache.c
src/backend/utils/cache/fcache.c
+6
-6
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/lsyscache.c
+3
-3
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+15
-15
src/backend/utils/cache/syscache.c
src/backend/utils/cache/syscache.c
+6
-6
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+4
-7
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/dfmgr.c
+8
-8
src/backend/utils/fmgr/fmgr.c
src/backend/utils/fmgr/fmgr.c
+11
-11
src/backend/utils/misc/database.c
src/backend/utils/misc/database.c
+2
-2
src/backend/utils/sort/psort.c
src/backend/utils/sort/psort.c
+4
-4
src/include/utils/elog.h
src/include/utils/elog.h
+4
-5
src/tutorial/C-code/beard.c
src/tutorial/C-code/beard.c
+6
-6
src/tutorial/C-code/complex.c
src/tutorial/C-code/complex.c
+1
-1
No files found.
src/backend/access/common/heaptuple.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.
29 1998/01/05 03:28:57
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.
30 1998/01/07 21:00:40
momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
...
...
@@ -93,7 +93,7 @@ ComputeDataSize(TupleDesc tupleDesc,
break
;
default:
if
(
att
[
i
]
->
attlen
<
sizeof
(
int32
))
elog
(
ABORT
,
"ComputeDataSize: attribute %d has len %d"
,
elog
(
ERROR
,
"ComputeDataSize: attribute %d has len %d"
,
i
,
att
[
i
]
->
attlen
);
if
(
att
[
i
]
->
attalign
==
'd'
)
data_length
=
DOUBLEALIGN
(
data_length
)
+
att
[
i
]
->
attlen
;
...
...
@@ -194,7 +194,7 @@ DataFill(char *data,
break
;
default:
if
(
att
[
i
]
->
attlen
<
sizeof
(
int32
))
elog
(
ABORT
,
"DataFill: attribute %d has len %d"
,
elog
(
ERROR
,
"DataFill: attribute %d has len %d"
,
i
,
att
[
i
]
->
attlen
);
if
(
att
[
i
]
->
attalign
==
'd'
)
{
...
...
@@ -249,10 +249,10 @@ heap_attisnull(HeapTuple tup, int attnum)
break
;
case
0
:
elog
(
ABORT
,
"heap_attisnull: zero attnum disallowed"
);
elog
(
ERROR
,
"heap_attisnull: zero attnum disallowed"
);
default:
elog
(
ABORT
,
"heap_attisnull: undefined negative attnum"
);
elog
(
ERROR
,
"heap_attisnull: undefined negative attnum"
);
}
return
(
0
);
...
...
@@ -290,7 +290,7 @@ heap_sysattrlen(AttrNumber attno)
return
sizeof
f
->
t_cmax
;
default:
elog
(
ABORT
,
"sysattrlen: System attribute number %d unknown."
,
attno
);
elog
(
ERROR
,
"sysattrlen: System attribute number %d unknown."
,
attno
);
return
0
;
}
}
...
...
@@ -328,7 +328,7 @@ heap_sysattrbyval(AttrNumber attno)
break
;
default:
byval
=
true
;
elog
(
ABORT
,
"sysattrbyval: System attribute number %d unknown."
,
elog
(
ERROR
,
"sysattrbyval: System attribute number %d unknown."
,
attno
);
break
;
}
...
...
@@ -358,7 +358,7 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
case
MaxCommandIdAttributeNumber
:
return
((
Datum
)
(
long
)
tup
->
t_cmax
);
default:
elog
(
ABORT
,
"heap_getsysattr: undefined attnum %d"
,
attnum
);
elog
(
ERROR
,
"heap_getsysattr: undefined attnum %d"
,
attnum
);
}
return
((
Datum
)
NULL
);
}
...
...
@@ -538,7 +538,7 @@ fastgetattr(HeapTuple tup,
default:
if
(
att
[
j
]
->
attlen
<
sizeof
(
int32
))
{
elog
(
ABORT
,
elog
(
ERROR
,
"fastgetattr: attribute %d has len %d"
,
j
,
att
[
j
]
->
attlen
);
}
...
...
@@ -598,7 +598,7 @@ fastgetattr(HeapTuple tup,
break
;
default:
if
(
att
[
i
]
->
attlen
<
sizeof
(
int32
))
elog
(
ABORT
,
elog
(
ERROR
,
"fastgetattr2: attribute %d has len %d"
,
i
,
att
[
i
]
->
attlen
);
if
(
att
[
i
]
->
attalign
==
'd'
)
...
...
@@ -657,7 +657,7 @@ fastgetattr(HeapTuple tup,
break
;
default:
if
(
att
[
attnum
]
->
attlen
<
sizeof
(
int32
))
elog
(
ABORT
,
"fastgetattr3: attribute %d has len %d"
,
elog
(
ERROR
,
"fastgetattr3: attribute %d has len %d"
,
attnum
,
att
[
attnum
]
->
attlen
);
if
(
att
[
attnum
]
->
attalign
==
'd'
)
off
=
DOUBLEALIGN
(
off
);
...
...
@@ -686,7 +686,7 @@ heap_copytuple(HeapTuple tuple)
/* XXX For now, just prevent an undetectable executor related error */
if
(
tuple
->
t_len
>
MAXTUPLEN
)
{
elog
(
ABORT
,
"palloctup: cannot handle length %d tuples"
,
elog
(
ERROR
,
"palloctup: cannot handle length %d tuples"
,
tuple
->
t_len
);
}
...
...
@@ -773,7 +773,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
}
if
(
numberOfAttributes
>
MaxHeapAttributeNumber
)
elog
(
ABORT
,
"heap_formtuple: numberOfAttributes of %d > %d"
,
elog
(
ERROR
,
"heap_formtuple: numberOfAttributes of %d > %d"
,
numberOfAttributes
,
MaxHeapAttributeNumber
);
if
(
hasnull
)
...
...
@@ -883,7 +883,7 @@ heap_modifytuple(HeapTuple tuple,
}
else
if
(
repl
[
attoff
]
!=
'r'
)
{
elog
(
ABORT
,
"heap_modifytuple: repl is
\\
%3d"
,
repl
[
attoff
]);
elog
(
ERROR
,
"heap_modifytuple: repl is
\\
%3d"
,
repl
[
attoff
]);
}
else
...
...
src/backend/access/common/indextuple.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.2
1 1998/01/05 03:28:59
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.2
2 1998/01/07 21:00:43
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -56,7 +56,7 @@ index_formtuple(TupleDesc tupleDescriptor,
int
numberOfAttributes
=
tupleDescriptor
->
natts
;
if
(
numberOfAttributes
>
MaxIndexAttributeNumber
)
elog
(
ABORT
,
"index_formtuple: numberOfAttributes of %d > %d"
,
elog
(
ERROR
,
"index_formtuple: numberOfAttributes of %d > %d"
,
numberOfAttributes
,
MaxIndexAttributeNumber
);
...
...
@@ -103,7 +103,7 @@ index_formtuple(TupleDesc tupleDescriptor,
*/
if
(
size
&
0xE000
)
elog
(
ABORT
,
"index_formtuple: data takes %d bytes: too big"
,
size
);
elog
(
ERROR
,
"index_formtuple: data takes %d bytes: too big"
,
size
);
infomask
|=
size
;
...
...
@@ -314,7 +314,7 @@ fastgetiattr(IndexTuple tup,
off
=
(
att
[
j
]
->
attalign
==
'd'
)
?
DOUBLEALIGN
(
off
)
:
LONGALIGN
(
off
);
else
elog
(
ABORT
,
"fastgetiattr: attribute %d has len %d"
,
elog
(
ERROR
,
"fastgetiattr: attribute %d has len %d"
,
j
,
att
[
j
]
->
attlen
);
break
;
...
...
@@ -382,7 +382,7 @@ fastgetiattr(IndexTuple tup,
DOUBLEALIGN
(
off
)
+
att
[
i
]
->
attlen
:
LONGALIGN
(
off
)
+
att
[
i
]
->
attlen
;
else
elog
(
ABORT
,
"fastgetiattr2: attribute %d has len %d"
,
elog
(
ERROR
,
"fastgetiattr2: attribute %d has len %d"
,
i
,
att
[
i
]
->
attlen
);
break
;
...
...
@@ -409,7 +409,7 @@ fastgetiattr(IndexTuple tup,
break
;
default:
if
(
att
[
attnum
]
->
attlen
<
sizeof
(
int32
))
elog
(
ABORT
,
"fastgetattr3: attribute %d has len %d"
,
elog
(
ERROR
,
"fastgetattr3: attribute %d has len %d"
,
attnum
,
att
[
attnum
]
->
attlen
);
if
(
att
[
attnum
]
->
attalign
==
'd'
)
off
=
DOUBLEALIGN
(
off
);
...
...
src/backend/access/common/printtup.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.2
1 1998/01/05 03:29:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.2
2 1998/01/07 21:00:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -45,7 +45,7 @@ typtoout(Oid type)
return
((
Oid
)
((
TypeTupleForm
)
GETSTRUCT
(
typeTuple
))
->
typoutput
);
elog
(
ABORT
,
"typtoout: Cache lookup of type %d failed"
,
type
);
elog
(
ERROR
,
"typtoout: Cache lookup of type %d failed"
,
type
);
return
(
InvalidOid
);
}
...
...
@@ -62,7 +62,7 @@ gettypelem(Oid type)
return
((
Oid
)
((
TypeTupleForm
)
GETSTRUCT
(
typeTuple
))
->
typelem
);
elog
(
ABORT
,
"typtoout: Cache lookup of type %d failed"
,
type
);
elog
(
ERROR
,
"typtoout: Cache lookup of type %d failed"
,
type
);
return
(
InvalidOid
);
}
...
...
src/backend/access/common/tupdesc.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.3
0 1998/01/05 03:29:01
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.3
1 1998/01/07 21:00:45
momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -321,7 +321,7 @@ TupleDescInitEntry(TupleDesc desc,
* RelationNameCreateHeapRelation() calls BuildDesc() which
* calls this routine and since EMP does not exist yet, the
* system cache lookup below fails. That's fine, but rather
* then doing a elog(
ABORT
) we just leave that information
* then doing a elog(
ERROR
) we just leave that information
* uninitialized, return false, then fix things up later.
* -cim 6/14/90
* ----------------
...
...
@@ -508,7 +508,7 @@ BuildDescForRelation(List *schema, char *relname)
TupleDescMakeSelfReference
(
desc
,
attnum
,
relname
);
}
else
elog
(
ABORT
,
"DefineRelation: no such type %s"
,
elog
(
ERROR
,
"DefineRelation: no such type %s"
,
typename
);
}
...
...
src/backend/access/gist/gist.c
View file @
679d39b9
...
...
@@ -130,7 +130,7 @@ gistbuild(Relation heap,
*/
if
(
oldPred
==
NULL
&&
(
nb
=
RelationGetNumberOfBlocks
(
index
))
!=
0
)
elog
(
ABORT
,
"%.16s already contains data"
,
&
(
index
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
ERROR
,
"%.16s already contains data"
,
&
(
index
->
rd_rel
->
relname
.
data
[
0
]));
/* initialize the root page (if this is a new index) */
if
(
oldPred
==
NULL
)
...
...
@@ -1182,7 +1182,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
0
,
0
,
0
);
itupform
=
(
IndexTupleForm
)
GETSTRUCT
(
htup
);
if
(
!
HeapTupleIsValid
(
htup
))
elog
(
ABORT
,
"initGISTstate: index %d not found"
,
index
->
rd_id
);
elog
(
ERROR
,
"initGISTstate: index %d not found"
,
index
->
rd_id
);
giststate
->
haskeytype
=
itupform
->
indhaskeytype
;
if
(
giststate
->
haskeytype
)
{
...
...
@@ -1193,7 +1193,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
0
,
0
);
if
(
!
HeapTupleIsValid
(
htup
))
{
elog
(
ABORT
,
"initGISTstate: no attribute tuple %d %d"
,
elog
(
ERROR
,
"initGISTstate: no attribute tuple %d %d"
,
itupform
->
indexrelid
,
FirstOffsetNumber
);
return
;
}
...
...
src/backend/access/gist/gistscan.c
View file @
679d39b9
...
...
@@ -83,7 +83,7 @@ gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
if
(
!
IndexScanIsValid
(
s
))
{
elog
(
ABORT
,
"gistrescan: invalid scan."
);
elog
(
ERROR
,
"gistrescan: invalid scan."
);
return
;
}
...
...
@@ -281,7 +281,7 @@ gistdropscan(IndexScanDesc s)
}
if
(
l
==
(
GISTScanList
)
NULL
)
elog
(
ABORT
,
"GiST scan list corrupted -- cannot find 0x%lx"
,
s
);
elog
(
ERROR
,
"GiST scan list corrupted -- cannot find 0x%lx"
,
s
);
if
(
prev
==
(
GISTScanList
)
NULL
)
GISTScans
=
l
->
gsl_next
;
...
...
@@ -397,7 +397,7 @@ adjustiptr(IndexScanDesc s,
break
;
default:
elog
(
ABORT
,
"Bad operation in GiST scan adjust: %d"
,
op
);
elog
(
ERROR
,
"Bad operation in GiST scan adjust: %d"
,
op
);
}
}
}
...
...
src/backend/access/hash/hashinsert.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.1
1 1998/01/05 03:29:15
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.1
2 1998/01/07 21:00:56
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -49,7 +49,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
/* we need a scan key to do our search, so build one */
itup
=
&
(
hitem
->
hash_itup
);
if
((
natts
=
rel
->
rd_rel
->
relnatts
)
!=
1
)
elog
(
ABORT
,
"Hash indices valid for only one index key."
);
elog
(
ERROR
,
"Hash indices valid for only one index key."
);
itup_scankey
=
_hash_mkscankey
(
rel
,
itup
,
metap
);
/*
...
...
@@ -167,7 +167,7 @@ _hash_insertonpg(Relation rel,
if
(
PageGetFreeSpace
(
page
)
<
itemsz
)
{
/* it doesn't fit on an empty page -- give up */
elog
(
ABORT
,
"hash item too large"
);
elog
(
ERROR
,
"hash item too large"
);
}
}
_hash_checkpage
(
page
,
LH_OVERFLOW_PAGE
);
...
...
src/backend/access/hash/hashovfl.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.1
4 1998/01/05 03:29:2
0 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.1
5 1998/01/07 21:01:0
0 momjian Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
...
...
@@ -65,7 +65,7 @@ _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
oaddr
=
_hash_getovfladdr
(
rel
,
metabufp
);
if
(
oaddr
==
InvalidOvflAddress
)
{
elog
(
ABORT
,
"_hash_addovflpage: problem with _hash_getovfladdr."
);
elog
(
ERROR
,
"_hash_addovflpage: problem with _hash_getovfladdr."
);
}
ovflblkno
=
OADDR_TO_BLKNO
(
OADDR_OF
(
SPLITNUM
(
oaddr
),
OPAGENUM
(
oaddr
)));
Assert
(
BlockNumberIsValid
(
ovflblkno
));
...
...
@@ -172,7 +172,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
{
if
(
++
splitnum
>=
NCACHED
)
{
elog
(
ABORT
,
OVMSG
);
elog
(
ERROR
,
OVMSG
);
}
metap
->
OVFL_POINT
=
splitnum
;
metap
->
SPARES
[
splitnum
]
=
metap
->
SPARES
[
splitnum
-
1
];
...
...
@@ -190,7 +190,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
free_page
++
;
if
(
free_page
>=
NCACHED
)
{
elog
(
ABORT
,
OVMSG
);
elog
(
ERROR
,
OVMSG
);
}
/*
...
...
@@ -206,7 +206,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
if
(
_hash_initbitmap
(
rel
,
metap
,
OADDR_OF
(
splitnum
,
offset
),
1
,
free_page
))
{
elog
(
ABORT
,
"overflow_page: problem with _hash_initbitmap."
);
elog
(
ERROR
,
"overflow_page: problem with _hash_initbitmap."
);
}
metap
->
SPARES
[
splitnum
]
++
;
offset
++
;
...
...
@@ -214,7 +214,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
{
if
(
++
splitnum
>=
NCACHED
)
{
elog
(
ABORT
,
OVMSG
);
elog
(
ERROR
,
OVMSG
);
}
metap
->
OVFL_POINT
=
splitnum
;
metap
->
SPARES
[
splitnum
]
=
metap
->
SPARES
[
splitnum
-
1
];
...
...
@@ -262,7 +262,7 @@ found:
offset
=
(
i
?
bit
-
metap
->
SPARES
[
i
-
1
]
:
bit
);
if
(
offset
>=
SPLITMASK
)
{
elog
(
ABORT
,
OVMSG
);
elog
(
ERROR
,
OVMSG
);
}
/* initialize this page */
...
...
src/backend/access/hash/hashpage.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.1
4 1998/01/05 03:29:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.1
5 1998/01/07 21:01:08
momjian Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
...
...
@@ -85,7 +85,7 @@ _hash_metapinit(Relation rel)
if
((
nblocks
=
RelationGetNumberOfBlocks
(
rel
))
!=
0
)
{
elog
(
ABORT
,
"Cannot initialize non-empty hash table %s"
,
elog
(
ERROR
,
"Cannot initialize non-empty hash table %s"
,
RelationGetRelationName
(
rel
));
}
...
...
@@ -146,7 +146,7 @@ _hash_metapinit(Relation rel)
* created the first two buckets above.
*/
if
(
_hash_initbitmap
(
rel
,
metap
,
OADDR_OF
(
lg2nelem
,
1
),
lg2nelem
+
1
,
0
))
elog
(
ABORT
,
"Problem with _hash_initbitmap."
);
elog
(
ERROR
,
"Problem with _hash_initbitmap."
);
/* all done */
_hash_wrtnorelbuf
(
rel
,
metabuf
);
...
...
@@ -192,7 +192,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
if
(
blkno
==
P_NEW
)
{
elog
(
ABORT
,
"_hash_getbuf: internal error: hash AM does not use P_NEW"
);
elog
(
ERROR
,
"_hash_getbuf: internal error: hash AM does not use P_NEW"
);
}
switch
(
access
)
{
...
...
@@ -201,7 +201,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
_hash_setpagelock
(
rel
,
blkno
,
access
);
break
;
default:
elog
(
ABORT
,
"_hash_getbuf: invalid access (%d) on new blk: %s"
,
elog
(
ERROR
,
"_hash_getbuf: invalid access (%d) on new blk: %s"
,
access
,
RelationGetRelationName
(
rel
));
break
;
}
...
...
@@ -228,7 +228,7 @@ _hash_relbuf(Relation rel, Buffer buf, int access)
_hash_unsetpagelock
(
rel
,
blkno
,
access
);
break
;
default:
elog
(
ABORT
,
"_hash_relbuf: invalid access (%d) on blk %x: %s"
,
elog
(
ERROR
,
"_hash_relbuf: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
}
...
...
@@ -287,7 +287,7 @@ _hash_chgbufaccess(Relation rel,
_hash_relbuf
(
rel
,
*
bufp
,
from_access
);
break
;
default:
elog
(
ABORT
,
"_hash_chgbufaccess: invalid access (%d) on blk %x: %s"
,
elog
(
ERROR
,
"_hash_chgbufaccess: invalid access (%d) on blk %x: %s"
,
from_access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
...
...
@@ -335,7 +335,7 @@ _hash_setpagelock(Relation rel,
RelationSetSingleRLockPage
(
rel
,
&
iptr
);
break
;
default:
elog
(
ABORT
,
"_hash_setpagelock: invalid access (%d) on blk %x: %s"
,
elog
(
ERROR
,
"_hash_setpagelock: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
...
...
@@ -362,7 +362,7 @@ _hash_unsetpagelock(Relation rel,
RelationUnsetSingleRLockPage
(
rel
,
&
iptr
);
break
;
default:
elog
(
ABORT
,
"_hash_unsetpagelock: invalid access (%d) on blk %x: %s"
,
elog
(
ERROR
,
"_hash_unsetpagelock: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
...
...
@@ -546,7 +546,7 @@ _hash_splitpage(Relation rel,
_hash_checkpage
(
opage
,
LH_OVERFLOW_PAGE
);
if
(
PageIsEmpty
(
opage
))
{
elog
(
ABORT
,
"_hash_splitpage: empty overflow page %d"
,
oblkno
);
elog
(
ERROR
,
"_hash_splitpage: empty overflow page %d"
,
oblkno
);
}
oopaque
=
(
HashPageOpaque
)
PageGetSpecialPointer
(
opage
);
}
...
...
@@ -588,7 +588,7 @@ _hash_splitpage(Relation rel,
/* we're guaranteed that an ovfl page has at least 1 tuple */
if
(
PageIsEmpty
(
opage
))
{
elog
(
ABORT
,
"_hash_splitpage: empty ovfl page %d!"
,
elog
(
ERROR
,
"_hash_splitpage: empty ovfl page %d!"
,
oblkno
);
}
ooffnum
=
FirstOffsetNumber
;
...
...
@@ -685,7 +685,7 @@ _hash_splitpage(Relation rel,
oopaque
=
(
HashPageOpaque
)
PageGetSpecialPointer
(
opage
);
if
(
PageIsEmpty
(
opage
))
{
elog
(
ABORT
,
"_hash_splitpage: empty overflow page %d"
,
elog
(
ERROR
,
"_hash_splitpage: empty overflow page %d"
,
oblkno
);
}
ooffnum
=
FirstOffsetNumber
;
...
...
src/backend/access/hash/hashscan.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.1
2 1998/01/05 03:29:24
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.1
3 1998/01/07 21:01:13
momjian Exp $
*
* NOTES
* 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
)
elog
(
ABORT
,
"hash scan list trashed; can't find 0x%lx"
,
scan
);
elog
(
ERROR
,
"hash scan list trashed; can't find 0x%lx"
,
scan
);
if
(
last
==
(
HashScanList
)
NULL
)
HashScans
=
chk
->
hashsl_next
;
...
...
src/backend/access/hash/hashutil.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.1
2 1998/01/05 03:29:2
6 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.1
3 1998/01/07 21:01:1
6 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -79,7 +79,7 @@ _hash_formitem(IndexTuple itup)
/* disallow nulls in hash keys */
if
(
itup
->
t_info
&
INDEX_NULL_MASK
)
elog
(
ABORT
,
"hash indices cannot include null keys"
);
elog
(
ERROR
,
"hash indices cannot include null keys"
);
/* make a copy of the index tuple with room for the sequence number */
tuplen
=
IndexTupleSize
(
itup
);
...
...
src/backend/access/heap/heapam.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.2
4 1998/01/05 03:29:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.2
5 1998/01/07 21:01:20
momjian Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -295,7 +295,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
*
b
))
elog
(
ABORT
,
"heapgettup: failed ReadBuffer"
);
elog
(
ERROR
,
"heapgettup: failed ReadBuffer"
);
#endif
dp
=
(
Page
)
BufferGetPage
(
*
b
);
...
...
@@ -334,7 +334,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
*
b
))
{
elog
(
ABORT
,
"heapgettup: failed ReadBuffer"
);
elog
(
ERROR
,
"heapgettup: failed ReadBuffer"
);
}
#endif
...
...
@@ -381,7 +381,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
*
b
))
{
elog
(
ABORT
,
"heapgettup: failed ReadBuffer"
);
elog
(
ERROR
,
"heapgettup: failed ReadBuffer"
);
}
#endif
...
...
@@ -477,7 +477,7 @@ heapgettup(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
*
b
))
{
elog
(
ABORT
,
"heapgettup: failed ReadBuffer"
);
elog
(
ERROR
,
"heapgettup: failed ReadBuffer"
);
}
#endif
dp
=
(
Page
)
BufferGetPage
(
*
b
);
...
...
@@ -545,7 +545,7 @@ heap_open(Oid relationId)
if
(
RelationIsValid
(
r
)
&&
r
->
rd_rel
->
relkind
==
RELKIND_INDEX
)
{
elog
(
ABORT
,
"%s is an index relation"
,
r
->
rd_rel
->
relname
.
data
);
elog
(
ERROR
,
"%s is an index relation"
,
r
->
rd_rel
->
relname
.
data
);
}
return
(
r
);
...
...
@@ -574,7 +574,7 @@ heap_openr(char *relationName)
if
(
RelationIsValid
(
r
)
&&
r
->
rd_rel
->
relkind
==
RELKIND_INDEX
)
{
elog
(
ABORT
,
"%s is an index relation"
,
r
->
rd_rel
->
relname
.
data
);
elog
(
ERROR
,
"%s is an index relation"
,
r
->
rd_rel
->
relname
.
data
);
}
return
(
r
);
...
...
@@ -626,7 +626,7 @@ heap_beginscan(Relation relation,
* ----------------
*/
if
(
RelationIsValid
(
relation
)
==
false
)
elog
(
ABORT
,
"heap_beginscan: !RelationIsValid(relation)"
);
elog
(
ERROR
,
"heap_beginscan: !RelationIsValid(relation)"
);
/* ----------------
* set relation level read lock
...
...
@@ -808,7 +808,7 @@ heap_getnext(HeapScanDesc scandesc,
* ----------------
*/
if
(
sdesc
==
NULL
)
elog
(
ABORT
,
"heap_getnext: NULL relscan"
);
elog
(
ERROR
,
"heap_getnext: NULL relscan"
);
/* ----------------
* initialize return buffer to InvalidBuffer
...
...
@@ -1051,7 +1051,7 @@ heap_fetch(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
buffer
))
{
elog
(
ABORT
,
"heap_fetch: %s relation: ReadBuffer(%lx) failed"
,
elog
(
ERROR
,
"heap_fetch: %s relation: ReadBuffer(%lx) failed"
,
&
relation
->
rd_rel
->
relname
,
(
long
)
tid
);
}
#endif
...
...
@@ -1216,7 +1216,7 @@ heap_delete(Relation relation, ItemPointer tid)
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
b
))
{
/* XXX L_SH better ??? */
elog
(
ABORT
,
"heap_delete: failed ReadBuffer"
);
elog
(
ERROR
,
"heap_delete: failed ReadBuffer"
);
}
#endif
/* NO_BUFFERISVALID */
...
...
@@ -1249,7 +1249,7 @@ heap_delete(Relation relation, ItemPointer tid)
/* XXX call something else */
ReleaseBuffer
(
b
);
elog
(
ABORT
,
"heap_delete: (am)invalid tid"
);
elog
(
ERROR
,
"heap_delete: (am)invalid tid"
);
}
/* ----------------
...
...
@@ -1329,7 +1329,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
if
(
!
BufferIsValid
(
buffer
))
{
/* XXX L_SH better ??? */
elog
(
ABORT
,
"amreplace: failed ReadBuffer"
);
elog
(
ERROR
,
"amreplace: failed ReadBuffer"
);
}
#endif
/* NO_BUFFERISVALID */
...
...
@@ -1385,7 +1385,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
if
(
!
tuple
)
{
ReleaseBuffer
(
buffer
);
elog
(
ABORT
,
"heap_replace: (am)invalid otid"
);
elog
(
ERROR
,
"heap_replace: (am)invalid otid"
);
}
/* XXX order problems if not atomic assignment ??? */
...
...
src/backend/access/heap/hio.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Id: hio.c,v 1.1
2 1998/01/05 03:29:30
momjian Exp $
* $Id: hio.c,v 1.1
3 1998/01/07 21:01:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -60,7 +60,7 @@ RelationPutHeapTuple(Relation relation,
#ifndef NO_BUFFERISVALID
if
(
!
BufferIsValid
(
buffer
))
{
elog
(
ABORT
,
"RelationPutHeapTuple: no buffer for %ld in %s"
,
elog
(
ERROR
,
"RelationPutHeapTuple: no buffer for %ld in %s"
,
blockIndex
,
&
relation
->
rd_rel
->
relname
);
}
#endif
...
...
@@ -157,7 +157,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
PageInit
(
pageHeader
,
BufferGetPageSize
(
buffer
),
0
);
if
(
len
>
PageGetFreeSpace
(
pageHeader
))
elog
(
ABORT
,
"Tuple is too big: size %d"
,
len
);
elog
(
ERROR
,
"Tuple is too big: size %d"
,
len
);
}
offnum
=
PageAddItem
((
Page
)
pageHeader
,
(
Item
)
tuple
,
...
...
src/backend/access/index/genam.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.1
0 1998/01/05 03:29:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.1
1 1998/01/07 21:01:35
momjian Exp $
*
* NOTES
* many of the old access method routines have been turned into
...
...
@@ -101,7 +101,7 @@ RelationGetIndexScan(Relation relation,
IndexScanDesc
scan
;
if
(
!
RelationIsValid
(
relation
))
elog
(
ABORT
,
"RelationGetIndexScan: relation invalid"
);
elog
(
ERROR
,
"RelationGetIndexScan: relation invalid"
);
scan
=
(
IndexScanDesc
)
palloc
(
sizeof
(
IndexScanDescData
));
...
...
@@ -150,7 +150,7 @@ IndexScanRestart(IndexScanDesc scan,
ScanKey
key
)
{
if
(
!
IndexScanIsValid
(
scan
))
elog
(
ABORT
,
"IndexScanRestart: invalid scan"
);
elog
(
ERROR
,
"IndexScanRestart: invalid scan"
);
ItemPointerSetInvalid
(
&
scan
->
previousItemData
);
ItemPointerSetInvalid
(
&
scan
->
currentItemData
);
...
...
@@ -191,7 +191,7 @@ void
IndexScanEnd
(
IndexScanDesc
scan
)
{
if
(
!
IndexScanIsValid
(
scan
))
elog
(
ABORT
,
"IndexScanEnd: invalid scan"
);
elog
(
ERROR
,
"IndexScanEnd: invalid scan"
);
pfree
(
scan
);
}
...
...
@@ -274,7 +274,7 @@ void
IndexScanRestorePosition
(
IndexScanDesc
scan
)
{
if
(
scan
->
flags
&
ScanUnmarked
)
elog
(
ABORT
,
"IndexScanRestorePosition: no mark to restore"
);
elog
(
ERROR
,
"IndexScanRestorePosition: no mark to restore"
);
scan
->
previousItemData
=
scan
->
previousMarkData
;
scan
->
currentItemData
=
scan
->
currentMarkData
;
...
...
src/backend/access/index/indexam.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.1
8 1998/01/05 03:29:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.1
9 1998/01/07 21:01:42
momjian Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
...
...
@@ -103,13 +103,13 @@ Assert(RelationIsValid(relation)); \
#define GET_REL_PROCEDURE(x,y) \
procedure = relation->rd_am->y; \
if (! RegProcedureIsValid(procedure)) \
elog(
ABORT
, "index_%s: invalid %s regproc", \
elog(
ERROR
, "index_%s: invalid %s regproc", \
CppAsString(x), CppAsString(y))
#define GET_SCAN_PROCEDURE(x,y) \
procedure = scan->relation->rd_am->y; \
if (! RegProcedureIsValid(procedure)) \
elog(
ABORT
, "index_%s: invalid %s regproc", \
elog(
ERROR
, "index_%s: invalid %s regproc", \
CppAsString(x), CppAsString(y))
...
...
src/backend/access/index/istrat.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.1
4 1998/01/05 03:29:38
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.1
5 1998/01/07 21:01:45
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -349,7 +349,7 @@ RelationGetStrategy(Relation relation,
{
if
(
!
StrategyNumberIsValid
(
strategy
))
{
elog
(
ABORT
,
"RelationGetStrategy: corrupted evaluation"
);
elog
(
ERROR
,
"RelationGetStrategy: corrupted evaluation"
);
}
}
...
...
@@ -481,7 +481,7 @@ RelationInvokeStrategy(Relation relation,
}
}
elog
(
ABORT
,
"RelationInvokeStrategy: cannot evaluate strategy %d"
,
elog
(
ERROR
,
"RelationInvokeStrategy: cannot evaluate strategy %d"
,
strategy
);
/* not reached, just to make compiler happy */
...
...
@@ -514,7 +514,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
tuple
=
heap_getnext
(
scan
,
false
,
(
Buffer
*
)
NULL
);
if
(
!
HeapTupleIsValid
(
tuple
))
{
elog
(
ABORT
,
"OperatorObjectIdFillScanKeyEntry: unknown operator %lu"
,
elog
(
ERROR
,
"OperatorObjectIdFillScanKeyEntry: unknown operator %lu"
,
(
uint32
)
operatorObjectId
);
}
...
...
@@ -525,7 +525,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
if
(
!
RegProcedureIsValid
(
entry
->
sk_procedure
))
{
elog
(
ABORT
,
elog
(
ERROR
,
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu"
,
(
uint32
)
operatorObjectId
);
}
...
...
@@ -567,7 +567,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
scan
=
heap_beginscan
(
relation
,
false
,
false
,
1
,
entry
);
tuple
=
heap_getnext
(
scan
,
0
,
(
Buffer
*
)
NULL
);
if
(
!
HeapTupleIsValid
(
tuple
))
elog
(
ABORT
,
"IndexSupportInitialize: corrupted catalogs"
);
elog
(
ERROR
,
"IndexSupportInitialize: corrupted catalogs"
);
/*
* XXX note that the following assumes the INDEX tuple is well formed
...
...
@@ -583,7 +583,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
{
if
(
attributeIndex
==
0
)
{
elog
(
ABORT
,
"IndexSupportInitialize: no pg_index tuple"
);
elog
(
ERROR
,
"IndexSupportInitialize: no pg_index tuple"
);
}
break
;
}
...
...
src/backend/access/nbtree/nbtinsert.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.2
3 1998/01/05 03:29:45
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.2
4 1998/01/07 21:01:52
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
);
if
(
htup
!=
(
HeapTuple
)
NULL
)
{
/* it is a duplicate */
elog
(
ABORT
,
"Cannot insert a duplicate key into a unique index"
);
elog
(
ERROR
,
"Cannot insert a duplicate key into a unique index"
);
}
/* get next offnum */
if
(
offset
<
maxoff
)
...
...
@@ -1442,7 +1442,7 @@ _bt_updateitem(Relation rel,
* if(IndexTupleDSize(newItem->bti_itup) >
* IndexTupleDSize(item->bti_itup)) { elog(NOTICE, "trying to
* overwrite a smaller value with a bigger one in _bt_updateitem");
* elog(
ABORT
, "this is not good."); }
* elog(
ERROR
, "this is not good."); }
*/
oldIndexTuple
=
&
(
item
->
bti_itup
);
...
...
src/backend/access/nbtree/nbtpage.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.1
4 1998/01/05 03:29:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.1
5 1998/01/07 21:01:53
momjian Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
...
...
@@ -97,7 +97,7 @@ _bt_metapinit(Relation rel)
if
((
nblocks
=
RelationGetNumberOfBlocks
(
rel
))
!=
0
)
{
elog
(
ABORT
,
"Cannot initialize non-empty btree %s"
,
elog
(
ERROR
,
"Cannot initialize non-empty btree %s"
,
RelationGetRelationName
(
rel
));
}
...
...
@@ -146,20 +146,20 @@ _bt_checkmeta(Relation rel)
op
=
(
BTPageOpaque
)
PageGetSpecialPointer
(
metap
);
if
(
!
(
op
->
btpo_flags
&
BTP_META
))
{
elog
(
ABORT
,
"Invalid metapage for index %s"
,
elog
(
ERROR
,
"Invalid metapage for index %s"
,
RelationGetRelationName
(
rel
));
}
metad
=
BTPageGetMeta
(
metap
);
if
(
metad
->
btm_magic
!=
BTREE_MAGIC
)
{
elog
(
ABORT
,
"Index %s is not a btree"
,
elog
(
ERROR
,
"Index %s is not a btree"
,
RelationGetRelationName
(
rel
));
}
if
(
metad
->
btm_version
!=
BTREE_VERSION
)
{
elog
(
ABORT
,
"Version mismatch on %s: version %d file, version %d code"
,
elog
(
ERROR
,
"Version mismatch on %s: version %d file, version %d code"
,
RelationGetRelationName
(
rel
),
metad
->
btm_version
,
BTREE_VERSION
);
}
...
...
@@ -204,13 +204,13 @@ _bt_getroot(Relation rel, int access)
if
(
metad
->
btm_magic
!=
BTREE_MAGIC
)
{
elog
(
ABORT
,
"Index %s is not a btree"
,
elog
(
ERROR
,
"Index %s is not a btree"
,
RelationGetRelationName
(
rel
));
}
if
(
metad
->
btm_version
!=
BTREE_VERSION
)
{
elog
(
ABORT
,
"Version mismatch on %s: version %d file, version %d code"
,
elog
(
ERROR
,
"Version mismatch on %s: version %d file, version %d code"
,
RelationGetRelationName
(
rel
),
metad
->
btm_version
,
BTREE_VERSION
);
}
...
...
src/backend/access/nbtree/nbtscan.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.1
1 1998/01/05 03:29:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.1
2 1998/01/07 21:01:54
momjian Exp $
*
*
* NOTES
...
...
@@ -77,7 +77,7 @@ _bt_dropscan(IndexScanDesc scan)
}
if
(
chk
==
(
BTScanList
)
NULL
)
elog
(
ABORT
,
"btree scan list trashed; can't find 0x%lx"
,
scan
);
elog
(
ERROR
,
"btree scan list trashed; can't find 0x%lx"
,
scan
);
if
(
last
==
(
BTScanList
)
NULL
)
BTScans
=
chk
->
btsl_next
;
...
...
@@ -154,7 +154,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
_bt_step
(
scan
,
&
buf
,
BackwardScanDirection
);
break
;
default:
elog
(
ABORT
,
"_bt_scandel: bad operation '%d'"
,
op
);
elog
(
ERROR
,
"_bt_scandel: bad operation '%d'"
,
op
);
/* NOTREACHED */
}
so
->
btso_curbuf
=
buf
;
...
...
@@ -179,7 +179,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
_bt_step
(
scan
,
&
buf
,
BackwardScanDirection
);
break
;
default:
elog
(
ABORT
,
"_bt_scandel: bad operation '%d'"
,
op
);
elog
(
ERROR
,
"_bt_scandel: bad operation '%d'"
,
op
);
/* NOTREACHED */
}
so
->
btso_mrkbuf
=
buf
;
...
...
src/backend/access/nbtree/nbtsearch.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.2
8 1998/01/05 03:29:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.2
9 1998/01/07 21:01:56
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -617,7 +617,7 @@ _bt_compare(Relation rel,
*/
if
(
!
P_RIGHTMOST
(
opaque
))
{
elog
(
ABORT
,
"_bt_compare: invalid comparison to high key"
);
elog
(
ERROR
,
"_bt_compare: invalid comparison to high key"
);
}
#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 */
if
(
so
->
keyData
[
0
].
sk_flags
&
SK_ISNULL
)
{
elog
(
ABORT
,
"_bt_first: btree doesn't support is(not)null, yet"
);
elog
(
ERROR
,
"_bt_first: btree doesn't support is(not)null, yet"
);
return
((
RetrieveIndexResult
)
NULL
);
}
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.
*/
elog
(
ABORT
,
"btree synchronization error: concurrent update botched scan"
);
elog
(
ERROR
,
"btree synchronization error: concurrent update botched scan"
);
return
(
false
);
}
...
...
@@ -1416,7 +1416,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
if
(
ScanDirectionIsForward
(
dir
))
{
if
(
!
P_LEFTMOST
(
opaque
))
/* non-leftmost page ? */
elog
(
ABORT
,
"_bt_endpoint: leftmost page (%u) has not leftmost flag"
,
blkno
);
elog
(
ERROR
,
"_bt_endpoint: leftmost page (%u) has not leftmost flag"
,
blkno
);
start
=
P_RIGHTMOST
(
opaque
)
?
P_HIKEY
:
P_FIRSTKEY
;
/*
...
...
@@ -1440,7 +1440,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
if
(
PageIsEmpty
(
page
))
{
if
(
start
!=
P_HIKEY
)
/* non-rightmost page */
elog
(
ABORT
,
"_bt_endpoint: non-rightmost page (%u) is empty"
,
blkno
);
elog
(
ERROR
,
"_bt_endpoint: non-rightmost page (%u) is empty"
,
blkno
);
/*
* It's left- & right- most page - root page, - and it's
...
...
@@ -1512,7 +1512,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
}
else
{
elog
(
ABORT
,
"Illegal scan direction %d"
,
dir
);
elog
(
ERROR
,
"Illegal scan direction %d"
,
dir
);
}
btitem
=
(
BTItem
)
PageGetItem
(
page
,
PageGetItemId
(
page
,
start
));
...
...
src/backend/access/nbtree/nbtsort.c
View file @
679d39b9
...
...
@@ -5,7 +5,7 @@
*
*
* IDENTIFICATION
* $Id: nbtsort.c,v 1.2
5 1998/01/05 03:29:55
momjian Exp $
* $Id: nbtsort.c,v 1.2
6 1998/01/07 21:01:59
momjian Exp $
*
* NOTES
*
...
...
@@ -212,7 +212,7 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
if
(
_bt_inspool
->
isunique
&&
!
equal_isnull
)
{
_bt_spooldestroy
((
void
*
)
_bt_inspool
);
elog
(
ABORT
,
"Cannot create unique index. Table contains non-unique values"
);
elog
(
ERROR
,
"Cannot create unique index. Table contains non-unique values"
);
}
return
(
0
);
/* 1 = 2 */
}
...
...
@@ -333,7 +333,7 @@ _bt_pqadd(BTPriQueue *q, BTPriQueueElem *e)
if
(
q
->
btpq_nelem
>=
MAXELEM
)
{
elog
(
ABORT
,
"_bt_pqadd: queue overflow"
);
elog
(
ERROR
,
"_bt_pqadd: queue overflow"
);
}
child
=
q
->
btpq_nelem
++
;
...
...
@@ -426,7 +426,7 @@ _bt_tapecreate(char *fname)
if
(
tape
==
(
BTTapeBlock
*
)
NULL
)
{
elog
(
ABORT
,
"_bt_tapecreate: out of memory"
);
elog
(
ERROR
,
"_bt_tapecreate: out of memory"
);
}
tape
->
bttb_magic
=
BTTAPEMAGIC
;
...
...
@@ -563,7 +563,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if
(
btspool
==
(
BTSpool
*
)
NULL
||
fname
==
(
char
*
)
NULL
)
{
elog
(
ABORT
,
"_bt_spoolinit: out of memory"
);
elog
(
ERROR
,
"_bt_spoolinit: out of memory"
);
}
MemSet
((
char
*
)
btspool
,
0
,
sizeof
(
BTSpool
));
btspool
->
bts_ntapes
=
ntapes
;
...
...
@@ -577,7 +577,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if
(
btspool
->
bts_itape
==
(
BTTapeBlock
**
)
NULL
||
btspool
->
bts_otape
==
(
BTTapeBlock
**
)
NULL
)
{
elog
(
ABORT
,
"_bt_spoolinit: out of memory"
);
elog
(
ERROR
,
"_bt_spoolinit: out of memory"
);
}
for
(
i
=
0
;
i
<
ntapes
;
++
i
)
...
...
src/backend/access/nbtree/nbtutils.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.1
6 1998/01/05 03:29:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.1
7 1998/01/07 21:02:01
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -119,7 +119,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
cur
=
&
key
[
0
];
if
(
cur
->
sk_attno
!=
1
)
elog
(
ABORT
,
"_bt_orderkeys: key(s) for attribute 1 missed"
);
elog
(
ERROR
,
"_bt_orderkeys: key(s) for attribute 1 missed"
);
if
(
numberOfKeys
==
1
)
{
...
...
@@ -159,7 +159,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
{
if
(
cur
->
sk_attno
!=
attno
+
1
&&
i
<
numberOfKeys
)
{
elog
(
ABORT
,
"_bt_orderkeys: key(s) for attribute %d missed"
,
attno
+
1
);
elog
(
ERROR
,
"_bt_orderkeys: key(s) for attribute %d missed"
,
attno
+
1
);
}
/*
...
...
@@ -296,7 +296,7 @@ _bt_formitem(IndexTuple itup)
/*
* see comments in btbuild
*
* if (itup->t_info & INDEX_NULL_MASK) elog(
ABORT
, "btree indices cannot
* if (itup->t_info & INDEX_NULL_MASK) elog(
ERROR
, "btree indices cannot
* include null keys");
*/
...
...
src/backend/access/rtree/rtproc.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.1
4 1998/01/07 18:46:1
5 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.1
5 1998/01/07 21:02:0
5 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,7 @@ rt_box_union(BOX *a, BOX *b)
BOX
*
n
;
if
((
n
=
(
BOX
*
)
palloc
(
sizeof
(
*
n
)))
==
(
BOX
*
)
NULL
)
elog
(
ABORT
,
"Cannot allocate box for union"
);
elog
(
ERROR
,
"Cannot allocate box for union"
);
n
->
high
.
x
=
Max
(
a
->
high
.
x
,
b
->
high
.
x
);
n
->
high
.
y
=
Max
(
a
->
high
.
y
,
b
->
high
.
y
);
...
...
@@ -45,7 +45,7 @@ rt_box_inter(BOX *a, BOX *b)
BOX
*
n
;
if
((
n
=
(
BOX
*
)
palloc
(
sizeof
(
*
n
)))
==
(
BOX
*
)
NULL
)
elog
(
ABORT
,
"Cannot allocate box for union"
);
elog
(
ERROR
,
"Cannot allocate box for union"
);
n
->
high
.
x
=
Min
(
a
->
high
.
x
,
b
->
high
.
x
);
n
->
high
.
y
=
Min
(
a
->
high
.
y
,
b
->
high
.
y
);
...
...
@@ -94,7 +94,7 @@ rt_poly_union(POLYGON *a, POLYGON *b)
p
=
(
POLYGON
*
)
palloc
(
sizeof
(
POLYGON
));
if
(
!
PointerIsValid
(
p
))
elog
(
ABORT
,
"Cannot allocate polygon for union"
);
elog
(
ERROR
,
"Cannot allocate polygon for union"
);
MemSet
((
char
*
)
p
,
0
,
sizeof
(
POLYGON
));
/* zero any holes */
p
->
size
=
sizeof
(
POLYGON
);
...
...
@@ -136,7 +136,7 @@ rt_poly_inter(POLYGON *a, POLYGON *b)
p
=
(
POLYGON
*
)
palloc
(
sizeof
(
POLYGON
));
if
(
!
PointerIsValid
(
p
))
elog
(
ABORT
,
"Cannot allocate polygon for intersection"
);
elog
(
ERROR
,
"Cannot allocate polygon for intersection"
);
MemSet
((
char
*
)
p
,
0
,
sizeof
(
POLYGON
));
/* zero any holes */
p
->
size
=
sizeof
(
POLYGON
);
...
...
src/backend/access/rtree/rtree.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.2
0 1998/01/05 03:30:02
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.2
1 1998/01/07 21:02:07
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -125,7 +125,7 @@ rtbuild(Relation heap,
*/
if
(
oldPred
==
NULL
&&
(
nb
=
RelationGetNumberOfBlocks
(
index
))
!=
0
)
elog
(
ABORT
,
"%s already contains data"
,
index
->
rd_rel
->
relname
.
data
);
elog
(
ERROR
,
"%s already contains data"
,
index
->
rd_rel
->
relname
.
data
);
/* initialize the root page (if this is a new index) */
if
(
oldPred
==
NULL
)
...
...
@@ -664,7 +664,7 @@ rtintinsert(Relation r,
*/
if
(
IndexTupleSize
(
old
)
!=
IndexTupleSize
(
ltup
))
elog
(
ABORT
,
"Variable-length rtree keys are not supported."
);
elog
(
ERROR
,
"Variable-length rtree keys are not supported."
);
/* install pointer to left child */
memmove
(
old
,
ltup
,
IndexTupleSize
(
ltup
));
...
...
src/backend/access/rtree/rtscan.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.1
4 1998/01/05 03:30:05
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.1
5 1998/01/07 21:02:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -85,7 +85,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
if
(
!
IndexScanIsValid
(
s
))
{
elog
(
ABORT
,
"rtrescan: invalid scan."
);
elog
(
ERROR
,
"rtrescan: invalid scan."
);
return
;
}
...
...
@@ -284,7 +284,7 @@ rtdropscan(IndexScanDesc s)
}
if
(
l
==
(
RTScanList
)
NULL
)
elog
(
ABORT
,
"rtree scan list corrupted -- cannot find 0x%lx"
,
s
);
elog
(
ERROR
,
"rtree scan list corrupted -- cannot find 0x%lx"
,
s
);
if
(
prev
==
(
RTScanList
)
NULL
)
RTScans
=
l
->
rtsl_next
;
...
...
@@ -400,7 +400,7 @@ adjustiptr(IndexScanDesc s,
break
;
default:
elog
(
ABORT
,
"Bad operation in rtree scan adjust: %d"
,
op
);
elog
(
ERROR
,
"Bad operation in rtree scan adjust: %d"
,
op
);
}
}
}
...
...
src/backend/access/transam/transam.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.1
5 1998/01/05 03:30:0
7 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.1
6 1998/01/07 21:02:1
7 momjian Exp $
*
* NOTES
* 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
* ----------------
*/
elog
(
ABORT
,
"TransactionLogTest: failed to get xidstatus"
);
elog
(
ERROR
,
"TransactionLogTest: failed to get xidstatus"
);
/*
* so lint is happy...
...
...
@@ -308,7 +308,7 @@ TransRecover(Relation logRelation)
*/
TransGetLastRecordedTransaction(logRelation, logLastXid, &fail);
if (fail == true)
elog(
ABORT
, "TransRecover: failed TransGetLastRecordedTransaction");
elog(
ERROR
, "TransRecover: failed TransGetLastRecordedTransaction");
/* ----------------
* next get the "last" and "next" variables
...
...
@@ -322,7 +322,7 @@ TransRecover(Relation logRelation)
* ----------------
*/
if (TransactionIdIsLessThan(varNextXid, logLastXid))
elog(
ABORT
, "TransRecover: varNextXid < logLastXid");
elog(
ERROR
, "TransRecover: varNextXid < logLastXid");
/* ----------------
* intregity test (2)
...
...
src/backend/access/transam/transsup.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.1
5 1998/01/05 03:30:10
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.1
6 1998/01/07 21:02:19
momjian Exp $
*
* NOTES
* This file contains support functions for the high
...
...
@@ -68,7 +68,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
if
(
relation
==
LogRelation
)
itemsPerBlock
=
TP_NumXidStatusPerBlock
;
else
elog
(
ABORT
,
"TransComputeBlockNumber: unknown relation"
);
elog
(
ERROR
,
"TransComputeBlockNumber: unknown relation"
);
/* ----------------
* warning! if the transaction id's get too large
...
...
src/backend/access/transam/varsup.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.1
4 1998/01/05 03:30:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.1
5 1998/01/07 21:02:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -69,7 +69,7 @@ VariableRelationGetNextXid(TransactionId *xidP)
if
(
!
BufferIsValid
(
buf
))
{
SpinRelease
(
OidGenLockId
);
elog
(
ABORT
,
"VariableRelationGetNextXid: ReadBuffer failed"
);
elog
(
ERROR
,
"VariableRelationGetNextXid: ReadBuffer failed"
);
}
var
=
(
VariableRelationContents
)
BufferGetBlock
(
buf
);
...
...
@@ -112,7 +112,7 @@ VariableRelationPutNextXid(TransactionId xid)
if
(
!
BufferIsValid
(
buf
))
{
SpinRelease
(
OidGenLockId
);
elog
(
ABORT
,
"VariableRelationPutNextXid: ReadBuffer failed"
);
elog
(
ERROR
,
"VariableRelationPutNextXid: ReadBuffer failed"
);
}
var
=
(
VariableRelationContents
)
BufferGetBlock
(
buf
);
...
...
@@ -164,7 +164,7 @@ VariableRelationGetNextOid(Oid *oid_return)
if
(
!
BufferIsValid
(
buf
))
{
SpinRelease
(
OidGenLockId
);
elog
(
ABORT
,
"VariableRelationGetNextXid: ReadBuffer failed"
);
elog
(
ERROR
,
"VariableRelationGetNextXid: ReadBuffer failed"
);
}
var
=
(
VariableRelationContents
)
BufferGetBlock
(
buf
);
...
...
@@ -224,7 +224,7 @@ VariableRelationPutNextOid(Oid *oidP)
if
(
!
PointerIsValid
(
oidP
))
{
SpinRelease
(
OidGenLockId
);
elog
(
ABORT
,
"VariableRelationPutNextOid: invalid oid pointer"
);
elog
(
ERROR
,
"VariableRelationPutNextOid: invalid oid pointer"
);
}
/* ----------------
...
...
@@ -237,7 +237,7 @@ VariableRelationPutNextOid(Oid *oidP)
if
(
!
BufferIsValid
(
buf
))
{
SpinRelease
(
OidGenLockId
);
elog
(
ABORT
,
"VariableRelationPutNextOid: ReadBuffer failed"
);
elog
(
ERROR
,
"VariableRelationPutNextOid: ReadBuffer failed"
);
}
var
=
(
VariableRelationContents
)
BufferGetBlock
(
buf
);
...
...
src/backend/access/transam/xact.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.1
8 1998/01/05 03:30:13
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.1
9 1998/01/07 21:02:24
momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
...
...
@@ -497,7 +497,7 @@ CommandCounterIncrement()
if
(
CurrentTransactionStateData
.
commandId
==
FirstCommandId
)
{
CommandIdCounterOverflowFlag
=
true
;
elog
(
ABORT
,
"You may only have 2^32-1 commands per transaction"
);
elog
(
ERROR
,
"You may only have 2^32-1 commands per transaction"
);
}
CurrentTransactionStateData
.
scanCommandId
=
...
...
src/backend/bootstrap/bootparse.y
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.1
2 1998/01/06 18:51:55
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.1
3 1998/01/07 21:02:29
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -203,10 +203,10 @@ Boot_InsertStmt:
LPAREN boot_tuplelist RPAREN
{
if (num_tuples_read != numattr)
elog(
ABORT
,"incorrect number of values for tuple");
elog(
ERROR
,"incorrect number of values for tuple");
if (reldesc == (Relation)NULL)
{
elog(
ABORT
,"must OPEN RELATION before INSERT\n");
elog(
ERROR
,"must OPEN RELATION before INSERT\n");
err_out();
}
if (DebugMode)
...
...
src/backend/bootstrap/bootstrap.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.3
1 1998/01/05 03:30:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.3
2 1998/01/07 21:02:30
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -572,18 +572,18 @@ closerel(char *name)
if
(
reldesc
)
{
if
(
namestrcmp
(
RelationGetRelationName
(
reldesc
),
name
)
!=
0
)
elog
(
ABORT
,
"closerel: close of '%s' when '%s' was expected"
,
elog
(
ERROR
,
"closerel: close of '%s' when '%s' was expected"
,
name
,
relname
?
relname
:
"(null)"
);
}
else
elog
(
ABORT
,
"closerel: close of '%s' before any relation was opened"
,
elog
(
ERROR
,
"closerel: close of '%s' before any relation was opened"
,
name
);
}
if
(
reldesc
==
NULL
)
{
elog
(
ABORT
,
"Warning: no opened relation to close.
\n
"
);
elog
(
ERROR
,
"Warning: no opened relation to close.
\n
"
);
}
else
{
...
...
@@ -879,7 +879,7 @@ gettype(char *type)
heap_close
(
rdesc
);
return
(
gettype
(
type
));
}
elog
(
ABORT
,
"Error: unknown type '%s'.
\n
"
,
type
);
elog
(
ERROR
,
"Error: unknown type '%s'.
\n
"
,
type
);
err_out
();
/* not reached, here to make compiler happy */
return
0
;
...
...
src/backend/executor/execAmi.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.1
3 1998/01/05 03:31:01
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.1
4 1998/01/07 21:02:36
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -313,7 +313,7 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
break
;
default:
elog
(
ABORT
,
"ExecReScan: not a seqscan or indexscan node."
);
elog
(
ERROR
,
"ExecReScan: not a seqscan or indexscan node."
);
return
;
}
}
...
...
src/backend/executor/execMain.c
View file @
679d39b9
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
6 1998/01/05 03:31:06
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
7 1998/01/07 21:02:39
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -328,7 +328,7 @@ ExecCheckPerms(CmdType operation,
ObjectIdGetDatum
(
relid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
ABORT
,
"ExecCheckPerms: bogus RT relid: %d"
,
elog
(
ERROR
,
"ExecCheckPerms: bogus RT relid: %d"
,
relid
);
StrNCpy
(
rname
.
data
,
((
Form_pg_class
)
GETSTRUCT
(
htp
))
->
relname
.
data
,
...
...
@@ -361,7 +361,7 @@ ExecCheckPerms(CmdType operation,
opstr
=
"write"
;
break
;
default:
elog
(
ABORT
,
"ExecCheckPerms: bogus operation %d"
,
elog
(
ERROR
,
"ExecCheckPerms: bogus operation %d"
,
operation
);
}
}
...
...
@@ -377,7 +377,7 @@ ExecCheckPerms(CmdType operation,
}
if
(
!
ok
)
{
elog
(
ABORT
,
"%s: %s"
,
rname
.
data
,
aclcheck_error_strings
[
aclcheck_result
]);
elog
(
ERROR
,
"%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
);
if
(
resultRelationDesc
->
rd_rel
->
relkind
==
RELKIND_SEQUENCE
)
elog
(
ABORT
,
"You can't change sequence relation %s"
,
elog
(
ERROR
,
"You can't change sequence relation %s"
,
resultRelationDesc
->
rd_rel
->
relname
.
data
);
/*
...
...
@@ -778,10 +778,10 @@ ExecutePlan(EState *estate,
"ctid"
,
&
datum
,
&
isNull
))
elog
(
ABORT
,
"ExecutePlan: NO (junk) `ctid' was found!"
);
elog
(
ERROR
,
"ExecutePlan: NO (junk) `ctid' was found!"
);
if
(
isNull
)
elog
(
ABORT
,
"ExecutePlan: (junk) `ctid' is NULL!"
);
elog
(
ERROR
,
"ExecutePlan: (junk) `ctid' is NULL!"
);
tupleid
=
(
ItemPointer
)
DatumGetPointer
(
datum
);
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
++
)
{
if
(
rel
->
rd_att
->
attrs
[
attrChk
-
1
]
->
attnotnull
&&
heap_attisnull
(
tuple
,
attrChk
))
elog
(
ABORT
,
"%s: Fail to add null value in not null attribute %s"
,
elog
(
ERROR
,
"%s: Fail to add null value in not null attribute %s"
,
caller
,
rel
->
rd_att
->
attrs
[
attrChk
-
1
]
->
attname
.
data
);
}
}
...
...
@@ -1386,7 +1386,7 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
char
*
failed
;
if
((
failed
=
ExecRelCheck
(
rel
,
tuple
))
!=
NULL
)
elog
(
ABORT
,
"%s: rejected due to CHECK constraint %s"
,
caller
,
failed
);
elog
(
ERROR
,
"%s: rejected due to CHECK constraint %s"
,
caller
,
failed
);
}
return
(
newtuple
);
...
...
src/backend/executor/execProcnode.c
View file @
679d39b9
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.
6 1998/01/05 03:31:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.
7 1998/01/07 21:02:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -368,7 +368,7 @@ ExecCountSlotsNode(Plan *node)
return
ExecCountSlotsTee
((
Tee
*
)
node
);
default:
elog
(
ABORT
,
"ExecCountSlotsNode: node not yet supported: %d"
,
elog
(
ERROR
,
"ExecCountSlotsNode: node not yet supported: %d"
,
nodeTag
(
node
));
break
;
}
...
...
src/backend/executor/execQual.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.2
1 1998/01/05 03:31:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.2
2 1998/01/07 21:02:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -148,7 +148,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
return
(
Datum
)
NULL
;
}
if
(
i
!=
j
)
elog
(
ABORT
,
elog
(
ERROR
,
"ExecEvalArrayRef: upper and lower indices mismatch"
);
lIndex
=
lower
.
indx
;
}
...
...
@@ -429,7 +429,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
*/
if
(
strcmp
(
paramList
->
name
,
thisParameterName
)
!=
0
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"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!
*/
elog
(
ABORT
,
"ExecEvalParam: invalid paramkind %d"
,
elog
(
ERROR
,
"ExecEvalParam: invalid paramkind %d"
,
thisParameterKind
);
}
if
(
!
matchFound
)
...
...
@@ -456,7 +456,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
* ooops! we couldn't find this parameter in the parameter list.
* Signal an error
*/
elog
(
ABORT
,
"ExecEvalParam: Unknown value for parameter %s"
,
elog
(
ERROR
,
"ExecEvalParam: Unknown value for parameter %s"
,
thisParameterName
);
}
...
...
@@ -510,13 +510,13 @@ GetAttributeByNum(TupleTableSlot *slot,
Datum
retval
;
if
(
!
AttributeNumberIsValid
(
attrno
))
elog
(
ABORT
,
"GetAttributeByNum: Invalid attribute number"
);
elog
(
ERROR
,
"GetAttributeByNum: Invalid attribute number"
);
if
(
!
AttrNumberIsForUserDefinedAttr
(
attrno
))
elog
(
ABORT
,
"GetAttributeByNum: cannot access system attributes here"
);
elog
(
ERROR
,
"GetAttributeByNum: cannot access system attributes here"
);
if
(
isNull
==
(
bool
*
)
NULL
)
elog
(
ABORT
,
"GetAttributeByNum: a NULL isNull flag was passed"
);
elog
(
ERROR
,
"GetAttributeByNum: a NULL isNull flag was passed"
);
if
(
TupIsNull
(
slot
))
{
...
...
@@ -557,10 +557,10 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
int
i
;
if
(
attname
==
NULL
)
elog
(
ABORT
,
"GetAttributeByName: Invalid attribute name"
);
elog
(
ERROR
,
"GetAttributeByName: Invalid attribute name"
);
if
(
isNull
==
(
bool
*
)
NULL
)
elog
(
ABORT
,
"GetAttributeByName: a NULL isNull flag was passed"
);
elog
(
ERROR
,
"GetAttributeByName: a NULL isNull flag was passed"
);
if
(
TupIsNull
(
slot
))
{
...
...
@@ -584,7 +584,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
}
if
(
attrno
==
InvalidAttrNumber
)
elog
(
ABORT
,
"GetAttributeByName: attribute %s not found"
,
attname
);
elog
(
ERROR
,
"GetAttributeByName: attribute %s not found"
,
attname
);
retval
=
heap_getattr
(
slot
->
val
,
slot
->
ttc_buffer
,
...
...
@@ -696,7 +696,7 @@ ExecMakeFunctionResult(Node *node,
bool
argDone
;
if
(
fcache
->
nargs
>
MAXFMGRARGS
)
elog
(
ABORT
,
"ExecMakeFunctionResult: too many arguments"
);
elog
(
ERROR
,
"ExecMakeFunctionResult: too many arguments"
);
/*
* 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
);
break
;
default:
elog
(
ABORT
,
"ExecEvalExpr: unknown expression type"
);
elog
(
ERROR
,
"ExecEvalExpr: unknown expression type"
);
break
;
}
break
;
}
default:
elog
(
ABORT
,
"ExecEvalExpr: unknown expression type"
);
elog
(
ERROR
,
"ExecEvalExpr: unknown expression type"
);
break
;
}
...
...
src/backend/executor/execTuples.c
View file @
679d39b9
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.1
4 1998/01/05 03:31:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.1
5 1998/01/07 21:02:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -315,7 +315,7 @@ ExecAllocTableSlot(TupleTable table)
* table->size = newsize;
*/
elog
(
NOTICE
,
"Plan requires more slots than are available"
);
elog
(
ABORT
,
"send mail to your local executor guru to fix this"
);
elog
(
ERROR
,
"send mail to your local executor guru to fix this"
);
}
/* ----------------
...
...
@@ -859,7 +859,7 @@ NodeGetResultTupleSlot(Plan *node)
* should never get here
* ----------------
*/
elog
(
ABORT
,
"NodeGetResultTupleSlot: node not yet supported: %d "
,
elog
(
ERROR
,
"NodeGetResultTupleSlot: node not yet supported: %d "
,
nodeTag
(
node
));
return
NULL
;
...
...
src/backend/executor/execUtils.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.2
2 1998/01/05 03:31:13
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.2
3 1998/01/07 21:02:50
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -499,7 +499,7 @@ ExecSetTypeInfo(int index,
*/
att
=
typeInfo
[
index
];
if
(
att
==
NULL
)
elog
(
ABORT
,
"ExecSetTypeInfo: trying to assign through NULL"
);
elog
(
ERROR
,
"ExecSetTypeInfo: trying to assign through NULL"
);
/* ----------------
* assign values to the tuple descriptor, being careful not
...
...
@@ -1219,7 +1219,7 @@ setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
heap_close
(
rd
);
}
else
elog
(
ABORT
,
"setVarAttrLenForCreateTable: can't get length for variable-length field"
);
elog
(
ERROR
,
"setVarAttrLenForCreateTable: can't get length for variable-length field"
);
}
tl
=
lnext
(
tl
);
}
...
...
src/backend/executor/nodeAgg.c
View file @
679d39b9
...
...
@@ -170,7 +170,7 @@ ExecAgg(Agg *node)
ObjectIdGetDatum
(
agg
->
basetype
),
0
,
0
);
if
(
!
HeapTupleIsValid
(
aggTuple
))
elog
(
ABORT
,
"ExecAgg: cache lookup failed for aggregate
\"
%s
\"
(%s)"
,
elog
(
ERROR
,
"ExecAgg: cache lookup failed for aggregate
\"
%s
\"
(%s)"
,
aggname
,
typeidTypeName
(
agg
->
basetype
));
aggp
=
(
Form_pg_aggregate
)
GETSTRUCT
(
aggTuple
);
...
...
@@ -204,7 +204,7 @@ ExecAgg(Agg *node)
* ------------------------------------------
*/
if
(
isNull2
)
elog
(
ABORT
,
"ExecAgg: agginitval2 is null"
);
elog
(
ERROR
,
"ExecAgg: agginitval2 is null"
);
}
if
(
OidIsValid
(
xfn1_oid
))
...
...
@@ -305,7 +305,7 @@ ExecAgg(Agg *node)
&
isNull
,
&
isDone
);
break
;
default:
elog
(
ABORT
,
"ExecAgg: Bad Agg->Target for Agg %d"
,
i
);
elog
(
ERROR
,
"ExecAgg: Bad Agg->Target for Agg %d"
,
i
);
}
if
(
isNull
&&
!
aggregates
[
i
]
->
usenulls
)
...
...
@@ -355,7 +355,7 @@ ExecAgg(Agg *node)
break
;
default:
elog
(
ABORT
,
"ExecAgg: Bad Agg->Target for Agg %d"
,
i
);
elog
(
ERROR
,
"ExecAgg: Bad Agg->Target for Agg %d"
,
i
);
}
if
(
attlen
==
-
1
)
{
...
...
@@ -443,7 +443,7 @@ ExecAgg(Agg *node)
args
[
0
]
=
(
char
*
)
value2
[
i
];
}
else
elog
(
ABORT
,
"ExecAgg: no valid transition functions??"
);
elog
(
ERROR
,
"ExecAgg: no valid transition functions??"
);
value1
[
i
]
=
(
Datum
)
fmgr_c
(
aggfns
->
finalfn
,
aggfns
->
finalfn_oid
,
aggfns
->
finalfn_nargs
,
(
FmgrValues
*
)
args
,
...
...
@@ -462,7 +462,7 @@ ExecAgg(Agg *node)
value1
[
i
]
=
value2
[
i
];
}
else
elog
(
ABORT
,
"ExecAgg: no valid transition functions??"
);
elog
(
ERROR
,
"ExecAgg: no valid transition functions??"
);
}
/*
...
...
src/backend/executor/nodeHash.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.1
4 1998/01/05 03:31:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.1
5 1998/01/07 21:02:52
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -90,7 +90,7 @@ ExecHash(Hash *node)
hashtable
=
node
->
hashtable
;
if
(
hashtable
==
NULL
)
elog
(
ABORT
,
"ExecHash: hash table is NULL."
);
elog
(
ERROR
,
"ExecHash: hash table is NULL."
);
nbatch
=
hashtable
->
nbatch
;
...
...
@@ -359,7 +359,7 @@ ExecHashTableCreate(Hash *node)
if
(
hashtable
==
NULL
)
{
elog
(
ABORT
,
"not enough memory for hashjoin."
);
elog
(
ERROR
,
"not enough memory for hashjoin."
);
}
/* ----------------
* initialize the hash table header
...
...
@@ -635,7 +635,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
if (hashtable == NULL)
{
perror("repalloc");
elog(
ABORT
, "can't expand hashtable.");
elog(
ERROR
, "can't expand hashtable.");
}
#else
/* ------------------
...
...
@@ -644,7 +644,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
* - Chris Dunlop, <chris@onthe.net.au>
* ------------------
*/
elog
(
ABORT
,
"hash table out of memory. Use -B parameter to increase buffers."
);
elog
(
ERROR
,
"hash table out of memory. Use -B parameter to increase buffers."
);
#endif
}
...
...
src/backend/executor/nodeIndexscan.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.1
2 1998/01/05 03:31:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.1
3 1998/01/07 21:02:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -641,7 +641,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
op
=
(
Oper
*
)
clause
->
oper
;
if
(
!
IsA
(
op
,
Oper
))
elog
(
ABORT
,
"ExecInitIndexScan: op not an Oper!"
);
elog
(
ERROR
,
"ExecInitIndexScan: op not an Oper!"
);
opid
=
op
->
opid
;
...
...
@@ -757,7 +757,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ----------------
*/
if
(
scanvar
==
LEFT_OP
)
elog
(
ABORT
,
"ExecInitIndexScan: %s"
,
elog
(
ERROR
,
"ExecInitIndexScan: %s"
,
"both left and right op's are rel-vars"
);
/* ----------------
...
...
@@ -810,7 +810,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ----------------
*/
if
(
scanvar
==
LEFT_OP
)
elog
(
ABORT
,
"ExecInitIndexScan: %s"
,
elog
(
ERROR
,
"ExecInitIndexScan: %s"
,
"both left and right ops are rel-vars"
);
varattno
=
1
;
...
...
@@ -836,7 +836,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ----------------
*/
if
(
scanvar
==
NO_OP
)
elog
(
ABORT
,
"ExecInitIndexScan: %s"
,
elog
(
ERROR
,
"ExecInitIndexScan: %s"
,
"neither leftop nor rightop refer to scan relation"
);
/* ----------------
...
...
src/backend/executor/nodeSort.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
1 1998/01/05 03:31:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
2 1998/01/07 21:02:56
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -56,7 +56,7 @@ FormSortKeys(Sort *sortnode)
* ----------------
*/
if
(
keycount
<=
0
)
elog
(
ABORT
,
"FormSortKeys: keycount <= 0"
);
elog
(
ERROR
,
"FormSortKeys: keycount <= 0"
);
sortkeys
=
(
ScanKey
)
palloc
(
keycount
*
sizeof
(
ScanKeyData
));
/* ----------------
...
...
src/backend/executor/nodeTee.c
View file @
679d39b9
...
...
@@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
4 1998/01/05 03:31:21
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
5 1998/01/07 21:02:58
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -329,7 +329,7 @@ ExecTee(Tee *node, Plan *parent)
}
else
{
elog
(
ABORT
,
"A Tee node can only be executed from its left or right parent
\n
"
);
elog
(
ERROR
,
"A Tee node can only be executed from its left or right parent
\n
"
);
return
NULL
;
}
...
...
src/backend/lib/stringinfo.c
View file @
679d39b9
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.
8 1998/01/07 15:32:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.
9 1998/01/07 21:03:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -36,14 +36,14 @@ makeStringInfo()
res
=
(
StringInfo
)
palloc
(
sizeof
(
StringInfoData
));
if
(
res
==
NULL
)
{
elog
(
ABORT
,
"makeStringInfo: Out of memory!"
);
elog
(
ERROR
,
"makeStringInfo: Out of memory!"
);
}
size
=
100
;
res
->
data
=
palloc
(
size
);
if
(
res
->
data
==
NULL
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"makeStringInfo: Out of memory! (%ld bytes requested)"
,
size
);
}
res
->
maxlen
=
size
;
...
...
@@ -105,7 +105,7 @@ appendStringInfo(StringInfo str, char *buffer)
s
=
palloc
(
newlen
);
if
(
s
==
NULL
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"appendStringInfo: Out of memory (%d bytes requested)"
,
newlen
);
}
...
...
src/backend/libpq/be-fsstubs.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
8 1998/01/05 03:31:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
9 1998/01/07 21:03:12
momjian Exp $
*
* NOTES
* 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
)
{
elog
(
ABORT
,
"lo_close: large obj descriptor (%d) out of range"
,
fd
);
elog
(
ERROR
,
"lo_close: large obj descriptor (%d) out of range"
,
fd
);
return
-
2
;
}
if
(
cookies
[
fd
]
==
NULL
)
{
elog
(
ABORT
,
"lo_close: invalid large obj descriptor (%d)"
,
fd
);
elog
(
ERROR
,
"lo_close: invalid large obj descriptor (%d)"
,
fd
);
return
-
3
;
}
#if FSDB
...
...
@@ -150,7 +150,7 @@ lo_lseek(int fd, int offset, int whence)
if
(
fd
>=
MAX_LOBJ_FDS
)
{
elog
(
ABORT
,
"lo_seek: large obj descriptor (%d) out of range"
,
fd
);
elog
(
ERROR
,
"lo_seek: large obj descriptor (%d) out of range"
,
fd
);
return
-
2
;
}
...
...
@@ -200,12 +200,12 @@ lo_tell(int fd)
{
if
(
fd
>=
MAX_LOBJ_FDS
)
{
elog
(
ABORT
,
"lo_tell: large object descriptor (%d) out of range"
,
fd
);
elog
(
ERROR
,
"lo_tell: large object descriptor (%d) out of range"
,
fd
);
return
-
2
;
}
if
(
cookies
[
fd
]
==
NULL
)
{
elog
(
ABORT
,
"lo_tell: invalid large object descriptor (%d)"
,
fd
);
elog
(
ERROR
,
"lo_tell: invalid large object descriptor (%d)"
,
fd
);
return
-
3
;
}
return
inv_tell
(
cookies
[
fd
]);
...
...
@@ -273,7 +273,7 @@ lo_import(text *filename)
fd
=
open
(
fnamebuf
,
O_RDONLY
,
0666
);
if
(
fd
<
0
)
{
/* error */
elog
(
ABORT
,
"be_lo_import: can't open unix file
\"
%s
\"\n
"
,
elog
(
ERROR
,
"be_lo_import: can't open unix file
\"
%s
\"\n
"
,
fnamebuf
);
}
...
...
@@ -283,7 +283,7 @@ lo_import(text *filename)
lobj
=
inv_create
(
INV_READ
|
INV_WRITE
);
if
(
lobj
==
NULL
)
{
elog
(
ABORT
,
"lo_import: can't create inv object for
\"
%s
\"
"
,
elog
(
ERROR
,
"lo_import: can't create inv object for
\"
%s
\"
"
,
fnamebuf
);
}
...
...
@@ -301,7 +301,7 @@ lo_import(text *filename)
tmp
=
inv_write
(
lobj
,
buf
,
nbytes
);
if
(
tmp
<
nbytes
)
{
elog
(
ABORT
,
"lo_import: error while reading
\"
%s
\"
"
,
elog
(
ERROR
,
"lo_import: error while reading
\"
%s
\"
"
,
fnamebuf
);
}
}
...
...
@@ -335,7 +335,7 @@ lo_export(Oid lobjId, text *filename)
lobj
=
inv_open
(
lobjId
,
INV_READ
);
if
(
lobj
==
NULL
)
{
elog
(
ABORT
,
"lo_export: can't open inv object %d"
,
elog
(
ERROR
,
"lo_export: can't open inv object %d"
,
lobjId
);
}
...
...
@@ -348,7 +348,7 @@ lo_export(Oid lobjId, text *filename)
umask
(
oumask
);
if
(
fd
<
0
)
{
/* error */
elog
(
ABORT
,
"lo_export: can't open unix file
\"
%s
\"
"
,
elog
(
ERROR
,
"lo_export: can't open unix file
\"
%s
\"
"
,
fnamebuf
);
}
...
...
@@ -360,7 +360,7 @@ lo_export(Oid lobjId, text *filename)
tmp
=
write
(
fd
,
buf
,
nbytes
);
if
(
tmp
<
nbytes
)
{
elog
(
ABORT
,
"lo_export: error while writing
\"
%s
\"
"
,
elog
(
ERROR
,
"lo_export: error while writing
\"
%s
\"
"
,
fnamebuf
);
}
}
...
...
src/backend/libpq/be-pqexec.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.1
2 1998/01/05 03:31:28
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.1
3 1998/01/07 21:03:16
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -82,7 +82,7 @@ PQfn(int fnid,
}
else
if
(
args
[
i
].
len
>
sizeof
(
int4
))
{
elog
(
ABORT
,
"arg_length of argument %d too long"
,
i
);
elog
(
ERROR
,
"arg_length of argument %d too long"
,
i
);
}
else
{
...
...
@@ -125,7 +125,7 @@ PQfn(int fnid,
* If a query is does not return tuples, return "C query-command".
* If there is an error: return "E error-message".
*
* Note: if we get a serious error or an elog(
ABORT
), then PQexec never
* Note: if we get a serious error or an elog(
ERROR
), then PQexec never
* returns because the system longjmp's back to the main loop.
* ----------------
*/
...
...
@@ -211,7 +211,7 @@ pqtest_PQexec(char *q)
case
'P'
:
a
=
PQparray
(
&
res
[
1
]);
if
(
a
==
NULL
)
elog
(
ABORT
,
"pqtest_PQexec: PQparray could not find portal %s"
,
elog
(
ERROR
,
"pqtest_PQexec: PQparray could not find portal %s"
,
res
);
t
=
PQntuples
(
a
);
...
...
src/backend/libpq/pqcomm.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.3
2 1998/01/05 03:31:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.3
3 1998/01/07 21:03:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -694,7 +694,7 @@ StreamConnection(int server_fd, Port *port)
(
struct
sockaddr
*
)
&
port
->
raddr
,
&
addrlen
))
<
0
)
{
elog
(
ABORT
,
"postmaster: StreamConnection: accept: %m"
);
elog
(
ERROR
,
"postmaster: StreamConnection: accept: %m"
);
return
(
STATUS_ERROR
);
}
...
...
@@ -703,7 +703,7 @@ StreamConnection(int server_fd, Port *port)
if
(
getsockname
(
port
->
sock
,
(
struct
sockaddr
*
)
&
port
->
laddr
,
&
addrlen
)
<
0
)
{
elog
(
ABORT
,
"postmaster: StreamConnection: getsockname: %m"
);
elog
(
ERROR
,
"postmaster: StreamConnection: getsockname: %m"
);
return
(
STATUS_ERROR
);
}
if
(
family
==
AF_INET
)
...
...
@@ -714,13 +714,13 @@ StreamConnection(int server_fd, Port *port)
pe
=
getprotobyname
(
"TCP"
);
if
(
pe
==
NULL
)
{
elog
(
ABORT
,
"postmaster: getprotobyname failed"
);
elog
(
ERROR
,
"postmaster: getprotobyname failed"
);
return
(
STATUS_ERROR
);
}
if
(
setsockopt
(
port
->
sock
,
pe
->
p_proto
,
TCP_NODELAY
,
&
on
,
sizeof
(
on
))
<
0
)
{
elog
(
ABORT
,
"postmaster: setsockopt failed"
);
elog
(
ERROR
,
"postmaster: setsockopt failed"
);
return
(
STATUS_ERROR
);
}
}
...
...
src/backend/nodes/equalfuncs.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.1
1 1998/01/05 03:31:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.1
2 1998/01/07 21:03:26
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -243,7 +243,7 @@ _equalParam(Param *a, Param *b)
return
(
true
);
break
;
default:
elog
(
ABORT
,
"_equalParam: Invalid paramkind value: %d"
,
elog
(
ERROR
,
"_equalParam: Invalid paramkind value: %d"
,
a
->
paramkind
);
}
...
...
src/backend/nodes/list.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.
9 1998/01/05 03:31:38
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.
10 1998/01/07 21:03:29
momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
...
...
@@ -237,7 +237,7 @@ nconc(List *l1, List *l2)
if
(
l2
==
NIL
)
return
l1
;
if
(
l1
==
l2
)
elog
(
ABORT
,
"tryout to nconc a list to itself"
);
elog
(
ERROR
,
"tryout to nconc a list to itself"
);
for
(
temp
=
l1
;
lnext
(
temp
)
!=
NULL
;
temp
=
lnext
(
temp
))
;
...
...
src/backend/nodes/read.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
9 1998/01/07 15:32:31
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
10 1998/01/07 21:03:34
momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -283,7 +283,7 @@ nodeRead(bool read_car_only)
make_dotted_pair_cell
=
true
;
break
;
default:
elog
(
ABORT
,
"nodeRead: Bad type %d"
,
type
);
elog
(
ERROR
,
"nodeRead: Bad type %d"
,
type
);
break
;
}
if
(
make_dotted_pair_cell
)
...
...
src/backend/nodes/readfuncs.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.1
6 1998/01/07 08:08:02
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.1
7 1998/01/07 21:03:37
momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
...
...
@@ -2114,7 +2114,7 @@ parsePlanString(void)
}
else
{
elog
(
ABORT
,
"badly formatted planstring
\"
%.10s
\"
...
\n
"
,
token
);
elog
(
ERROR
,
"badly formatted planstring
\"
%.10s
\"
...
\n
"
,
token
);
}
return
((
Node
*
)
return_value
);
...
...
@@ -2153,7 +2153,7 @@ readDatum(Oid type)
{
if
(
length
>
sizeof
(
Datum
))
{
elog
(
ABORT
,
"readValue: byval & length = %d"
,
length
);
elog
(
ERROR
,
"readValue: byval & length = %d"
,
length
);
}
s
=
(
char
*
)
(
&
res
);
for
(
i
=
0
;
i
<
sizeof
(
Datum
);
i
++
)
...
...
@@ -2181,7 +2181,7 @@ readDatum(Oid type)
token
=
lsptok
(
NULL
,
&
tokenLength
);
/* skip the ']' */
if
(
token
[
0
]
!=
']'
)
{
elog
(
ABORT
,
"readValue: ']' expected, length =%d"
,
length
);
elog
(
ERROR
,
"readValue: ']' expected, length =%d"
,
length
);
}
return
(
res
);
...
...
src/backend/optimizer/geqo/geqo_erx.c
View file @
679d39b9
...
...
@@ -3,7 +3,7 @@
* geqo_erx.c--
* edge recombination crossover [ER]
*
* $Id: geqo_erx.c,v 1.
6 1998/01/05 03:31:48
momjian Exp $
* $Id: geqo_erx.c,v 1.
7 1998/01/07 21:03:40
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -353,7 +353,7 @@ gimme_gene(Edge edge, Edge *edge_table)
minimum_count
=
1
;
}
else
if
(
minimum_count
==
-
1
)
elog
(
ABORT
,
"gimme_gene: Internal error - minimum_count not set"
);
elog
(
ERROR
,
"gimme_gene: Internal error - minimum_count not set"
);
else
if
(
edge_table
[(
int
)
friend
].
unused_edges
==
minimum_edges
)
minimum_count
++
;
...
...
@@ -379,7 +379,7 @@ gimme_gene(Edge edge, Edge *edge_table)
}
/* ... should never be reached */
elog
(
ABORT
,
"gimme_gene: neither shared nor minimum number nor random edge found"
);
elog
(
ERROR
,
"gimme_gene: neither shared nor minimum number nor random edge found"
);
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 */
elog
(
ABORT
,
"edge_failure: no edge detected"
);
elog
(
ERROR
,
"edge_failure: no edge detected"
);
return
0
;
/* to keep the compiler quiet */
}
src/backend/optimizer/geqo/geqo_eval.c
View file @
679d39b9
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_eval.c,v 1.1
6 1998/01/05 03:31:49
momjian Exp $
* $Id: geqo_eval.c,v 1.1
7 1998/01/07 21:03:42
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -737,6 +737,6 @@ geqo_nth(int stop, List *rels)
return
lfirst
(
r
);
i
++
;
}
elog
(
ABORT
,
"geqo_nth: Internal error - ran off end of list"
);
elog
(
ERROR
,
"geqo_nth: Internal error - ran off end of list"
);
return
NULL
;
/* to keep compiler happy */
}
src/backend/optimizer/geqo/geqo_misc.c
View file @
679d39b9
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_misc.c,v 1.
6 1998/01/05 03:31:51
momjian Exp $
* $Id: geqo_misc.c,v 1.
7 1998/01/07 21:03:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -53,7 +53,7 @@ avg_pool(Pool *pool)
double
cumulative
=
0
.
0
;
if
(
pool
->
size
==
0
)
elog
(
ABORT
,
"avg_pool: pool_size of zero"
);
elog
(
ERROR
,
"avg_pool: pool_size of zero"
);
for
(
i
=
0
;
i
<
pool
->
size
;
i
++
)
cumulative
=
cumulative
+
pool
->
data
[
i
].
worth
;
...
...
src/backend/optimizer/path/predmig.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.
7 1998/01/05 03:31:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.
8 1998/01/07 21:03:51
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -133,7 +133,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */
/* sanity check */
if
((
!
streamroot
&&
laststream
)
||
(
streamroot
&&
!
laststream
))
elog
(
ABORT
,
"called xfunc_predmig with bad inputs"
);
elog
(
ERROR
,
"called xfunc_predmig with bad inputs"
);
if
(
streamroot
)
Assert
(
xfunc_check_stream
(
streamroot
));
...
...
@@ -333,7 +333,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
orignode
=
(
Stream
)
get_downstream
(
orignode
))
/* empty body in for loop */
;
if
(
!
orignode
)
elog
(
ABORT
,
"Didn't find matching node in original stream"
);
elog
(
ERROR
,
"Didn't find matching node in original stream"
);
/* 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
)
{
elog
(
ABORT
,
"bad pointers in stream"
);
elog
(
ERROR
,
"bad pointers in stream"
);
return
(
false
);
}
if
(
!
is_clause
(
temp
))
{
if
((
tmp
=
xfunc_num_relids
(
temp
))
>=
numrelids
)
{
elog
(
ABORT
,
"Joins got reordered!"
);
elog
(
ERROR
,
"Joins got reordered!"
);
return
(
false
);
}
numrelids
=
tmp
;
...
...
src/backend/optimizer/path/prune.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.1
0 1998/01/06 18:52:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.1
1 1998/01/07 21:03:53
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -130,7 +130,7 @@ prune_rel_paths(List *rel_list)
rel
->
size
=
compute_joinrel_size
(
cheapest
);
}
else
elog
(
ABORT
,
"non JoinPath called"
);
elog
(
ERROR
,
"non JoinPath called"
);
}
}
...
...
src/backend/optimizer/path/xfunc.c
View file @
679d39b9
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.1
0 1998/01/05 03:31
:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.1
1 1998/01/07 21:03
:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -461,7 +461,7 @@ xfunc_local_expense(LispValue clause)
}
else
{
elog
(
ABORT
,
"Clause node of undetermined type"
);
elog
(
ERROR
,
"Clause node of undetermined type"
);
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. */
if
(
!
(
funcid
=
get_opcode
(
get_opno
((
Oper
)
node
))))
elog
(
ABORT
,
"Oper's function is undefined"
);
elog
(
ERROR
,
"Oper's function is undefined"
);
}
else
{
...
...
@@ -507,7 +507,7 @@ xfunc_func_expense(LispValue node, LispValue args)
/* look up tuple in cache */
tupl
=
SearchSysCacheTuple
(
PROOID
,
ObjectIdGetDatum
(
funcid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tupl
))
elog
(
ABORT
,
"Cache lookup failed for procedure %d"
,
funcid
);
elog
(
ERROR
,
"Cache lookup failed for procedure %d"
,
funcid
);
proc
=
(
Form_pg_proc
)
GETSTRUCT
(
tupl
);
/*
...
...
@@ -622,7 +622,7 @@ xfunc_width(LispValue clause)
PointerGetDatum
(
get_vartype
((
Var
)
clause
)),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tupl
))
elog
(
ABORT
,
"Cache lookup failed for type %d"
,
elog
(
ERROR
,
"Cache lookup failed for type %d"
,
get_vartype
((
Var
)
clause
));
type
=
(
TypeTupleForm
)
GETSTRUCT
(
tupl
);
if
(
get_varattno
((
Var
)
clause
)
==
0
)
...
...
@@ -686,7 +686,7 @@ xfunc_width(LispValue clause)
ObjectIdGetDatum
(
get_opno
((
Oper
)
get_op
(
clause
))),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tupl
))
elog
(
ABORT
,
"Cache lookup failed for procedure %d"
,
elog
(
ERROR
,
"Cache lookup failed for procedure %d"
,
get_opno
((
Oper
)
get_op
(
clause
)));
return
(
xfunc_func_width
((
RegProcedure
)
(((
OperatorTupleForm
)
(
GETSTRUCT
(
tupl
)))
->
oprcode
),
...
...
@@ -717,7 +717,7 @@ xfunc_width(LispValue clause)
}
else
{
elog
(
ABORT
,
"Clause node of undetermined type"
);
elog
(
ERROR
,
"Clause node of undetermined type"
);
return
(
-
1
);
}
...
...
@@ -855,7 +855,7 @@ xfunc_find_references(LispValue clause)
}
else
{
elog
(
ABORT
,
"Clause node of undetermined type"
);
elog
(
ERROR
,
"Clause node of undetermined type"
);
return
((
List
)
LispNil
);
}
}
...
...
@@ -1192,7 +1192,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
xfunc_fixvars
(
lfirst
(
tmpclause
),
rel
,
varno
);
else
{
elog
(
ABORT
,
"Clause node of undetermined type"
);
elog
(
ERROR
,
"Clause node of undetermined type"
);
}
}
...
...
@@ -1320,7 +1320,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
Assert
(
RegProcedureIsValid
(
funcid
));
tupl
=
SearchSysCacheTuple
(
PROOID
,
ObjectIdGetDatum
(
funcid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tupl
))
elog
(
ABORT
,
"Cache lookup failed for procedure %d"
,
funcid
);
elog
(
ERROR
,
"Cache lookup failed for procedure %d"
,
funcid
);
proc
=
(
Form_pg_proc
)
GETSTRUCT
(
tupl
);
/* if function returns a tuple, get the width of that */
...
...
@@ -1338,7 +1338,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
ObjectIdGetDatum
(
proc
->
prorettype
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tupl
))
elog
(
ABORT
,
"Cache lookup failed for type %d"
,
proc
->
prorettype
);
elog
(
ERROR
,
"Cache lookup failed for type %d"
,
proc
->
prorettype
);
type
=
(
TypeTupleForm
)
GETSTRUCT
(
tupl
);
/* if the type length is known, return that */
if
(
type
->
typlen
!=
-
1
)
...
...
@@ -1421,7 +1421,7 @@ xfunc_LispRemove(LispValue foo, List bar)
sanity
=
true
;
/* found a matching item to remove! */
if
(
!
sanity
)
elog
(
ABORT
,
"xfunc_LispRemove: didn't find a match!"
);
elog
(
ERROR
,
"xfunc_LispRemove: didn't find a match!"
);
return
(
result
);
}
...
...
src/backend/optimizer/plan/createplan.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.2
1 1998/01/05 03:31:59
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.2
2 1998/01/07 21:04:01
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -185,7 +185,7 @@ create_scan_node(Path *best_path, List *tlist)
break
;
default:
elog
(
ABORT
,
"create_scan_node: unknown node type"
,
elog
(
ERROR
,
"create_scan_node: unknown node type"
,
best_path
->
pathtype
);
break
;
}
...
...
@@ -252,7 +252,7 @@ create_join_node(JoinPath *best_path, List *tlist)
break
;
default:
/* do nothing */
elog
(
ABORT
,
"create_join_node: unknown node type"
,
elog
(
ERROR
,
"create_join_node: unknown node type"
,
best_path
->
path
.
pathtype
);
}
...
...
@@ -294,7 +294,7 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses)
temp
=
best_path
->
parent
->
relids
;
if
(
temp
==
NULL
)
elog
(
ABORT
,
"scanrelid is empty"
);
elog
(
ERROR
,
"scanrelid is empty"
);
else
scan_relid
=
(
Index
)
lfirsti
(
temp
);
/* ??? who takes care of
* lnext? - ay */
...
...
@@ -364,7 +364,7 @@ create_indexscan_node(IndexPath *best_path,
ObjectIdGetDatum
(
lfirsti
(
ixid
)),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
indexTuple
))
elog
(
ABORT
,
"create_plan: index %d not found"
,
elog
(
ERROR
,
"create_plan: index %d not found"
,
lfirsti
(
ixid
));
index
=
(
IndexTupleForm
)
GETSTRUCT
(
indexTuple
);
if
(
index
->
indislossy
)
...
...
@@ -915,7 +915,7 @@ make_temp(List *tlist,
break
;
default:
elog
(
ABORT
,
"make_temp: unknown temp type %d"
,
temptype
);
elog
(
ERROR
,
"make_temp: unknown temp type %d"
,
temptype
);
}
return
(
retval
);
...
...
src/backend/optimizer/plan/planmain.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.1
4 1998/01/05 03:32:03
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.1
5 1998/01/07 21:04:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -407,7 +407,7 @@ make_groupPlan(List **tlist,
if
(
length
(
glc
)
!=
0
)
{
elog
(
ABORT
,
"group attribute disappeared from target list"
);
elog
(
ERROR
,
"group attribute disappeared from target list"
);
}
/*
...
...
src/backend/optimizer/plan/planner.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.
19 1998/01/05 03:32:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.
20 1998/01/07 21:04:05
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -279,7 +279,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if
(
rettype
==
InvalidOid
)
return
;
else
elog
(
ABORT
,
"return type mismatch in function decl: final query is a catalog utility"
);
elog
(
ERROR
,
"return type mismatch in function decl: final query is a catalog utility"
);
}
/* okay, it's an ordinary query */
...
...
@@ -294,7 +294,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if
(
rettype
==
InvalidOid
)
{
if
(
cmd
==
CMD_SELECT
)
elog
(
ABORT
,
elog
(
ERROR
,
"function declared with no return type, but final query is a retrieve"
);
else
return
;
...
...
@@ -302,14 +302,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
/* by here, the function is declared to return some type */
if
((
typ
=
typeidType
(
rettype
))
==
NULL
)
elog
(
ABORT
,
"can't find return type %d for function
\n
"
,
rettype
);
elog
(
ERROR
,
"can't find return type %d for function
\n
"
,
rettype
);
/*
* test 3: if the function is declared to return a value, then the
* final query had better be a retrieve.
*/
if
(
cmd
!=
CMD_SELECT
)
elog
(
ABORT
,
"function declared to return type %s, but final query is not a retrieve"
,
typeTypeName
(
typ
));
elog
(
ERROR
,
"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
...
...
@@ -319,11 +319,11 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if
(
typeTypeRelid
(
typ
)
==
InvalidOid
)
{
if
(
exec_tlist_length
(
tlist
)
>
1
)
elog
(
ABORT
,
"function declared to return %s returns multiple values in final retrieve"
,
typeTypeName
(
typ
));
elog
(
ERROR
,
"function declared to return %s returns multiple values in final retrieve"
,
typeTypeName
(
typ
));
resnode
=
(
Resdom
*
)
((
TargetEntry
*
)
lfirst
(
tlist
))
->
resdom
;
if
(
resnode
->
restype
!=
rettype
)
elog
(
ABORT
,
"return type mismatch in function: declared to return %s, returns %s"
,
typeTypeName
(
typ
),
typeidTypeName
(
resnode
->
restype
));
elog
(
ERROR
,
"return type mismatch in function: declared to return %s, returns %s"
,
typeTypeName
(
typ
),
typeidTypeName
(
resnode
->
restype
));
/* by here, base return types match */
return
;
...
...
@@ -352,13 +352,13 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
reln
=
heap_open
(
typeTypeRelid
(
typ
));
if
(
!
RelationIsValid
(
reln
))
elog
(
ABORT
,
"cannot open relation relid %d"
,
typeTypeRelid
(
typ
));
elog
(
ERROR
,
"cannot open relation relid %d"
,
typeTypeRelid
(
typ
));
relid
=
reln
->
rd_id
;
relnatts
=
reln
->
rd_rel
->
relnatts
;
if
(
exec_tlist_length
(
tlist
)
!=
relnatts
)
elog
(
ABORT
,
"function declared to return type %s does not retrieve (%s.*)"
,
typeTypeName
(
typ
),
typeTypeName
(
typ
));
elog
(
ERROR
,
"function declared to return type %s does not retrieve (%s.*)"
,
typeTypeName
(
typ
),
typeTypeName
(
typ
));
/* expect attributes 1 .. n in order */
for
(
i
=
1
;
i
<=
relnatts
;
i
++
)
...
...
@@ -388,14 +388,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
else if (IsA(thenode, Func))
tletype = (Oid) get_functype((Func *) thenode);
else
elog(
ABORT
, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
elog(
ERROR
, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
}
else
elog(
ABORT
, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
elog(
ERROR
, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
#endif
/* reach right in there, why don't you? */
if
(
tletype
!=
reln
->
rd_att
->
attrs
[
i
-
1
]
->
atttypid
)
elog
(
ABORT
,
"function declared to return type %s does not retrieve (%s.all)"
,
typeTypeName
(
typ
),
typeTypeName
(
typ
));
elog
(
ERROR
,
"function declared to return type %s does not retrieve (%s.all)"
,
typeTypeName
(
typ
),
typeTypeName
(
typ
));
}
heap_close
(
reln
);
...
...
src/backend/optimizer/plan/setrefs.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.1
1 1998/01/05 03:32:05
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.1
2 1998/01/07 21:04:13
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -201,7 +201,7 @@ set_temp_tlist_references(Temp *temp)
}
else
{
elog
(
ABORT
,
"calling set_temp_tlist_references with empty lefttree"
);
elog
(
ERROR
,
"calling set_temp_tlist_references with empty lefttree"
);
}
}
...
...
@@ -651,7 +651,7 @@ replace_result_clause(List *clause,
/*
* Ooops! we can not handle that!
*/
elog
(
ABORT
,
"replace_result_clause: Can not handle this tlist!
\n
"
);
elog
(
ERROR
,
"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!
*/
elog
(
ABORT
,
"replace_agg_clause: Can not handle this tlist!
\n
"
);
elog
(
ERROR
,
"replace_agg_clause: Can not handle this tlist!
\n
"
);
}
}
...
...
@@ -902,7 +902,7 @@ del_agg_clause(Node *clause)
/*
* Ooops! we can not handle that!
*/
elog
(
ABORT
,
"del_agg_clause: Can not handle this tlist!
\n
"
);
elog
(
ERROR
,
"del_agg_clause: Can not handle this tlist!
\n
"
);
}
return
NULL
;
}
src/backend/optimizer/util/plancat.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.1
2 1998/01/05 03:32:09
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.1
3 1998/01/07 21:04:17
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -77,7 +77,7 @@ relation_info(Query *root, Index relid,
}
else
{
elog
(
ABORT
,
"RelationCatalogInformation: Relation %d not found"
,
elog
(
ERROR
,
"RelationCatalogInformation: Relation %d not found"
,
relationObjectId
);
}
...
...
@@ -152,7 +152,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
1
,
&
indexKey
);
}
if
(
!
HeapScanIsValid
(
scan
))
elog
(
ABORT
,
"index_info: scan not started"
);
elog
(
ERROR
,
"index_info: scan not started"
);
indexTuple
=
heap_getnext
(
scan
,
0
,
(
Buffer
*
)
NULL
);
if
(
!
HeapTupleIsValid
(
indexTuple
))
{
...
...
@@ -218,7 +218,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
UInt16GetDatum
(
amstrategy
),
0
);
if
(
!
HeapTupleIsValid
(
amopTuple
))
elog
(
ABORT
,
"index_info: no amop %d %d %d"
,
elog
(
ERROR
,
"index_info: no amop %d %d %d"
,
relam
,
index
->
indclass
[
i
],
amstrategy
);
info
->
orderOprs
[
i
]
=
((
Form_pg_amop
)
GETSTRUCT
(
amopTuple
))
->
amopopr
;
...
...
@@ -349,10 +349,10 @@ restriction_selectivity(Oid functionObjectId,
(
char
*
)
constFlag
,
NULL
);
if
(
!
PointerIsValid
(
result
))
elog
(
ABORT
,
"RestrictionClauseSelectivity: bad pointer"
);
elog
(
ERROR
,
"RestrictionClauseSelectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ABORT
,
"RestrictionClauseSelectivity: bad value %lf"
,
elog
(
ERROR
,
"RestrictionClauseSelectivity: bad value %lf"
,
*
result
);
return
((
Cost
)
*
result
);
...
...
@@ -388,10 +388,10 @@ join_selectivity(Oid functionObjectId,
(
char
*
)
(
int
)
attributeNumber2
,
NULL
);
if
(
!
PointerIsValid
(
result
))
elog
(
ABORT
,
"JoinClauseSelectivity: bad pointer"
);
elog
(
ERROR
,
"JoinClauseSelectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ABORT
,
"JoinClauseSelectivity: bad value %lf"
,
elog
(
ERROR
,
"JoinClauseSelectivity: bad value %lf"
,
*
result
);
return
((
Cost
)
*
result
);
...
...
@@ -532,7 +532,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum
(
indexrelid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
indRel
))
elog
(
ABORT
,
"IndexSelectivity: index %d not found"
,
elog
(
ERROR
,
"IndexSelectivity: index %d not found"
,
indexrelid
);
relam
=
((
Form_pg_class
)
GETSTRUCT
(
indRel
))
->
relam
;
...
...
@@ -540,7 +540,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum
(
indexrelid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
indexTuple
))
elog
(
ABORT
,
"IndexSelectivity: index %d not found"
,
elog
(
ERROR
,
"IndexSelectivity: index %d not found"
,
indexrelid
);
index
=
(
IndexTupleForm
)
GETSTRUCT
(
indexTuple
);
...
...
@@ -595,7 +595,7 @@ IndexSelectivity(Oid indexrelid,
ObjectIdGetDatum
(
relam
),
0
);
if
(
!
HeapTupleIsValid
(
amopTuple
))
elog
(
ABORT
,
"IndexSelectivity: no amop %d %d"
,
elog
(
ERROR
,
"IndexSelectivity: no amop %d %d"
,
indclass
,
operatorObjectIds
[
n
]);
amop
=
(
Form_pg_amop
)
GETSTRUCT
(
amopTuple
);
...
...
src/backend/port/dynloader/linux.c
View file @
679d39b9
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.
5 1998/01/05 03:32:39
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.
6 1998/01/07 21:04:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -32,7 +32,7 @@ void *
pg_dlopen
(
char
*
filename
)
{
#ifndef HAVE_DLD_H
elog
(
ABORT
,
"dynamic load not supported"
);
elog
(
ERROR
,
"dynamic load not supported"
);
return
(
NULL
);
#else
static
int
dl_initialized
=
0
;
...
...
src/backend/rewrite/rewriteDefine.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.1
2 1998/01/07 15:32:37
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.1
3 1998/01/07 21:04:32
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -98,7 +98,7 @@ InsertRule(char *rulname,
eventrel
=
heap_openr
(
evobj
);
if
(
eventrel
==
NULL
)
{
elog
(
ABORT
,
"rules cannot be defined on relations not in schema"
);
elog
(
ERROR
,
"rules cannot be defined on relations not in schema"
);
}
eventrel_oid
=
RelationGetRelationId
(
eventrel
);
...
...
@@ -118,7 +118,7 @@ InsertRule(char *rulname,
evqual
=
"<>"
;
if
(
IsDefinedRewriteRule
(
rulname
))
elog
(
ABORT
,
"Attempt to insert rule '%s' failed: already exists"
,
elog
(
ERROR
,
"Attempt to insert rule '%s' failed: already exists"
,
rulname
);
strcpyq
(
actionbuf
,
actiontree
);
strcpyq
(
qualbuf
,
evqual
);
...
...
@@ -130,7 +130,7 @@ InsertRule(char *rulname,
if
(
strlen
(
template
)
+
strlen
(
rulname
)
+
strlen
(
actionbuf
)
+
strlen
(
qualbuf
)
+
20
/* fudge fac */
>
RULE_PLAN_SIZE
)
{
elog
(
ABORT
,
"DefineQueryRewrite: rule plan string too big."
);
elog
(
ERROR
,
"DefineQueryRewrite: rule plan string too big."
);
}
sprintf
(
rulebuf
,
template
,
rulname
,
evtype
,
eventrel_oid
,
evslot_index
,
actionbuf
,
...
...
@@ -156,12 +156,12 @@ ValidateRule(int event_type,
if
(((
event_type
==
CMD_INSERT
)
||
(
event_type
==
CMD_DELETE
))
&&
eslot_string
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"rules not allowed for insert or delete events to an attribute"
);
}
if
(
event_qual
&&
!*
action
&&
is_instead
)
elog
(
ABORT
,
elog
(
ERROR
,
"event_quals on 'instead nothing' rules not currently supported"
);
#if 0
...
...
@@ -211,7 +211,7 @@ DefineQueryRewrite(RuleStmt *stmt)
event_relation
=
heap_openr
(
event_obj
->
relname
);
if
(
event_relation
==
NULL
)
{
elog
(
ABORT
,
"virtual relations not supported yet"
);
elog
(
ERROR
,
"virtual relations not supported yet"
);
}
ev_relid
=
RelationGetRelationId
(
event_relation
);
...
...
@@ -265,7 +265,7 @@ DefineQueryRewrite(RuleStmt *stmt)
/* what is the max size of type text? XXX -- glass */
if
(
length
(
action
)
>
15
)
elog
(
ABORT
,
"max # of actions exceeded"
);
elog
(
ERROR
,
"max # of actions exceeded"
);
prs2_addToRelation
(
ev_relid
,
ruleId
,
event_type
,
event_attno
,
is_instead
,
event_qual
,
action
);
}
...
...
src/backend/rewrite/rewriteHandler.c
View file @
679d39b9
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
8 1998/01/05 03:32:45
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
9 1998/01/07 21:04:37
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -647,7 +647,7 @@ deepRewriteQuery(Query *parsetree)
if
(
++
numQueryRewriteInvoked
>
REWRITE_INVOKE_MAX
)
{
elog
(
ABORT
,
"query rewritten %d times, may contain cycles"
,
elog
(
ERROR
,
"query rewritten %d times, may contain cycles"
,
numQueryRewriteInvoked
-
1
);
}
...
...
src/backend/rewrite/rewriteRemove.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.
8 1998/01/05 03:32:46
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.
9 1998/01/07 21:04:41
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -39,13 +39,13 @@ RewriteGetRuleEventRel(char *rulename)
htp
=
SearchSysCacheTuple
(
REWRITENAME
,
PointerGetDatum
(
rulename
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
ABORT
,
"RewriteGetRuleEventRel: rule
\"
%s
\"
not found"
,
elog
(
ERROR
,
"RewriteGetRuleEventRel: rule
\"
%s
\"
not found"
,
rulename
);
eventrel
=
((
Form_pg_rewrite
)
GETSTRUCT
(
htp
))
->
ev_class
;
htp
=
SearchSysCacheTuple
(
RELOID
,
PointerGetDatum
(
eventrel
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
ABORT
,
"RewriteGetRuleEventRel: class %d not found"
,
elog
(
ERROR
,
"RewriteGetRuleEventRel: class %d not found"
,
eventrel
);
return
((
Form_pg_class
)
GETSTRUCT
(
htp
))
->
relname
.
data
;
}
...
...
@@ -99,7 +99,7 @@ RemoveRewriteRule(char *ruleName)
if
(
!
HeapTupleIsValid
(
tuple
))
{
heap_close
(
RewriteRelation
);
elog
(
ABORT
,
"No rule with name = '%s' was found.
\n
"
,
ruleName
);
elog
(
ERROR
,
"No rule with name = '%s' was found.
\n
"
,
ruleName
);
}
/*
...
...
@@ -116,7 +116,7 @@ RemoveRewriteRule(char *ruleName)
if
(
isNull
)
{
/* XXX strange!!! */
elog
(
ABORT
,
"RemoveRewriteRule: null event target relation!"
);
elog
(
ERROR
,
"RemoveRewriteRule: null event target relation!"
);
}
eventRelationOid
=
DatumGetObjectId
(
eventRelationOidDatum
);
...
...
src/backend/rewrite/rewriteSupport.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.1
3 1998/01/05 03:32:47
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.1
4 1998/01/07 21:04:42
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -56,7 +56,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
ObjectIdGetDatum
(
ruleoid
),
0
,
0
,
0
);
if
(
ruletuple
==
NULL
)
elog
(
ABORT
,
"rule %u isn't in rewrite system relation"
,
ruleoid
);
elog
(
ERROR
,
"rule %u isn't in rewrite system relation"
,
ruleoid
);
ruleaction
=
(
char
*
)
heap_getattr
(
ruletuple
,
InvalidBuffer
,
...
...
@@ -72,7 +72,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
if
(
action_is_null
||
instead_is_null
)
{
elog
(
ABORT
,
"internal error: rewrite rule not properly set up"
);
elog
(
ERROR
,
"internal error: rewrite rule not properly set up"
);
}
ruleaction
=
textout
((
struct
varlena
*
)
ruleaction
);
...
...
src/backend/storage/buffer/buf_init.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.1
6 1998/01/05 03:32:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.1
7 1998/01/07 21:04:46
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -155,10 +155,10 @@ InitBufferPool(IPCKey key)
*/
if
(
sizeof
(
struct
sbufdesc
)
!=
PADDED_SBUFDESC_SIZE
||
sizeof
(
struct
sbufdesc_unpadded
)
>
PADDED_SBUFDESC_SIZE
)
elog
(
ABORT
,
"Internal error: sbufdesc does not have the proper size, "
elog
(
ERROR
,
"Internal error: sbufdesc does not have the proper size, "
"contact the Postgres developers"
);
if
(
sizeof
(
struct
sbufdesc_unpadded
)
<=
PADDED_SBUFDESC_SIZE
/
2
)
elog
(
ABORT
,
"Internal error: sbufdesc is greatly over-sized, "
elog
(
ERROR
,
"Internal error: sbufdesc is greatly over-sized, "
"contact the Postgres developers"
);
Data_Descriptors
=
NBuffers
;
...
...
src/backend/storage/buffer/buf_table.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.
9 1998/01/05 03:32:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.
10 1998/01/07 21:04:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -87,7 +87,7 @@ BufTableLookup(BufferTag *tagPtr)
if
(
!
result
)
{
elog
(
ABORT
,
"BufTableLookup: BufferLookup table corrupted"
);
elog
(
ERROR
,
"BufTableLookup: BufferLookup table corrupted"
);
return
(
NULL
);
}
if
(
!
found
)
...
...
@@ -122,7 +122,7 @@ BufTableDelete(BufferDesc *buf)
if
(
!
(
result
&&
found
))
{
elog
(
ABORT
,
"BufTableDelete: BufferLookup table corrupted"
);
elog
(
ERROR
,
"BufTableDelete: BufferLookup table corrupted"
);
return
(
FALSE
);
}
...
...
@@ -145,14 +145,14 @@ BufTableInsert(BufferDesc *buf)
if
(
!
result
)
{
Assert
(
0
);
elog
(
ABORT
,
"BufTableInsert: BufferLookup table corrupted"
);
elog
(
ERROR
,
"BufTableInsert: BufferLookup table corrupted"
);
return
(
FALSE
);
}
/* found something else in the table ! */
if
(
found
)
{
Assert
(
0
);
elog
(
ABORT
,
"BufTableInsert: BufferLookup table corrupted"
);
elog
(
ERROR
,
"BufTableInsert: BufferLookup table corrupted"
);
return
(
FALSE
);
}
...
...
src/backend/storage/buffer/bufmgr.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.3
0 1998/01/05 03:32:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.3
1 1998/01/07 21:04:49
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -444,7 +444,7 @@ BufferAlloc(Relation reln,
/*
* But it can return buf == NULL if we are in aborting transaction
* now and so elog(
ABORT
,...) in GetFreeBuffer will not abort
* now and so elog(
ERROR
,...) in GetFreeBuffer will not abort
* again.
*/
if
(
buf
==
NULL
)
...
...
@@ -834,7 +834,7 @@ FlushBuffer(Buffer buffer, bool release)
if
(
status
==
SM_FAIL
)
{
elog
(
ABORT
,
"FlushBuffer: cannot flush block %u of the relation %s"
,
elog
(
ERROR
,
"FlushBuffer: cannot flush block %u of the relation %s"
,
bufHdr
->
tag
.
blockNum
,
bufHdr
->
sb_relname
);
return
(
STATUS_ERROR
);
}
...
...
@@ -1009,7 +1009,7 @@ BufferSync()
UnpinBuffer
(
bufHdr
);
if
(
bufHdr
->
flags
&
BM_IO_ERROR
)
{
elog
(
ABORT
,
"BufferSync: write error %u for %s"
,
elog
(
ERROR
,
"BufferSync: write error %u for %s"
,
bufHdr
->
tag
.
blockNum
,
bufHdr
->
sb_relname
);
}
if
(
reln
!=
(
Relation
)
NULL
)
...
...
@@ -1054,7 +1054,7 @@ BufferSync()
if
(
status
==
SM_FAIL
)
{
bufHdr
->
flags
|=
BM_IO_ERROR
;
elog
(
ABORT
,
"BufferSync: cannot write %u for %s"
,
elog
(
ERROR
,
"BufferSync: cannot write %u for %s"
,
bufHdr
->
tag
.
blockNum
,
bufHdr
->
sb_relname
);
}
BufferFlushCount
++
;
...
...
src/backend/storage/buffer/freelist.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.
8 1998/01/05 03:32:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.
9 1998/01/07 21:04:52
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -189,7 +189,7 @@ GetFreeBuffer()
{
/* queue is empty. All buffers in the buffer pool are pinned. */
elog
(
ABORT
,
"out of free buffers: time to abort !
\n
"
);
elog
(
ERROR
,
"out of free buffers: time to abort !
\n
"
);
return
(
NULL
);
}
buf
=
&
(
BufferDescriptors
[
SharedFreeList
->
freeNext
]);
...
...
src/backend/storage/buffer/localbuf.c
View file @
679d39b9
...
...
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.1
5 1998/01/05 03:32:58
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.1
6 1998/01/07 21:04:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -110,7 +110,7 @@ LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
}
}
if
(
bufHdr
==
NULL
)
elog
(
ABORT
,
"no empty local buffer."
);
elog
(
ERROR
,
"no empty local buffer."
);
/*
* this buffer is not referenced but it might still be dirty (the last
...
...
src/backend/storage/file/fd.c
View file @
679d39b9
...
...
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.2
8 1998/01/05 03:33:00
momjian Exp $
* $Id: fd.c,v 1.2
9 1998/01/07 21:04:58
momjian Exp $
*
* NOTES:
*
...
...
@@ -586,7 +586,7 @@ tryAgain:
if
(
fileName
==
NULL
)
{
elog
(
ABORT
,
"fileNameOpenFile: NULL fname"
);
elog
(
ERROR
,
"fileNameOpenFile: NULL fname"
);
}
vfdP
->
fileName
=
malloc
(
strlen
(
fileName
)
+
1
);
strcpy
(
vfdP
->
fileName
,
fileName
);
...
...
@@ -763,7 +763,7 @@ FileSeek(File file, long offset, int whence)
lseek
(
VfdCache
[
file
].
fd
,
offset
,
whence
);
return
returnCode
;
default:
elog
(
ABORT
,
"FileSeek: invalid whence: %d"
,
whence
);
elog
(
ERROR
,
"FileSeek: invalid whence: %d"
,
whence
);
break
;
}
}
...
...
src/backend/storage/ipc/ipc.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.1
7 1998/01/05 03:33:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.1
8 1998/01/07 21:05:03
momjian Exp $
*
* NOTES
*
...
...
@@ -89,7 +89,7 @@ PrivateMemoryCreate(IpcMemoryKey memKey,
IpcPrivateMem
[
memid
].
id
=
memid
;
IpcPrivateMem
[
memid
].
memptr
=
malloc
(
size
);
if
(
IpcPrivateMem
[
memid
].
memptr
==
NULL
)
elog
(
ABORT
,
"PrivateMemoryCreate: not enough memory to malloc"
);
elog
(
ERROR
,
"PrivateMemoryCreate: not enough memory to malloc"
);
MemSet
(
IpcPrivateMem
[
memid
].
memptr
,
0
,
size
);
/* XXX PURIFY */
return
(
memid
++
);
...
...
src/backend/storage/ipc/shmem.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.1
5 1998/01/05 03:33:06
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.1
6 1998/01/07 21:05:08
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -418,7 +418,7 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
{
SpinRelease
(
BindingLock
);
elog
(
ABORT
,
"ShmemInitPID: BindingTable corrupted"
);
elog
(
ERROR
,
"ShmemInitPID: BindingTable corrupted"
);
return
(
FALSE
);
}
...
...
@@ -469,7 +469,7 @@ ShmemPIDDestroy(int pid)
if
(
!
result
)
{
elog
(
ABORT
,
"ShmemPIDDestroy: PID table corrupted"
);
elog
(
ERROR
,
"ShmemPIDDestroy: PID table corrupted"
);
return
(
INVALID_OFFSET
);
}
...
...
@@ -555,7 +555,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
SpinRelease
(
BindingLock
);
elog
(
ABORT
,
"ShmemInitStruct: Binding Table corrupted"
);
elog
(
ERROR
,
"ShmemInitStruct: Binding Table corrupted"
);
return
(
NULL
);
}
...
...
@@ -640,6 +640,6 @@ TransactionIdIsInProgress(TransactionId xid)
}
SpinRelease
(
BindingLock
);
elog
(
ABORT
,
"TransactionIdIsInProgress: BindingTable corrupted"
);
elog
(
ERROR
,
"TransactionIdIsInProgress: BindingTable corrupted"
);
return
(
false
);
}
src/backend/storage/large_object/inv_api.c
View file @
679d39b9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
5 1998/01/05 03:33:09
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
6 1998/01/07 21:05:17
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -111,14 +111,14 @@ inv_create(int flags)
if
(
SearchSysCacheTuple
(
RELNAME
,
PointerGetDatum
(
objname
),
0
,
0
,
0
)
!=
NULL
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"internal error: %s already exists -- cannot create large obj"
,
objname
);
}
if
(
SearchSysCacheTuple
(
RELNAME
,
PointerGetDatum
(
indname
),
0
,
0
,
0
)
!=
NULL
)
{
elog
(
ABORT
,
elog
(
ERROR
,
"internal error: %s already exists -- cannot create large obj"
,
indname
);
}
...
...
@@ -147,7 +147,7 @@ inv_create(int flags)
if
(
!
RelationIsValid
(
r
))
{
elog
(
ABORT
,
"cannot create large object on %s under inversion"
,
elog
(
ERROR
,
"cannot create large object on %s under inversion"
,
smgrout
(
DEFAULT_SMGR
));
}
...
...
@@ -172,7 +172,7 @@ inv_create(int flags)
if
(
!
RelationIsValid
(
indr
))
{
elog
(
ABORT
,
"cannot create index for large obj on %s under inversion"
,
elog
(
ERROR
,
"cannot create index for large obj on %s under inversion"
,
smgrout
(
DEFAULT_SMGR
));
}
...
...
src/backend/storage/lmgr/lmgr.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.1
0 1998/01/05 03:33:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.1
1 1998/01/07 21:05:28
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -434,7 +434,7 @@ RelationUnsetLockForRead(Relation relation)
*/
if
(
!
LockInfoIsValid
(
linfo
))
{
elog
(
ABORT
,
elog
(
ERROR
,
"Releasing a lock on %s with invalid lock information"
,
RelationGetRelationName
(
relation
));
}
...
...
@@ -527,7 +527,7 @@ RelationUnsetLockForWrite(Relation relation)
if
(
!
LockInfoIsValid
(
linfo
))
{
elog
(
ABORT
,
elog
(
ERROR
,
"Releasing a lock on %s with invalid lock information"
,
RelationGetRelationName
(
relation
));
}
...
...
@@ -769,7 +769,7 @@ RelationUnsetSingleWLockPage(Relation relation,
return
;
if
(
!
LockInfoIsValid
(
relation
->
lockInfo
))
elog
(
ABORT
,
elog
(
ERROR
,
"Releasing a lock on %s with invalid lock information"
,
RelationGetRelationName
(
relation
));
...
...
@@ -816,7 +816,7 @@ RelationUnsetSingleRLockPage(Relation relation,
return
;
if
(
!
LockInfoIsValid
(
relation
->
lockInfo
))
elog
(
ABORT
,
elog
(
ERROR
,
"Releasing a lock on %s with invalid lock information"
,
RelationGetRelationName
(
relation
));
...
...
src/backend/storage/lmgr/lock.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.1
7 1998/01/05 03:33:2
2 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.1
8 1998/01/07 21:05:3
2 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
...
...
@@ -802,7 +802,7 @@ WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
lock
->
holders
[
lockt
]
--
;
LOCK_DUMP_AUX
(
"WaitOnLock: aborting on lock"
,
lock
,
lockt
);
SpinRelease
(
ltable
->
ctl
->
masterLock
);
elog
(
ABORT
,
"WaitOnLock: error on wakeup - Aborting this transaction"
);
elog
(
ERROR
,
"WaitOnLock: error on wakeup - Aborting this transaction"
);
}
LOCK_DUMP_AUX
(
"WaitOnLock: wakeup on lock"
,
lock
,
lockt
);
...
...
@@ -887,7 +887,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
#endif
/*
* let the caller print its own error message, too. Do not elog(
ABORT
).
* let the caller print its own error message, too. Do not elog(
ERROR
).
*/
if
(
!
lock
)
{
...
...
src/backend/storage/lmgr/multi.c
View file @
679d39b9
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
9 1998/01/05 03:33:2
5 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
10 1998/01/07 21:05:3
5 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
...
...
@@ -100,14 +100,14 @@ InitMultiLevelLockm()
MultiTableId
=
tableId
;
if
(
!
(
MultiTableId
))
{
elog
(
ABORT
,
"InitMultiLockm: couldnt initialize lock table"
);
elog
(
ERROR
,
"InitMultiLockm: couldnt initialize lock table"
);
}
/* -----------------------
* No short term lock table for now. -Jeff 15 July 1991
*
* ShortTermTableId = LockTabRename(tableId);
* if (! (ShortTermTableId)) {
* elog(
ABORT
,"InitMultiLockm: couldnt rename lock table");
* elog(
ERROR
,"InitMultiLockm: couldnt rename lock table");
* }
* -----------------------
*/
...
...
@@ -237,7 +237,7 @@ MultiAcquire(LockTableId tableId,
locks
[
2
]
=
lockt
;
break
;
default:
elog
(
ABORT
,
"MultiAcquire: bad lock level"
);
elog
(
ERROR
,
"MultiAcquire: bad lock level"
);
return
(
FALSE
);
}
...
...
@@ -390,7 +390,7 @@ MultiRelease(LockTableId tableId,
locks
[
2
]
=
lockt
;
break
;
default:
elog
(
ABORT
,
"MultiRelease: bad lockt"
);
elog
(
ERROR
,
"MultiRelease: bad lockt"
);
}
/*
...
...
@@ -435,7 +435,7 @@ MultiRelease(LockTableId tableId,
status
=
LockRelease
(
tableId
,
tmpTag
,
locks
[
i
]);
if
(
!
status
)
{
elog
(
ABORT
,
"MultiRelease: couldn't release after error"
);
elog
(
ERROR
,
"MultiRelease: couldn't release after error"
);
}
}
}
...
...
src/backend/storage/lmgr/proc.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.2
4 1998/01/05 03:33:2
6 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.2
5 1998/01/07 21:05:3
6 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.2
4 1998/01/05 03:33:2
6 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.2
5 1998/01/07 21:05:3
6 momjian Exp $
*/
#include <sys/time.h>
#include <unistd.h>
...
...
@@ -163,13 +163,13 @@ InitProcess(IPCKey key)
if
(
!
found
)
{
/* this should not happen. InitProcGlobal() is called before this. */
elog
(
ABORT
,
"InitProcess: Proc Header uninitialized"
);
elog
(
ERROR
,
"InitProcess: Proc Header uninitialized"
);
}
if
(
MyProc
!=
NULL
)
{
SpinRelease
(
ProcStructLock
);
elog
(
ABORT
,
"ProcInit: you already exist"
);
elog
(
ERROR
,
"ProcInit: you already exist"
);
return
;
}
...
...
@@ -803,7 +803,7 @@ ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum)
}
/* if we reach here, all the semaphores are in use. */
elog
(
ABORT
,
"InitProc: cannot allocate a free semaphore"
);
elog
(
ERROR
,
"InitProc: cannot allocate a free semaphore"
);
}
/*
...
...
src/backend/storage/page/bufpage.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.1
2 1998/01/05 03:33:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.1
3 1998/01/07 21:05:40
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -134,7 +134,7 @@ PageAddItem(Page page,
if
(((
*
itemId
).
lp_flags
&
LP_USED
)
||
((
*
itemId
).
lp_len
!=
0
))
{
elog
(
ABORT
,
"PageAddItem: tried overwrite of used ItemId"
);
elog
(
ERROR
,
"PageAddItem: tried overwrite of used ItemId"
);
return
(
InvalidOffsetNumber
);
}
}
...
...
src/backend/storage/smgr/md.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.2
5 1998/01/05 03:33:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.2
6 1998/01/07 21:05:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -568,7 +568,7 @@ mdnblocks(Relation reln)
{
v
->
mdfd_chain
=
_mdfd_openseg
(
reln
,
segno
,
O_CREAT
);
if
(
v
->
mdfd_chain
==
(
MdfdVec
*
)
NULL
)
elog
(
ABORT
,
"cannot count blocks for %.16s -- open failed"
,
elog
(
ERROR
,
"cannot count blocks for %.16s -- open failed"
,
RelationGetRelationName
(
reln
));
}
...
...
@@ -808,7 +808,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
if
(
fd
<
0
)
{
if
((
fd
=
mdopen
(
reln
))
<
0
)
elog
(
ABORT
,
"cannot open relation %.16s"
,
elog
(
ERROR
,
"cannot open relation %.16s"
,
RelationGetRelationName
(
reln
));
reln
->
rd_fd
=
fd
;
}
...
...
@@ -823,7 +823,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
v
->
mdfd_chain
=
_mdfd_openseg
(
reln
,
i
,
oflag
);
if
(
v
->
mdfd_chain
==
(
MdfdVec
*
)
NULL
)
elog
(
ABORT
,
"cannot open segment %d of relation %.16s"
,
elog
(
ERROR
,
"cannot open segment %d of relation %.16s"
,
i
,
RelationGetRelationName
(
reln
));
}
v
=
v
->
mdfd_chain
;
...
...
src/backend/storage/smgr/smgr.c
View file @
679d39b9
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.1
2 1998/01/05 03:33:33
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.1
3 1998/01/07 21:05:45
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -132,7 +132,7 @@ smgrcreate(int16 which, Relation reln)
int
fd
;
if
((
fd
=
(
*
(
smgrsw
[
which
].
smgr_create
))
(
reln
))
<
0
)
elog
(
ABORT
,
"cannot open %s"
,
elog
(
ERROR
,
"cannot open %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
fd
);
...
...
@@ -149,7 +149,7 @@ smgrunlink(int16 which, Relation reln)
int
status
;
if
((
status
=
(
*
(
smgrsw
[
which
].
smgr_unlink
))
(
reln
))
==
SM_FAIL
)
elog
(
ABORT
,
"cannot unlink %s"
,
elog
(
ERROR
,
"cannot unlink %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
...
...
@@ -169,7 +169,7 @@ smgrextend(int16 which, Relation reln, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_extend
))
(
reln
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
ABORT
,
"%s: cannot extend"
,
elog
(
ERROR
,
"%s: cannot extend"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
...
...
@@ -187,7 +187,7 @@ smgropen(int16 which, Relation reln)
int
fd
;
if
((
fd
=
(
*
(
smgrsw
[
which
].
smgr_open
))
(
reln
))
<
0
)
elog
(
ABORT
,
"cannot open %s"
,
elog
(
ERROR
,
"cannot open %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
fd
);
...
...
@@ -209,7 +209,7 @@ int
smgrclose
(
int16
which
,
Relation
reln
)
{
if
((
*
(
smgrsw
[
which
].
smgr_close
))
(
reln
)
==
SM_FAIL
)
elog
(
ABORT
,
"cannot close %s"
,
elog
(
ERROR
,
"cannot close %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
SM_SUCCESS
);
...
...
@@ -233,7 +233,7 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_read
))
(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
ABORT
,
"cannot read block %d of %s"
,
elog
(
ERROR
,
"cannot read block %d of %s"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
...
...
@@ -255,7 +255,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_write
))
(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
ABORT
,
"cannot write block %d of %s"
,
elog
(
ERROR
,
"cannot write block %d of %s"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
...
...
@@ -272,7 +272,7 @@ smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_flush
))
(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
ABORT
,
"cannot flush block %d of %s to stable store"
,
elog
(
ERROR
,
"cannot flush block %d of %s to stable store"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
...
...
@@ -310,7 +310,7 @@ smgrblindwrt(int16 which,
blkno
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
ABORT
,
"cannot write block %d of %s [%s] blind"
,
elog
(
ERROR
,
"cannot write block %d of %s [%s] blind"
,
blkno
,
relstr
,
dbstr
);
pfree
(
dbstr
);
...
...
@@ -332,7 +332,7 @@ smgrnblocks(int16 which, Relation reln)
int
nblocks
;
if
((
nblocks
=
(
*
(
smgrsw
[
which
].
smgr_nblocks
))
(
reln
))
<
0
)
elog
(
ABORT
,
"cannot count blocks for %s"
,
elog
(
ERROR
,
"cannot count blocks for %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
nblocks
);
...
...
@@ -354,7 +354,7 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
if
(
smgrsw
[
which
].
smgr_truncate
)
{
if
((
newblks
=
(
*
(
smgrsw
[
which
].
smgr_truncate
))
(
reln
,
nblocks
))
<
0
)
elog
(
ABORT
,
"cannot truncate %s to %d blocks"
,
elog
(
ERROR
,
"cannot truncate %s to %d blocks"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]),
nblocks
);
}
...
...
@@ -406,7 +406,7 @@ bool
smgriswo
(
int16
smgrno
)
{
if
(
smgrno
<
0
||
smgrno
>=
NSmgr
)
elog
(
ABORT
,
"illegal storage manager number %d"
,
smgrno
);
elog
(
ERROR
,
"illegal storage manager number %d"
,
smgrno
);
return
(
smgrwo
[
smgrno
]);
}
src/backend/storage/smgr/smgrtype.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.
6 1998/01/05 03:33:35
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.
7 1998/01/07 21:05:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -49,7 +49,7 @@ smgrin(char *s)
if
(
strcmp
(
s
,
StorageManager
[
i
].
smgr_name
)
==
0
)
return
((
int2
)
i
);
}
elog
(
ABORT
,
"smgrin: illegal storage manager name %s"
,
s
);
elog
(
ERROR
,
"smgrin: illegal storage manager name %s"
,
s
);
return
0
;
}
...
...
@@ -59,7 +59,7 @@ smgrout(int2 i)
char
*
s
;
if
(
i
>=
NStorageManagers
||
i
<
0
)
elog
(
ABORT
,
"Illegal storage manager id %d"
,
i
);
elog
(
ERROR
,
"Illegal storage manager id %d"
,
i
);
s
=
(
char
*
)
palloc
(
strlen
(
StorageManager
[
i
].
smgr_name
)
+
1
);
strcpy
(
s
,
StorageManager
[
i
].
smgr_name
);
...
...
src/backend/tcop/fastpath.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.
9 1998/01/05 03:33:4
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.
10 1998/01/07 21:05:5
4 momjian Exp $
*
* NOTES
* This cruft is the server side of PQfn.
...
...
@@ -199,7 +199,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
* Since the validity of this structure is determined by whether the
* funcid is OK, we clear the funcid here. It must not be set to the
* correct value until we are about to return with a good struct
* fp_info, since we can be interrupted (i.e., with an elog(
ABORT
,
* fp_info, since we can be interrupted (i.e., with an elog(
ERROR
,
* ...)) at any time.
*/
MemSet
((
char
*
)
fip
,
0
,
(
int
)
sizeof
(
struct
fp_info
));
...
...
@@ -209,7 +209,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
func_htp
))
{
elog
(
ABORT
,
"update_fp_info: cache lookup for function %d failed"
,
elog
(
ERROR
,
"update_fp_info: cache lookup for function %d failed"
,
func_id
);
}
pp
=
(
Form_pg_proc
)
GETSTRUCT
(
func_htp
);
...
...
@@ -226,7 +226,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
type_htp
))
{
elog
(
ABORT
,
"update_fp_info: bad argument type %d for %d"
,
elog
(
ERROR
,
"update_fp_info: bad argument type %d for %d"
,
argtypes
[
i
],
func_id
);
}
tp
=
(
TypeTupleForm
)
GETSTRUCT
(
type_htp
);
...
...
@@ -241,7 +241,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
type_htp
))
{
elog
(
ABORT
,
"update_fp_info: bad return type %d for %d"
,
elog
(
ERROR
,
"update_fp_info: bad return type %d for %d"
,
rettype
,
func_id
);
}
tp
=
(
TypeTupleForm
)
GETSTRUCT
(
type_htp
);
...
...
@@ -267,7 +267,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
*
* RETURNS:
* nothing of significance.
* All errors result in elog(
ABORT
,...).
* All errors result in elog(
ERROR
,...).
*/
int
HandleFunctionRequest
()
...
...
@@ -297,7 +297,7 @@ HandleFunctionRequest()
if
(
fip
->
nargs
!=
nargs
)
{
elog
(
ABORT
,
"HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)"
,
elog
(
ERROR
,
"HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)"
,
nargs
,
fip
->
nargs
);
}
...
...
@@ -328,7 +328,7 @@ HandleFunctionRequest()
{
/* ... varlena */
if
(
!
(
p
=
palloc
(
argsize
+
VARHDRSZ
)))
{
elog
(
ABORT
,
"HandleFunctionRequest: palloc failed"
);
elog
(
ERROR
,
"HandleFunctionRequest: palloc failed"
);
}
VARSIZE
(
p
)
=
argsize
+
VARHDRSZ
;
pq_getnchar
(
VARDATA
(
p
),
0
,
argsize
);
...
...
@@ -338,7 +338,7 @@ HandleFunctionRequest()
/* XXX cross our fingers and trust "argsize" */
if
(
!
(
p
=
palloc
(
argsize
)))
{
elog
(
ABORT
,
"HandleFunctionRequest: palloc failed"
);
elog
(
ERROR
,
"HandleFunctionRequest: palloc failed"
);
}
pq_getnchar
(
p
,
0
,
argsize
);
}
...
...
src/backend/tcop/postgres.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
8 1998/01/05 03:33:46
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
9 1998/01/07 21:06:00
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -125,7 +125,7 @@ jmp_buf Warn_restart;
sigjmp_buf
Warn_restart
;
#endif
/* defined(nextstep) */
int
InError
OrAbort
;
int
InError
;
extern
int
NBuffers
;
...
...
@@ -728,7 +728,7 @@ pg_exec_query_dest(char *query_string,/* string to execute */
* signal handler routines used in PostgresMain()
*
* handle_warn() is used to catch kill(getpid(),1) which
* occurs when elog(
ABORT
) is called.
* occurs when elog(
ERROR
) is called.
*
* quickdie() occurs when signalled by the postmaster.
* Some backend has bought the farm,
...
...
@@ -774,7 +774,7 @@ die(SIGNAL_ARGS)
static
void
FloatExceptionHandler
(
SIGNAL_ARGS
)
{
elog
(
ABORT
,
"floating point exception!"
elog
(
ERROR
,
"floating point exception!"
" The last floating point operation either exceeded legal ranges"
" or was a divide by zero"
);
}
...
...
@@ -1343,7 +1343,7 @@ PostgresMain(int argc, char *argv[])
* so that the slaves signal the master to abort the transaction
* rather than calling AbortCurrentTransaction() themselves.
*
* Note: elog(
ABORT
) causes a kill(getpid(),1) to occur sending
* Note: elog(
ERROR
) causes a kill(getpid(),1) to occur sending
* us back here.
* ----------------
*/
...
...
@@ -1352,7 +1352,7 @@ PostgresMain(int argc, char *argv[])
if
(
sigsetjmp
(
Warn_restart
,
1
)
!=
0
)
{
InError
OrAbort
=
1
;
InError
=
1
;
time
(
&
tim
);
...
...
@@ -1363,7 +1363,7 @@ PostgresMain(int argc, char *argv[])
AbortCurrentTransaction
();
}
InError
OrAbort
=
0
;
InError
=
0
;
/* ----------------
* POSTGRES main processing loop begins here
...
...
@@ -1372,7 +1372,7 @@ PostgresMain(int argc, char *argv[])
if
(
IsUnderPostmaster
==
false
)
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.5
8 $ $Date: 1998/01/05 03:33:46
$"
);
puts
(
"$Revision: 1.5
9 $ $Date: 1998/01/07 21:06:00
$"
);
}
/* ----------------
...
...
@@ -1565,7 +1565,7 @@ PostgresMain(int argc, char *argv[])
break
;
default:
elog
(
ABORT
,
"unknown frontend message was recieved"
);
elog
(
ERROR
,
"unknown frontend message was recieved"
);
}
/* ----------------
...
...
src/backend/tcop/pquery.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.1
2 1998/01/05 03:33:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.1
3 1998/01/07 21:06:05
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -166,7 +166,7 @@ ProcessPortal(char *portalName,
*/
if
(
PortalNameIsSpecial
(
portalName
))
elog
(
ABORT
,
elog
(
ERROR
,
"The portal name %s is reserved for internal use"
,
portalName
);
...
...
src/backend/utils/cache/catcache.c
View file @
679d39b9
...
...
@@ -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
);
}
...
...
src/backend/utils/cache/fcache.c
View file @
679d39b9
...
...
@@ -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!"
);
}
}
src/backend/utils/cache/lsyscache.c
View file @
679d39b9
...
...
@@ -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
;
}
}
...
...
src/backend/utils/cache/relcache.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.3
1 1998/01/05 03:34:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.3
2 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
);
...
...
src/backend/utils/cache/syscache.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.1
1 1998/01/05 03:34:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.1
2 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
);
...
...
src/backend/utils/error/elog.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.2
3 1998/01/05 04:10:07
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.2
4 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
InError
OrAbort
;
extern
int
InError
;
ProcReleaseSpins
(
NULL
);
/* get rid of spinlocks we hold */
if
(
!
InError
OrAbort
)
if
(
!
InError
)
{
kill
(
getpid
(),
1
);
/* abort to traffic cop */
pause
();
...
...
src/backend/utils/fmgr/dfmgr.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.1
5 1998/01/05 03:34:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.1
6 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
...
...
src/backend/utils/fmgr/fmgr.c
View file @
679d39b9
...
...
@@ -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
)
...
...
src/backend/utils/misc/database.c
View file @
679d39b9
...
...
@@ -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.
...
...
src/backend/utils/sort/psort.c
View file @
679d39b9
...
...
@@ -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
)
...
...
src/include/utils/elog.h
View file @
679d39b9
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: elog.h,v 1.
6 1998/01/05 03:35:05
momjian Exp $
* $Id: elog.h,v 1.
7 1998/01/07 21:06:50
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -14,11 +14,10 @@
#define ELOG_H
#define NOTICE 0
/* random info - no special action */
#define ERROR -2
/* user error - return to known state */
#define ABORT -1
/* system error - return to known state */
#define ERROR -1
/* user error - return to known state */
#define FATAL 1
/* Fatal error - abort process */
#define DEBUG -
3
/* debug message */
#define NOIND -
4
/* debug message, don't indent as far */
#define DEBUG -
2
/* debug message */
#define NOIND -
3
/* debug message, don't indent as far */
#ifdef NOT_USED
#define PTIME 0x100
/* prepend time to message */
...
...
src/tutorial/C-code/beard.c
View file @
679d39b9
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.
4 1998/01/05 03:35:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.
5 1998/01/07 21:07:03
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -34,10 +34,10 @@ beard(Oid picture)
int
cc
;
if
((
pic_fd
=
lo_open
(
picture
,
INV_READ
))
==
-
1
)
elog
(
ABORT
,
"Cannot access picture large object"
);
elog
(
ERROR
,
"Cannot access picture large object"
);
if
(
lo_read
(
pic_fd
,
(
char
*
)
&
ihdr
,
sizeof
(
ihdr
))
!=
sizeof
(
ihdr
))
elog
(
ABORT
,
"Picture large object corrupted"
);
elog
(
ERROR
,
"Picture large object corrupted"
);
beardOffset
=
(
ihdr
.
size
/
3
)
*
2
;
...
...
@@ -45,16 +45,16 @@ beard(Oid picture)
* new large object
*/
if
((
beard
=
lo_creat
(
INV_MD
))
==
0
)
/* ?? is this right? */
elog
(
ABORT
,
"Cannot create new large object"
);
elog
(
ERROR
,
"Cannot create new large object"
);
if
((
beard_fd
=
lo_open
(
beard
,
INV_WRITE
))
==
-
1
)
elog
(
ABORT
,
"Cannot access beard large object"
);
elog
(
ERROR
,
"Cannot access beard large object"
);
lo_lseek
(
pic_fd
,
beardOffset
,
SET_CUR
);
while
((
cc
=
lo_read
(
pic_fd
,
buf
,
BUFSIZE
))
>
0
)
{
if
(
lo_write
(
beard_fd
,
buf
,
cc
)
!=
cc
)
elog
(
ABORT
,
"error while writing large object"
);
elog
(
ERROR
,
"error while writing large object"
);
}
lo_close
(
pic_fd
);
...
...
src/tutorial/C-code/complex.c
View file @
679d39b9
...
...
@@ -45,7 +45,7 @@ complex_in(char *str)
if
(
sscanf
(
str
,
" ( %lf , %lf )"
,
&
x
,
&
y
)
!=
2
)
{
elog
(
ABORT
,
"complex_in: error in parsing
\"
%s
\"
"
,
str
);
elog
(
ERROR
,
"complex_in: error in parsing
\"
%s
\"
"
,
str
);
return
NULL
;
}
result
=
(
Complex
*
)
palloc
(
sizeof
(
Complex
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment