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
c72839d5
Commit
c72839d5
authored
Jul 22, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error message editing in backend/bootstrap, /lib, /nodes, /port.
parent
56f87688
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
121 additions
and
113 deletions
+121
-113
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+5
-5
src/backend/bootstrap/bootscanner.l
src/backend/bootstrap/bootscanner.l
+3
-3
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+22
-21
src/backend/lib/dllist.c
src/backend/lib/dllist.c
+9
-5
src/backend/nodes/bitmapset.c
src/backend/nodes/bitmapset.c
+8
-8
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+6
-5
src/backend/nodes/equalfuncs.c
src/backend/nodes/equalfuncs.c
+7
-6
src/backend/nodes/list.c
src/backend/nodes/list.c
+3
-3
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+9
-6
src/backend/nodes/print.c
src/backend/nodes/print.c
+5
-3
src/backend/nodes/read.c
src/backend/nodes/read.c
+3
-3
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+11
-10
src/backend/port/beos/sem.c
src/backend/port/beos/sem.c
+3
-5
src/backend/port/beos/support.c
src/backend/port/beos/support.c
+5
-5
src/backend/port/dynloader/bsdi.c
src/backend/port/dynloader/bsdi.c
+4
-5
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/linux.c
+4
-5
src/backend/port/dynloader/ultrix4.c
src/backend/port/dynloader/ultrix4.c
+2
-3
src/backend/port/ipc_test.c
src/backend/port/ipc_test.c
+2
-2
src/backend/port/posix_sema.c
src/backend/port/posix_sema.c
+3
-3
src/backend/port/sysv_sema.c
src/backend/port/sysv_sema.c
+4
-4
src/backend/port/sysv_shmem.c
src/backend/port/sysv_shmem.c
+3
-3
No files found.
src/backend/bootstrap/bootparse.y
View file @
c72839d5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.5
8 2003/05/28 16:03:55
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.5
9 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -155,7 +155,7 @@ Boot_CreateStmt:
{
do_start();
numattr = 0;
elog(DEBUG4, "creating%s%s relation %s
...
",
elog(DEBUG4, "creating%s%s relation %s",
$2 ? " bootstrap" : "",
$3 ? " shared" : "",
LexIDStr($5));
...
...
@@ -210,9 +210,9 @@ Boot_InsertStmt:
{
do_start();
if ($2)
elog(DEBUG4, "inserting row with oid %u
...
", $2);
elog(DEBUG4, "inserting row with oid %u", $2);
else
elog(DEBUG4, "inserting row
...
");
elog(DEBUG4, "inserting row");
num_columns_read = 0;
}
LPAREN boot_tuplelist RPAREN
...
...
@@ -302,7 +302,7 @@ boot_typelist:
boot_type_thing:
boot_ident EQUALS boot_ident
{
if(++numattr > MAXATTR)
if
(++numattr > MAXATTR)
elog(FATAL, "too many columns");
DefineAttr(LexIDStr($1),LexIDStr($3),numattr-1);
}
...
...
src/backend/bootstrap/bootscanner.l
View file @
c72839d5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.2
8 2003/05/29 22:30:01
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.2
9 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -129,7 +129,7 @@ insert { return(INSERT_TUPLE); }
}
. {
elog(ERROR, "syntax error at line %d: unexpected character
%s
", yyline, yytext);
elog(ERROR, "syntax error at line %d: unexpected character
\"%s\"
", yyline, yytext);
}
...
...
@@ -139,5 +139,5 @@ insert { return(INSERT_TUPLE); }
void
yyerror(const char *str)
{
elog(ERROR, "syntax error at line %d: unexpected token
%s
", yyline, str);
elog(ERROR, "syntax error at line %d: unexpected token
\"%s\"
", yyline, str);
}
src/backend/bootstrap/bootstrap.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.16
1 2003/07/15 00:11:13
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.16
2 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -314,9 +314,15 @@ BootstrapMain(int argc, char *argv[])
if
(
!
value
)
{
if
(
flag
==
'-'
)
elog
(
ERROR
,
"--%s requires argument"
,
optarg
);
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"--%s requires a value"
,
optarg
)));
else
elog
(
ERROR
,
"-c %s requires argument"
,
optarg
);
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"-c %s requires a value"
,
optarg
)));
}
SetConfigOption
(
name
,
value
,
PGC_POSTMASTER
,
PGC_S_ARGV
);
...
...
@@ -455,7 +461,7 @@ BootstrapMain(int argc, char *argv[])
proc_exit
(
0
);
/* done */
default:
elog
(
PANIC
,
"
Unsupported XLOG op
%d"
,
xlogop
);
elog
(
PANIC
,
"
unrecognized XLOG op:
%d"
,
xlogop
);
proc_exit
(
0
);
}
...
...
@@ -566,7 +572,8 @@ boot_openrel(char *relname)
if
(
boot_reldesc
!=
NULL
)
closerel
(
NULL
);
elog
(
DEBUG4
,
"open relation %s, attrsize %d"
,
relname
?
relname
:
"(null)"
,
elog
(
DEBUG4
,
"open relation %s, attrsize %d"
,
relname
?
relname
:
"(null)"
,
(
int
)
ATTRIBUTE_TUPLE_SIZE
);
boot_reldesc
=
heap_openr
(
relname
,
NoLock
);
...
...
@@ -601,11 +608,11 @@ closerel(char *name)
if
(
boot_reldesc
)
{
if
(
strcmp
(
RelationGetRelationName
(
boot_reldesc
),
name
)
!=
0
)
elog
(
ERROR
,
"close
rel: close of '%s' when '%s'
was expected"
,
elog
(
ERROR
,
"close
of %s when %s
was expected"
,
name
,
relname
?
relname
:
"(null)"
);
}
else
elog
(
ERROR
,
"close
rel: close of '%s'
before any relation was opened"
,
elog
(
ERROR
,
"close
of %s
before any relation was opened"
,
name
);
}
...
...
@@ -637,7 +644,7 @@ DefineAttr(char *name, char *type, int attnum)
if
(
boot_reldesc
!=
NULL
)
{
elog
(
LOG
,
"warning: no open relations allowed with 'create'
command"
);
elog
(
WARNING
,
"no open relations allowed with CREATE
command"
);
closerel
(
relname
);
}
...
...
@@ -770,7 +777,7 @@ InsertOneValue(char *value, int i)
AssertArg
(
i
>=
0
||
i
<
MAXATTR
);
elog
(
DEBUG4
,
"inserting column %d value
'%s'
"
,
i
,
value
);
elog
(
DEBUG4
,
"inserting column %d value
\"
%s
\"
"
,
i
,
value
);
if
(
Typ
!=
(
struct
typmap
**
)
NULL
)
{
...
...
@@ -783,7 +790,7 @@ InsertOneValue(char *value, int i)
ap
=
*
app
;
if
(
ap
==
NULL
)
{
elog
(
FATAL
,
"
unable to
find atttypid %u in Typ list"
,
elog
(
FATAL
,
"
could not
find atttypid %u in Typ list"
,
boot_reldesc
->
rd_att
->
attrs
[
i
]
->
atttypid
);
}
values
[
i
]
=
OidFunctionCall3
(
ap
->
am_typ
.
typinput
,
...
...
@@ -875,7 +882,7 @@ cleanup(void)
beenhere
=
1
;
else
{
elog
(
FATAL
,
"
Memory manager fault:
cleanup called twice"
);
elog
(
FATAL
,
"cleanup called twice"
);
proc_exit
(
1
);
}
if
(
boot_reldesc
!=
NULL
)
...
...
@@ -946,7 +953,7 @@ gettype(char *type)
heap_close
(
rel
,
NoLock
);
return
gettype
(
type
);
}
elog
(
ERROR
,
"
Error: unknown type '%s'.
\n
"
,
type
);
elog
(
ERROR
,
"
unrecognized type
\"
%s
\"
"
,
type
);
err_out
();
/* not reached, here to make compiler happy */
return
0
;
...
...
@@ -962,7 +969,7 @@ AllocateAttribute(void)
Form_pg_attribute
attribute
=
(
Form_pg_attribute
)
malloc
(
ATTRIBUTE_TUPLE_SIZE
);
if
(
!
PointerIsValid
(
attribute
))
elog
(
FATAL
,
"
AllocateAttribute: malloc failed
"
);
elog
(
FATAL
,
"
out of memory
"
);
MemSet
(
attribute
,
0
,
ATTRIBUTE_TUPLE_SIZE
);
return
attribute
;
...
...
@@ -1109,14 +1116,8 @@ AddStr(char *str, int strlength, int mderef)
int
hashresult
;
int
len
;
if
(
++
strtable_end
==
STRTABLESIZE
)
{
/* Error, string table overflow, so we Punt */
elog
(
FATAL
,
"There are too many string constants and identifiers for the compiler to handle."
);
}
if
(
++
strtable_end
>=
STRTABLESIZE
)
elog
(
FATAL
,
"bootstrap string table overflow"
);
/*
* Some of the utilites (eg, define type, create relation) assume that
...
...
src/backend/lib/dllist.c
View file @
c72839d5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.2
5 2002/06/20 20:29:28 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.2
6 2003/07/22 23:30:37 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -35,10 +35,12 @@ DLNewList(void)
if
(
l
==
NULL
)
{
#ifdef FRONTEND
fprintf
(
stderr
,
"
M
emory exhausted in DLNewList
\n
"
);
fprintf
(
stderr
,
"
m
emory exhausted in DLNewList
\n
"
);
exit
(
1
);
#else
elog
(
ERROR
,
"Memory exhausted in DLNewList"
);
ereport
(
ERROR
,
(
errcode
(
ERRCODE_OUT_OF_MEMORY
),
errmsg
(
"out of memory"
)));
#endif
}
l
->
dll_head
=
0
;
...
...
@@ -78,10 +80,12 @@ DLNewElem(void *val)
if
(
e
==
NULL
)
{
#ifdef FRONTEND
fprintf
(
stderr
,
"
M
emory exhausted in DLNewElem
\n
"
);
fprintf
(
stderr
,
"
m
emory exhausted in DLNewElem
\n
"
);
exit
(
1
);
#else
elog
(
ERROR
,
"Memory exhausted in DLNewElem"
);
ereport
(
ERROR
,
(
errcode
(
ERRCODE_OUT_OF_MEMORY
),
errmsg
(
"out of memory"
)));
#endif
}
e
->
dle_next
=
0
;
...
...
src/backend/nodes/bitmapset.c
View file @
c72839d5
...
...
@@ -14,7 +14,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/bitmapset.c,v 1.
2 2003/06/29 23:05:04
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/bitmapset.c,v 1.
3 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -184,7 +184,7 @@ bms_make_singleton(int x)
bitnum
;
if
(
x
<
0
)
elog
(
ERROR
,
"
bms_make_singleton: negative
set member not allowed"
);
elog
(
ERROR
,
"
negative bitmap
set member not allowed"
);
wordnum
=
WORDNUM
(
x
);
bitnum
=
BITNUM
(
x
);
result
=
(
Bitmapset
*
)
palloc0
(
BITMAPSET_SIZE
(
wordnum
+
1
));
...
...
@@ -354,7 +354,7 @@ bms_is_member(int x, const Bitmapset *a)
/* XXX better to just return false for x<0 ? */
if
(
x
<
0
)
elog
(
ERROR
,
"
bms_is_member: negative
set member not allowed"
);
elog
(
ERROR
,
"
negative bitmap
set member not allowed"
);
if
(
a
==
NULL
)
return
false
;
wordnum
=
WORDNUM
(
x
);
...
...
@@ -431,7 +431,7 @@ bms_singleton_member(const Bitmapset *a)
int
wordnum
;
if
(
a
==
NULL
)
elog
(
ERROR
,
"b
ms_singleton_member:
set is empty"
);
elog
(
ERROR
,
"b
itmap
set is empty"
);
nwords
=
a
->
nwords
;
for
(
wordnum
=
0
;
wordnum
<
nwords
;
wordnum
++
)
{
...
...
@@ -440,7 +440,7 @@ bms_singleton_member(const Bitmapset *a)
if
(
w
!=
0
)
{
if
(
result
>=
0
||
HAS_MULTIPLE_ONES
(
w
))
elog
(
ERROR
,
"b
ms_singleton_member:
set has multiple members"
);
elog
(
ERROR
,
"b
itmap
set has multiple members"
);
result
=
wordnum
*
BITS_PER_BITMAPWORD
;
while
((
w
&
255
)
==
0
)
{
...
...
@@ -451,7 +451,7 @@ bms_singleton_member(const Bitmapset *a)
}
}
if
(
result
<
0
)
elog
(
ERROR
,
"b
ms_singleton_member:
set is empty"
);
elog
(
ERROR
,
"b
itmap
set is empty"
);
return
result
;
}
...
...
@@ -558,7 +558,7 @@ bms_add_member(Bitmapset *a, int x)
bitnum
;
if
(
x
<
0
)
elog
(
ERROR
,
"
bms_add_member: negative
set member not allowed"
);
elog
(
ERROR
,
"
negative bitmap
set member not allowed"
);
if
(
a
==
NULL
)
return
bms_make_singleton
(
x
);
wordnum
=
WORDNUM
(
x
);
...
...
@@ -598,7 +598,7 @@ bms_del_member(Bitmapset *a, int x)
bitnum
;
if
(
x
<
0
)
elog
(
ERROR
,
"
bms_del_member: negative
set member not allowed"
);
elog
(
ERROR
,
"
negative bitmap
set member not allowed"
);
if
(
a
==
NULL
)
return
NULL
;
wordnum
=
WORDNUM
(
x
);
...
...
src/backend/nodes/copyfuncs.c
View file @
c72839d5
...
...
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.2
59 2003/07/03 16:32:20
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.2
60 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1328,7 +1328,8 @@ _copyAConst(A_Const *from)
/* nothing to do */
break
;
default:
elog
(
ERROR
,
"_copyAConst: unknown node type %d"
,
from
->
val
.
type
);
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
from
->
val
.
type
);
break
;
}
...
...
@@ -2443,7 +2444,8 @@ _copyValue(Value *from)
/* nothing to do */
break
;
default:
elog
(
ERROR
,
"_copyValue: unknown node type %d"
,
from
->
type
);
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
from
->
type
);
break
;
}
return
newnode
;
...
...
@@ -2966,8 +2968,7 @@ copyObject(void *from)
break
;
default:
elog
(
ERROR
,
"copyObject: don't know how to copy node type %d"
,
nodeTag
(
from
));
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
nodeTag
(
from
));
retval
=
from
;
/* keep compiler quiet */
break
;
}
...
...
src/backend/nodes/equalfuncs.c
View file @
c72839d5
...
...
@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.20
2 2003/07/03 16:32:32
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.20
3 2003/07/22 23:30:37
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -189,7 +189,7 @@ _equalParam(Param *a, Param *b)
COMPARE_SCALAR_FIELD
(
paramid
);
break
;
default:
elog
(
ERROR
,
"
_equalParam: Invali
d paramkind value: %d"
,
elog
(
ERROR
,
"
unrecognize
d paramkind value: %d"
,
a
->
paramkind
);
}
...
...
@@ -1616,7 +1616,7 @@ _equalValue(Value *a, Value *b)
/* nothing to do */
break
;
default:
elog
(
ERROR
,
"
_equalValue: unknown node type %d"
,
a
->
type
);
elog
(
ERROR
,
"
unrecognized node type: %d"
,
(
int
)
a
->
type
);
break
;
}
...
...
@@ -1630,7 +1630,7 @@ _equalValue(Value *a, Value *b)
bool
equal
(
void
*
a
,
void
*
b
)
{
bool
retval
=
false
;
bool
retval
;
if
(
a
==
b
)
return
true
;
...
...
@@ -2081,8 +2081,9 @@ equal(void *a, void *b)
break
;
default:
elog
(
WARNING
,
"equal: don't know whether nodes of type %d are equal"
,
nodeTag
(
a
));
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
nodeTag
(
a
));
retval
=
false
;
/* keep compiler quiet */
break
;
}
...
...
src/backend/nodes/list.c
View file @
c72839d5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.5
0 2003/06/15 22:51:45
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.5
1 2003/07/22 23:30:37
tgl Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
...
...
@@ -186,7 +186,7 @@ nconc(List *l1, List *l2)
if
(
l2
==
NIL
)
return
l1
;
if
(
l1
==
l2
)
elog
(
ERROR
,
"can
'
t nconc a list to itself"
);
elog
(
ERROR
,
"can
no
t nconc a list to itself"
);
for
(
temp
=
l1
;
lnext
(
temp
)
!=
NIL
;
temp
=
lnext
(
temp
))
;
...
...
@@ -352,7 +352,7 @@ void *
llast
(
List
*
l
)
{
if
(
l
==
NIL
)
elog
(
ERROR
,
"
llast: empty list
"
);
elog
(
ERROR
,
"
empty list does not have a last item
"
);
while
(
lnext
(
l
)
!=
NIL
)
l
=
lnext
(
l
);
return
lfirst
(
l
);
...
...
src/backend/nodes/outfuncs.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.21
2 2003/07/03 16:32:38
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.21
3 2003/07/22 23:30:37
tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
...
...
@@ -1322,7 +1322,7 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
WRITE_NODE_FIELD
(
joinaliasvars
);
break
;
default:
elog
(
ERROR
,
"
bogus rte kind
%d"
,
(
int
)
node
->
rtekind
);
elog
(
ERROR
,
"
unrecognized rte kind:
%d"
,
(
int
)
node
->
rtekind
);
break
;
}
...
...
@@ -1410,8 +1410,7 @@ _outValue(StringInfo str, Value *value)
appendStringInfo
(
str
,
"%s"
,
value
->
val
.
str
);
break
;
default:
elog
(
WARNING
,
"_outValue: don't know how to print type %d"
,
value
->
type
);
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
value
->
type
);
break
;
}
}
...
...
@@ -1821,8 +1820,12 @@ _outNode(StringInfo str, void *obj)
break
;
default:
elog
(
WARNING
,
"_outNode: don't know how to print type %d"
,
nodeTag
(
obj
));
/*
* This should be an ERROR, but it's too useful to be able
* to dump structures that _outNode only understands part of.
*/
elog
(
WARNING
,
"could not dump unrecognized node type: %d"
,
(
int
)
nodeTag
(
obj
));
break
;
}
appendStringInfoChar
(
str
,
'}'
);
...
...
src/backend/nodes/print.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.6
1 2003/05/06 00:20:32
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.6
2 2003/07/22 23:30:37
tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -82,7 +82,9 @@ elog_node_display(int lev, const char *title, void *obj, bool pretty)
else
f
=
format_node_dump
(
s
);
pfree
(
s
);
elog
(
lev
,
"%s:
\n
%s"
,
title
,
f
);
ereport
(
lev
,
(
errmsg_internal
(
"%s:"
,
title
),
errdetail
(
"%s"
,
f
)));
pfree
(
f
);
}
...
...
@@ -350,7 +352,7 @@ print_expr(Node *expr, List *rtable)
ObjectIdGetDatum
(
c
->
consttype
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
typeTup
))
elog
(
ERROR
,
"
Cache lookup for type %u failed
"
,
c
->
consttype
);
elog
(
ERROR
,
"
cache lookup failed for type %u
"
,
c
->
consttype
);
typoutput
=
((
Form_pg_type
)
GETSTRUCT
(
typeTup
))
->
typoutput
;
typelem
=
((
Form_pg_type
)
GETSTRUCT
(
typeTup
))
->
typelem
;
ReleaseSysCache
(
typeTup
);
...
...
src/backend/nodes/read.c
View file @
c72839d5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.3
3 2002/11/25 18:12:10
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.3
4 2003/07/22 23:30:38
tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -293,7 +293,7 @@ nodeRead(bool read_car_only)
this_value
=
parseNodeString
();
token
=
pg_strtok
(
&
tok_len
);
if
(
token
==
NULL
||
token
[
0
]
!=
'}'
)
elog
(
ERROR
,
"
nodeRead: did not find '}' at end of
node"
);
elog
(
ERROR
,
"
did not find '}' at end of input
node"
);
if
(
!
read_car_only
)
make_dotted_pair_cell
=
true
;
else
...
...
@@ -373,7 +373,7 @@ nodeRead(bool read_car_only)
break
;
}
default:
elog
(
ERROR
,
"
nodeRead: Bad type %d"
,
type
);
elog
(
ERROR
,
"
unrecognized node type: %d"
,
(
int
)
type
);
this_value
=
NULL
;
/* keep compiler happy */
break
;
}
...
...
src/backend/nodes/readfuncs.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.15
8 2003/07/03 16:32:39
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.15
9 2003/07/22 23:30:38
tgl Exp $
*
* NOTES
* Path and Plan nodes do not have any readfuncs support, because we
...
...
@@ -146,7 +146,7 @@ toIntList(List *list)
Value
*
v
=
(
Value
*
)
lfirst
(
l
);
if
(
!
IsA
(
v
,
Integer
))
elog
(
ERROR
,
"
toIntList: unexpected datatype"
);
elog
(
ERROR
,
"
unexpected node type: %d"
,
(
int
)
nodeTag
(
v
)
);
lfirsti
(
l
)
=
intVal
(
v
);
pfree
(
v
);
}
...
...
@@ -180,7 +180,7 @@ toOidList(List *list)
pfree
(
v
);
}
else
elog
(
ERROR
,
"
toOidList: unexpected datatype"
);
elog
(
ERROR
,
"
unexpected node type: %d"
,
(
int
)
nodeTag
(
v
)
);
}
return
list
;
}
...
...
@@ -554,7 +554,7 @@ _readBoolExpr(void)
else
if
(
strncmp
(
token
,
"not"
,
3
)
==
0
)
local_node
->
boolop
=
NOT_EXPR
;
else
elog
(
ERROR
,
"
_readBoolExpr: unknown
boolop
\"
%.*s
\"
"
,
length
,
token
);
elog
(
ERROR
,
"
unrecognized
boolop
\"
%.*s
\"
"
,
length
,
token
);
READ_NODE_FIELD
(
args
);
...
...
@@ -928,7 +928,8 @@ _readRangeTblEntry(void)
READ_NODE_FIELD
(
joinaliasvars
);
break
;
default:
elog
(
ERROR
,
"bogus rte kind %d"
,
(
int
)
local_node
->
rtekind
);
elog
(
ERROR
,
"unrecognized RTE kind: %d"
,
(
int
)
local_node
->
rtekind
);
break
;
}
...
...
@@ -1078,14 +1079,14 @@ readDatum(bool typbyval)
token
=
pg_strtok
(
&
tokenLength
);
/* read the '[' */
if
(
token
==
NULL
||
token
[
0
]
!=
'['
)
elog
(
ERROR
,
"
readDatum: expected '%s', got '%s'
; length = %lu"
,
"["
,
token
?
(
const
char
*
)
token
:
"[NULL]"
,
elog
(
ERROR
,
"
expected
\"
[
\"
to start datum, but got
\"
%s
\"
; length = %lu"
,
token
?
(
const
char
*
)
token
:
"[NULL]"
,
(
unsigned
long
)
length
);
if
(
typbyval
)
{
if
(
length
>
(
Size
)
sizeof
(
Datum
))
elog
(
ERROR
,
"
readDatum: byval &
length = %lu"
,
elog
(
ERROR
,
"
byval datum but
length = %lu"
,
(
unsigned
long
)
length
);
res
=
(
Datum
)
0
;
s
=
(
char
*
)
(
&
res
);
...
...
@@ -1110,8 +1111,8 @@ readDatum(bool typbyval)
token
=
pg_strtok
(
&
tokenLength
);
/* read the ']' */
if
(
token
==
NULL
||
token
[
0
]
!=
']'
)
elog
(
ERROR
,
"
readDatum: expected '%s', got '%s'
; length = %lu"
,
"]"
,
token
?
(
const
char
*
)
token
:
"[NULL]"
,
elog
(
ERROR
,
"
expected
\"
]
\"
to end datum, but got
\"
%s
\"
; length = %lu"
,
token
?
(
const
char
*
)
token
:
"[NULL]"
,
(
unsigned
long
)
length
);
return
res
;
...
...
src/backend/port/beos/sem.c
View file @
c72839d5
...
...
@@ -7,13 +7,11 @@
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <errno.h>
#include <unistd.h>
#include <OS.h>
#include "utils/elog.h"
/*#define TDBG*/
#ifdef TDBG
...
...
@@ -155,7 +153,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
{
/* TO BE IMPLEMENTED */
TRACEDBG
(
"--semctl getncnt"
);
elog
(
ERROR
,
"
beos : semctl error
: GETNCNT not implemented"
);
elog
(
ERROR
,
"
semctl error
: GETNCNT not implemented"
);
return
0
;
}
...
...
@@ -170,7 +168,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
return
cnt
;
}
elog
(
ERROR
,
"
beos : semctl error
: unknown flag"
);
elog
(
ERROR
,
"
semctl error
: unknown flag"
);
TRACEDBG
(
"<-semctl unknown flag"
);
return
0
;
...
...
src/backend/port/beos/support.c
View file @
c72839d5
...
...
@@ -42,7 +42,7 @@ beos_dl_open(char *filename)
if
((
beos_dl_port_in
<=
0
)
||
(
beos_dl_port_out
<=
0
))
{
elog
(
WARNING
,
"
Error loading BeOS support server : can'
t create communication ports"
);
elog
(
WARNING
,
"
error loading BeOS support server: could no
t create communication ports"
);
return
B_ERROR
;
}
else
...
...
@@ -68,7 +68,7 @@ beos_dl_open(char *filename)
/* Checking integrity */
if
(
im
<
0
)
{
elog
(
WARNING
,
"
Can't load this add-on
"
);
elog
(
WARNING
,
"
could not load this add-on
"
);
return
B_ERROR
;
}
else
...
...
@@ -92,7 +92,7 @@ beos_dl_open(char *filename)
/* Remap */
resu
=
clone_area
(
datas
,
&
add
,
B_EXACT_ADDRESS
,
B_READ_AREA
|
B_WRITE_AREA
,
area
);
if
(
resu
<
0
)
elog
(
WARNING
,
"
Can't load this add-on
: map text error"
);
elog
(
WARNING
,
"
could not load this add-on
: map text error"
);
}
/* read text segment id and address */
...
...
@@ -108,7 +108,7 @@ beos_dl_open(char *filename)
/* Remap */
resu
=
clone_area
(
datas
,
&
add
,
B_EXACT_ADDRESS
,
B_READ_AREA
|
B_WRITE_AREA
,
area
);
if
(
resu
<
0
)
elog
(
WARNING
,
"
Can't load this add-on
: map data error"
);
elog
(
WARNING
,
"
could not load this add-on
: map data error"
);
}
return
im
;
...
...
@@ -126,7 +126,7 @@ beos_dl_sym(image_id im, char *symname, void **fptr)
read_port
(
beos_dl_port_out
,
(
int32
*
)
(
fptr
),
NULL
,
0
);
if
(
fptr
==
NULL
)
elog
(
WARNING
,
"loading symbol
'%s' failed
"
,
symname
);
elog
(
WARNING
,
"loading symbol
\"
%s
\"
failed
"
,
symname
);
}
status_t
...
...
src/backend/port/dynloader/bsdi.c
View file @
c72839d5
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/bsdi.c,v 1.2
0 2002/06/20 20:29:33 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/bsdi.c,v 1.2
1 2003/07/22 23:30:39 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -56,14 +56,14 @@ pg_dlopen(char *filename)
{
if
(
dld_link
(
"/usr/lib/libc.a"
))
{
elog
(
WARNING
,
"
dld: Cannot link C library!
"
);
elog
(
WARNING
,
"
could not link C library
"
);
return
NULL
;
}
if
(
dld_undefined_sym_count
>
0
)
{
if
(
dld_link
(
"/usr/lib/libm.a"
))
{
elog
(
WARNING
,
"
dld: Cannot link math library!
"
);
elog
(
WARNING
,
"
could not link math library
"
);
return
NULL
;
}
if
(
dld_undefined_sym_count
>
0
)
...
...
@@ -72,10 +72,9 @@ pg_dlopen(char *filename)
char
**
list
=
dld_list_undefined_sym
();
/* list the undefined symbols, if any */
elog
(
WARNING
,
"dld: Undefined:"
);
do
{
elog
(
WARNING
,
"
%s
"
,
*
list
);
elog
(
WARNING
,
"
\"
%s
\"
is undefined
"
,
*
list
);
list
++
;
count
--
;
}
while
(
count
>
0
);
...
...
src/backend/port/dynloader/linux.c
View file @
c72839d5
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.2
3 2002/10/15 16:04:17
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.2
4 2003/07/22 23:30:39
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -68,14 +68,14 @@ pg_dlopen(char *filename)
{
if
(
dld_link
(
"/usr/lib/libc.a"
))
{
elog
(
WARNING
,
"
dld: Cannot link C library!
"
);
elog
(
WARNING
,
"
could not link C library
"
);
return
NULL
;
}
if
(
dld_undefined_sym_count
>
0
)
{
if
(
dld_link
(
"/usr/lib/libm.a"
))
{
elog
(
WARNING
,
"
dld: Cannot link math library!
"
);
elog
(
WARNING
,
"
could not link math library
"
);
return
NULL
;
}
if
(
dld_undefined_sym_count
>
0
)
...
...
@@ -84,10 +84,9 @@ pg_dlopen(char *filename)
char
**
list
=
dld_list_undefined_sym
();
/* list the undefined symbols, if any */
elog
(
WARNING
,
"dld: Undefined:"
);
do
{
elog
(
WARNING
,
"
%s
"
,
*
list
);
elog
(
WARNING
,
"
\"
%s
\"
is undefined
"
,
*
list
);
list
++
;
count
--
;
}
while
(
count
>
0
);
...
...
src/backend/port/dynloader/ultrix4.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.1
6 2002/11/08 20:23:56 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.1
7 2003/07/22 23:30:39 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -55,10 +55,9 @@ pg_dlopen(char *filename)
/* list the undefined symbols, if any */
if
(
count
)
{
elog
(
WARNING
,
"dl: Undefined:"
);
while
(
*
list
)
{
elog
(
WARNING
,
"
%s
"
,
*
list
);
elog
(
WARNING
,
"
\"
%s
\"
is undefined
"
,
*
list
);
list
++
;
}
}
...
...
src/backend/port/ipc_test.c
View file @
c72839d5
...
...
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.
5 2002/09/04 20:31:24 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.
6 2003/07/22 23:30:39 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -90,7 +90,7 @@ void
on_shmem_exit
(
void
(
*
function
)
(),
Datum
arg
)
{
if
(
on_shmem_exit_index
>=
MAX_ON_EXITS
)
elog
(
FATAL
,
"
O
ut of on_shmem_exit slots"
);
elog
(
FATAL
,
"
o
ut of on_shmem_exit slots"
);
on_shmem_exit_list
[
on_shmem_exit_index
].
function
=
function
;
on_shmem_exit_list
[
on_shmem_exit_index
].
arg
=
arg
;
...
...
src/backend/port/posix_sema.c
View file @
c72839d5
...
...
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.
6 2002/09/04 20:31:24 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.
7 2003/07/22 23:30:39 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -165,7 +165,7 @@ PGReserveSemaphores(int maxSemas, int port)
{
mySemPointers
=
(
sem_t
**
)
malloc
(
maxSemas
*
sizeof
(
sem_t
*
));
if
(
mySemPointers
==
NULL
)
elog
(
PANIC
,
"
Out of memory in PGReserveSemaphores
"
);
elog
(
PANIC
,
"
out of memory
"
);
numSems
=
0
;
maxSems
=
maxSemas
;
nextSemKey
=
port
*
1000
;
...
...
@@ -202,7 +202,7 @@ PGSemaphoreCreate(PGSemaphore sema)
Assert
(
!
IsUnderPostmaster
);
if
(
numSems
>=
maxSems
)
elog
(
PANIC
,
"
PGSemaphoreCreate:
too many semaphores created"
);
elog
(
PANIC
,
"too many semaphores created"
);
#ifdef USE_NAMED_POSIX_SEMAPHORES
*
sema
=
newsem
=
PosixSemaphoreCreate
();
...
...
src/backend/port/sysv_sema.c
View file @
c72839d5
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.
5 2003/03/25 16:15:44 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.
6 2003/07/22 23:30:39 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -177,7 +177,7 @@ IpcSemaphoreKill(IpcSemaphoreId semId)
semId
,
strerror
(
errno
));
/*
* We used to report a failure via e
log
(WARNING), but that's pretty
* We used to report a failure via e
report
(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}
...
...
@@ -316,7 +316,7 @@ PGReserveSemaphores(int maxSemas, int port)
mySemaSets
=
(
IpcSemaphoreId
*
)
malloc
(
maxSemaSets
*
sizeof
(
IpcSemaphoreId
));
if
(
mySemaSets
==
NULL
)
elog
(
PANIC
,
"
Out of memory in PGReserveSemaphores
"
);
elog
(
PANIC
,
"
out of memory
"
);
numSemaSets
=
0
;
nextSemaKey
=
port
*
1000
;
nextSemaNumber
=
SEMAS_PER_SET
;
/* force sema set alloc on 1st
...
...
@@ -355,7 +355,7 @@ PGSemaphoreCreate(PGSemaphore sema)
{
/* Time to allocate another semaphore set */
if
(
numSemaSets
>=
maxSemaSets
)
elog
(
PANIC
,
"
PGSemaphoreCreate:
too many semaphores created"
);
elog
(
PANIC
,
"too many semaphores created"
);
mySemaSets
[
numSemaSets
]
=
IpcSemaphoreCreate
(
SEMAS_PER_SET
);
numSemaSets
++
;
nextSemaNumber
=
0
;
...
...
src/backend/port/sysv_shmem.c
View file @
c72839d5
...
...
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.1
1 2003/07/14 20:00:22
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.1
2 2003/07/22 23:30:39
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -181,7 +181,7 @@ IpcMemoryDetach(int status, Datum shmaddr)
DatumGetPointer
(
shmaddr
),
strerror
(
errno
));
/*
* We used to report a failure via e
log
(WARNING), but that's pretty
* We used to report a failure via e
report
(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}
...
...
@@ -198,7 +198,7 @@ IpcMemoryDelete(int status, Datum shmId)
DatumGetInt32
(
shmId
),
IPC_RMID
,
strerror
(
errno
));
/*
* We used to report a failure via e
log
(WARNING), but that's pretty
* We used to report a failure via e
report
(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}
...
...
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