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
1cd4c141
Commit
1cd4c141
authored
Jan 15, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed all elog related warnings, as well as a few others.
parent
7c9390ca
Changes
42
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
184 additions
and
182 deletions
+184
-182
src/backend/access/common/heaptuple.c
src/backend/access/common/heaptuple.c
+16
-16
src/backend/access/common/indextuple.c
src/backend/access/common/indextuple.c
+3
-2
src/backend/access/gist/gistscan.c
src/backend/access/gist/gistscan.c
+1
-1
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashscan.c
+2
-2
src/backend/access/heap/hio.c
src/backend/access/heap/hio.c
+2
-2
src/backend/access/index/istrat.c
src/backend/access/index/istrat.c
+5
-5
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtinsert.c
+2
-2
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtscan.c
+2
-2
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtsort.c
+2
-2
src/backend/access/rtree/rtscan.c
src/backend/access/rtree/rtscan.c
+2
-2
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+2
-2
src/backend/catalog/aclchk.c
src/backend/catalog/aclchk.c
+2
-2
src/backend/catalog/catalog.c
src/backend/catalog/catalog.c
+3
-3
src/backend/commands/sequence.c
src/backend/commands/sequence.c
+1
-1
src/backend/commands/variable.c
src/backend/commands/variable.c
+2
-2
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+3
-3
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/plancat.c
+3
-3
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+3
-3
src/backend/parser/gram.y
src/backend/parser/gram.y
+2
-2
src/backend/parser/parse_node.c
src/backend/parser/parse_node.c
+2
-2
src/backend/parser/parse_type.c
src/backend/parser/parse_type.c
+2
-2
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+12
-12
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipc.c
+2
-2
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+2
-2
src/backend/utils/adt/cash.c
src/backend/utils/adt/cash.c
+15
-15
src/backend/utils/adt/date.c
src/backend/utils/adt/date.c
+3
-3
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datetime.c
+12
-12
src/backend/utils/adt/dt.c
src/backend/utils/adt/dt.c
+18
-18
src/backend/utils/adt/float.c
src/backend/utils/adt/float.c
+9
-9
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_ops.c
+17
-17
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+3
-3
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+3
-3
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/selfuncs.c
+3
-3
src/backend/utils/adt/tid.c
src/backend/utils/adt/tid.c
+2
-2
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varchar.c
+9
-9
src/backend/utils/adt/varlena.c
src/backend/utils/adt/varlena.c
+2
-1
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+2
-2
src/backend/utils/mmgr/portalmem.c
src/backend/utils/mmgr/portalmem.c
+2
-2
src/include/port/linux.h
src/include/port/linux.h
+1
-1
src/include/postgres.h
src/include/postgres.h
+2
-1
src/include/storage/lock.h
src/include/storage/lock.h
+1
-2
src/include/utils/int8.h
src/include/utils/int8.h
+2
-2
No files found.
src/backend/access/common/heaptuple.c
View file @
1cd4c141
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.
59 1999/12/16 22:19:34 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.
60 2000/01/15 02:59:17 petere
Exp $
*
*
* NOTES
* NOTES
* The old interface functions have been converted to macros
* The old interface functions have been converted to macros
...
@@ -136,8 +136,9 @@ DataFill(char *data,
...
@@ -136,8 +136,9 @@ DataFill(char *data,
*
((
int32
*
)
value
[
i
]));
*
((
int32
*
)
value
[
i
]));
break
;
break
;
default:
default:
Assert
(
att
[
i
]
->
attlen
>=
0
);
memmove
(
data
,
DatumGetPointer
(
value
[
i
]),
memmove
(
data
,
DatumGetPointer
(
value
[
i
]),
att
[
i
]
->
attlen
);
(
size_t
)(
att
[
i
]
->
attlen
)
);
break
;
break
;
}
}
data
=
(
char
*
)
att_addlength
((
long
)
data
,
att
[
i
]
->
attlen
,
value
[
i
]);
data
=
(
char
*
)
att_addlength
((
long
)
data
,
att
[
i
]
->
attlen
,
value
[
i
]);
...
@@ -324,8 +325,8 @@ nocachegetattr(HeapTuple tuple,
...
@@ -324,8 +325,8 @@ nocachegetattr(HeapTuple tuple,
Form_pg_attribute
*
att
=
tupleDesc
->
attrs
;
Form_pg_attribute
*
att
=
tupleDesc
->
attrs
;
int
slow
=
0
;
/* do we have to walk nulls? */
int
slow
=
0
;
/* do we have to walk nulls? */
(
void
)
isnull
;
/*not used*/
#if IN_MACRO
#if
def
IN_MACRO
/* This is handled in the macro */
/* This is handled in the macro */
Assert
(
attnum
>
0
);
Assert
(
attnum
>
0
);
...
@@ -346,7 +347,7 @@ nocachegetattr(HeapTuple tuple,
...
@@ -346,7 +347,7 @@ nocachegetattr(HeapTuple tuple,
if
(
HeapTupleNoNulls
(
tuple
))
if
(
HeapTupleNoNulls
(
tuple
))
{
{
#if IN_MACRO
#if
def
IN_MACRO
/* This is handled in the macro */
/* This is handled in the macro */
if
(
att
[
attnum
]
->
attcacheoff
!=
-
1
)
if
(
att
[
attnum
]
->
attcacheoff
!=
-
1
)
{
{
...
@@ -376,7 +377,7 @@ nocachegetattr(HeapTuple tuple,
...
@@ -376,7 +377,7 @@ nocachegetattr(HeapTuple tuple,
* ----------------
* ----------------
*/
*/
#if IN_MACRO
#if
def
IN_MACRO
/* This is handled in the macro */
/* This is handled in the macro */
if
(
att_isnull
(
attnum
,
bp
))
if
(
att_isnull
(
attnum
,
bp
))
{
{
...
@@ -565,7 +566,7 @@ heap_copytuple(HeapTuple tuple)
...
@@ -565,7 +566,7 @@ heap_copytuple(HeapTuple tuple)
newTuple
->
t_datamcxt
=
CurrentMemoryContext
;
newTuple
->
t_datamcxt
=
CurrentMemoryContext
;
newTuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
newTuple
+
HEAPTUPLESIZE
);
newTuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
newTuple
+
HEAPTUPLESIZE
);
memmove
((
char
*
)
newTuple
->
t_data
,
memmove
((
char
*
)
newTuple
->
t_data
,
(
char
*
)
tuple
->
t_data
,
(
int
)
tuple
->
t_len
);
(
char
*
)
tuple
->
t_data
,
tuple
->
t_len
);
return
newTuple
;
return
newTuple
;
}
}
...
@@ -589,7 +590,7 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
...
@@ -589,7 +590,7 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
dest
->
t_datamcxt
=
CurrentMemoryContext
;
dest
->
t_datamcxt
=
CurrentMemoryContext
;
dest
->
t_data
=
(
HeapTupleHeader
)
palloc
(
src
->
t_len
);
dest
->
t_data
=
(
HeapTupleHeader
)
palloc
(
src
->
t_len
);
memmove
((
char
*
)
dest
->
t_data
,
memmove
((
char
*
)
dest
->
t_data
,
(
char
*
)
src
->
t_data
,
(
int
)
src
->
t_len
);
(
char
*
)
src
->
t_data
,
src
->
t_len
);
return
;
return
;
}
}
...
@@ -655,7 +656,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
...
@@ -655,7 +656,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
HeapTuple
tuple
;
/* return tuple */
HeapTuple
tuple
;
/* return tuple */
HeapTupleHeader
td
;
/* tuple data */
HeapTupleHeader
td
;
/* tuple data */
int
bitmaplen
;
int
bitmaplen
;
long
len
;
unsigned
long
len
;
int
hoff
;
int
hoff
;
bool
hasnull
=
false
;
bool
hasnull
=
false
;
int
i
;
int
i
;
...
@@ -687,7 +688,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
...
@@ -687,7 +688,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
tuple
->
t_datamcxt
=
CurrentMemoryContext
;
tuple
->
t_datamcxt
=
CurrentMemoryContext
;
td
=
tuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
tuple
+
HEAPTUPLESIZE
);
td
=
tuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
tuple
+
HEAPTUPLESIZE
);
MemSet
((
char
*
)
td
,
0
,
(
int
)
len
);
MemSet
((
char
*
)
td
,
0
,
len
);
tuple
->
t_len
=
len
;
tuple
->
t_len
=
len
;
ItemPointerSetInvalid
(
&
(
tuple
->
t_self
));
ItemPointerSetInvalid
(
&
(
tuple
->
t_self
));
...
@@ -803,8 +804,6 @@ heap_modifytuple(HeapTuple tuple,
...
@@ -803,8 +804,6 @@ heap_modifytuple(HeapTuple tuple,
void
void
heap_freetuple
(
HeapTuple
htup
)
heap_freetuple
(
HeapTuple
htup
)
{
{
extern
int
getpid
();
if
(
htup
->
t_data
!=
NULL
)
if
(
htup
->
t_data
!=
NULL
)
if
(
htup
->
t_datamcxt
!=
NULL
&&
(
char
*
)(
htup
->
t_data
)
!=
if
(
htup
->
t_datamcxt
!=
NULL
&&
(
char
*
)(
htup
->
t_data
)
!=
((
char
*
)
htup
+
HEAPTUPLESIZE
))
((
char
*
)
htup
+
HEAPTUPLESIZE
))
...
@@ -828,7 +827,7 @@ heap_addheader(uint32 natts, /* max domain index */
...
@@ -828,7 +827,7 @@ heap_addheader(uint32 natts, /* max domain index */
{
{
HeapTuple
tuple
;
HeapTuple
tuple
;
HeapTupleHeader
td
;
/* tuple data */
HeapTupleHeader
td
;
/* tuple data */
long
len
;
unsigned
long
len
;
int
hoff
;
int
hoff
;
AssertArg
(
natts
>
0
);
AssertArg
(
natts
>
0
);
...
@@ -841,7 +840,7 @@ heap_addheader(uint32 natts, /* max domain index */
...
@@ -841,7 +840,7 @@ heap_addheader(uint32 natts, /* max domain index */
tuple
->
t_datamcxt
=
CurrentMemoryContext
;
tuple
->
t_datamcxt
=
CurrentMemoryContext
;
td
=
tuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
tuple
+
HEAPTUPLESIZE
);
td
=
tuple
->
t_data
=
(
HeapTupleHeader
)
((
char
*
)
tuple
+
HEAPTUPLESIZE
);
MemSet
((
char
*
)
td
,
0
,
(
int
)
len
);
MemSet
((
char
*
)
td
,
0
,
len
);
tuple
->
t_len
=
len
;
tuple
->
t_len
=
len
;
ItemPointerSetInvalid
(
&
(
tuple
->
t_self
));
ItemPointerSetInvalid
(
&
(
tuple
->
t_self
));
...
@@ -850,7 +849,8 @@ heap_addheader(uint32 natts, /* max domain index */
...
@@ -850,7 +849,8 @@ heap_addheader(uint32 natts, /* max domain index */
td
->
t_infomask
=
0
;
td
->
t_infomask
=
0
;
td
->
t_infomask
|=
HEAP_XMAX_INVALID
;
td
->
t_infomask
|=
HEAP_XMAX_INVALID
;
memmove
((
char
*
)
td
+
hoff
,
structure
,
structlen
);
if
(
structlen
>
0
)
memmove
((
char
*
)
td
+
hoff
,
structure
,
(
size_t
)
structlen
);
return
tuple
;
return
tuple
;
}
}
src/backend/access/common/indextuple.c
View file @
1cd4c141
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.4
0 2000/01/11 03:33:11 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.4
1 2000/01/15 02:59:17 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -63,7 +63,7 @@ index_formtuple(TupleDesc tupleDescriptor,
...
@@ -63,7 +63,7 @@ index_formtuple(TupleDesc tupleDescriptor,
tp
=
(
char
*
)
palloc
(
size
);
tp
=
(
char
*
)
palloc
(
size
);
tuple
=
(
IndexTuple
)
tp
;
tuple
=
(
IndexTuple
)
tp
;
MemSet
(
tp
,
0
,
(
int
)
size
);
MemSet
(
tp
,
0
,
size
);
DataFill
((
char
*
)
tp
+
hoff
,
DataFill
((
char
*
)
tp
+
hoff
,
tupleDescriptor
,
tupleDescriptor
,
...
@@ -133,6 +133,7 @@ nocache_index_getattr(IndexTuple tup,
...
@@ -133,6 +133,7 @@ nocache_index_getattr(IndexTuple tup,
int
data_off
;
/* tuple data offset */
int
data_off
;
/* tuple data offset */
Form_pg_attribute
*
att
=
tupleDesc
->
attrs
;
Form_pg_attribute
*
att
=
tupleDesc
->
attrs
;
(
void
)
isnull
;
/* ----------------
/* ----------------
* sanity checks
* sanity checks
* ----------------
* ----------------
...
...
src/backend/access/gist/gistscan.c
View file @
1cd4c141
...
@@ -266,7 +266,7 @@ gistdropscan(IndexScanDesc s)
...
@@ -266,7 +266,7 @@ gistdropscan(IndexScanDesc s)
prev
=
l
;
prev
=
l
;
if
(
l
==
(
GISTScanList
)
NULL
)
if
(
l
==
(
GISTScanList
)
NULL
)
elog
(
ERROR
,
"GiST scan list corrupted -- cannot find 0x%
lx"
,
s
);
elog
(
ERROR
,
"GiST scan list corrupted -- cannot find 0x%
p"
,
(
void
*
)
s
);
if
(
prev
==
(
GISTScanList
)
NULL
)
if
(
prev
==
(
GISTScanList
)
NULL
)
GISTScans
=
l
->
gsl_next
;
GISTScans
=
l
->
gsl_next
;
...
...
src/backend/access/hash/hashscan.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.2
0 1999/07/15 23:02:55 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.2
1 2000/01/15 02:59:19 petere
Exp $
*
*
* NOTES
* NOTES
* Because we can be doing an index scan on a relation while we
* Because we can be doing an index scan on a relation while we
...
@@ -74,7 +74,7 @@ _hash_dropscan(IndexScanDesc scan)
...
@@ -74,7 +74,7 @@ _hash_dropscan(IndexScanDesc scan)
last
=
chk
;
last
=
chk
;
if
(
chk
==
(
HashScanList
)
NULL
)
if
(
chk
==
(
HashScanList
)
NULL
)
elog
(
ERROR
,
"hash scan list trashed; can't find 0x%
lx"
,
scan
);
elog
(
ERROR
,
"hash scan list trashed; can't find 0x%
p"
,
(
void
*
)
scan
);
if
(
last
==
(
HashScanList
)
NULL
)
if
(
last
==
(
HashScanList
)
NULL
)
HashScans
=
chk
->
hashsl_next
;
HashScans
=
chk
->
hashsl_next
;
...
...
src/backend/access/heap/hio.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: hio.c,v 1.2
7 1999/11/29 04:34:55 tgl
Exp $
* $Id: hio.c,v 1.2
8 2000/01/15 02:59:20 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -114,7 +114,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
...
@@ -114,7 +114,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
* this code should go away eventually.
* this code should go away eventually.
*/
*/
if
(
len
>
MaxTupleSize
)
if
(
len
>
MaxTupleSize
)
elog
(
ERROR
,
"Tuple is too big: size %d, max size %d"
,
elog
(
ERROR
,
"Tuple is too big: size %d, max size %
l
d"
,
len
,
MaxTupleSize
);
len
,
MaxTupleSize
);
/*
/*
...
...
src/backend/access/index/istrat.c
View file @
1cd4c141
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.3
8 1999/11/22 17:55:53 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.3
9 2000/01/15 02:59:21 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -502,8 +502,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
...
@@ -502,8 +502,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
{
{
if
(
IsBootstrapProcessingMode
())
if
(
IsBootstrapProcessingMode
())
heap_endscan
(
scan
);
heap_endscan
(
scan
);
elog
(
ERROR
,
"OperatorObjectIdFillScanKeyEntry: unknown operator %
l
u"
,
elog
(
ERROR
,
"OperatorObjectIdFillScanKeyEntry: unknown operator %u"
,
(
uint32
)
operatorObjectId
);
operatorObjectId
);
}
}
entry
->
sk_flags
=
0
;
entry
->
sk_flags
=
0
;
...
@@ -517,8 +517,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
...
@@ -517,8 +517,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
if
(
!
RegProcedureIsValid
(
entry
->
sk_procedure
))
if
(
!
RegProcedureIsValid
(
entry
->
sk_procedure
))
{
{
elog
(
ERROR
,
elog
(
ERROR
,
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %
l
u"
,
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %u"
,
(
uint32
)
operatorObjectId
);
operatorObjectId
);
}
}
}
}
...
...
src/backend/access/nbtree/nbtinsert.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.5
2 1999/12/26 03:48:22 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.5
3 2000/01/15 02:59:23 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -275,7 +275,7 @@ _bt_insertonpg(Relation rel,
...
@@ -275,7 +275,7 @@ _bt_insertonpg(Relation rel,
* Note that at this point, itemsz doesn't include the ItemId.
* Note that at this point, itemsz doesn't include the ItemId.
*/
*/
if
(
itemsz
>
(
PageGetPageSize
(
page
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
))
if
(
itemsz
>
(
PageGetPageSize
(
page
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
))
elog
(
ERROR
,
"btree: index item size %d exceeds maximum %d"
,
elog
(
ERROR
,
"btree: index item size %d exceeds maximum %
l
d"
,
itemsz
,
itemsz
,
(
PageGetPageSize
(
page
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
));
(
PageGetPageSize
(
page
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
));
...
...
src/backend/access/nbtree/nbtscan.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2
8 1999/08/08 20:12:51 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2
9 2000/01/15 02:59:23 petere
Exp $
*
*
*
*
* NOTES
* NOTES
...
@@ -95,7 +95,7 @@ _bt_dropscan(IndexScanDesc scan)
...
@@ -95,7 +95,7 @@ _bt_dropscan(IndexScanDesc scan)
last
=
chk
;
last
=
chk
;
if
(
chk
==
(
BTScanList
)
NULL
)
if
(
chk
==
(
BTScanList
)
NULL
)
elog
(
ERROR
,
"btree scan list trashed; can't find 0x%
lx"
,
scan
);
elog
(
ERROR
,
"btree scan list trashed; can't find 0x%
p"
,
(
void
*
)
scan
);
if
(
last
==
(
BTScanList
)
NULL
)
if
(
last
==
(
BTScanList
)
NULL
)
BTScans
=
chk
->
btsl_next
;
BTScans
=
chk
->
btsl_next
;
...
...
src/backend/access/nbtree/nbtsort.c
View file @
1cd4c141
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.4
8 2000/01/08 21:24:49 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.4
9 2000/01/15 02:59:23 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -314,7 +314,7 @@ _bt_buildadd(Relation index, BTPageState *state, BTItem bti, int flags)
...
@@ -314,7 +314,7 @@ _bt_buildadd(Relation index, BTPageState *state, BTItem bti, int flags)
* But during creation of an index, we don't go through there.
* But during creation of an index, we don't go through there.
*/
*/
if
(
btisz
>
(
PageGetPageSize
(
npage
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
))
if
(
btisz
>
(
PageGetPageSize
(
npage
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
))
elog
(
ERROR
,
"btree: index item size %d exceeds maximum %d"
,
elog
(
ERROR
,
"btree: index item size %d exceeds maximum %
l
d"
,
btisz
,
btisz
,
(
PageGetPageSize
(
npage
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
));
(
PageGetPageSize
(
npage
)
-
sizeof
(
PageHeaderData
)
-
MAXALIGN
(
sizeof
(
BTPageOpaqueData
)))
/
3
-
sizeof
(
ItemIdData
));
...
...
src/backend/access/rtree/rtscan.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.
29 1999/07/17 20:16:45 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.
30 2000/01/15 02:59:25 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -267,7 +267,7 @@ rtdropscan(IndexScanDesc s)
...
@@ -267,7 +267,7 @@ rtdropscan(IndexScanDesc s)
prev
=
l
;
prev
=
l
;
if
(
l
==
(
RTScanList
)
NULL
)
if
(
l
==
(
RTScanList
)
NULL
)
elog
(
ERROR
,
"rtree scan list corrupted -- cannot find 0x%
lx"
,
s
);
elog
(
ERROR
,
"rtree scan list corrupted -- cannot find 0x%
p"
,
(
void
*
)
s
);
if
(
prev
==
(
RTScanList
)
NULL
)
if
(
prev
==
(
RTScanList
)
NULL
)
RTScans
=
l
->
rtsl_next
;
RTScans
=
l
->
rtsl_next
;
...
...
src/backend/bootstrap/bootstrap.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.7
6 2000/01/11 04:00:30 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.7
7 2000/01/15 02:59:27 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -771,7 +771,7 @@ cleanup()
...
@@ -771,7 +771,7 @@ cleanup()
beenhere
=
1
;
beenhere
=
1
;
else
else
{
{
elog
(
FATAL
,
"Memory manager fault: cleanup called twice.
\n
"
,
stderr
);
elog
(
FATAL
,
"Memory manager fault: cleanup called twice.
\n
"
);
proc_exit
(
1
);
proc_exit
(
1
);
}
}
if
(
reldesc
!=
(
Relation
)
NULL
)
if
(
reldesc
!=
(
Relation
)
NULL
)
...
...
src/backend/catalog/aclchk.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.3
3 2000/01/13 18:26:04
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.3
4 2000/01/15 02:59:28
petere Exp $
*
*
* NOTES
* NOTES
* See acl.h.
* See acl.h.
...
@@ -264,7 +264,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
...
@@ -264,7 +264,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
*/
*/
if
(
num
<
1
)
if
(
num
<
1
)
{
{
#if
ACLDEBUG_TRACE
|| 1
#if
defined(ACLDEBUG_TRACE)
|| 1
elog
(
DEBUG
,
"aclcheck: zero-length ACL, returning 1"
);
elog
(
DEBUG
,
"aclcheck: zero-length ACL, returning 1"
);
#endif
#endif
return
ACLCHECK_OK
;
return
ACLCHECK_OK
;
...
...
src/backend/catalog/catalog.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.2
6 1999/11/22 17:55:56 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.2
7 2000/01/15 02:59:28 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -29,7 +29,7 @@ char *
...
@@ -29,7 +29,7 @@ char *
relpath
(
char
*
relname
)
relpath
(
char
*
relname
)
{
{
char
*
path
;
char
*
path
;
int
bufsize
=
0
;
size_t
bufsize
=
0
;
if
(
IsSharedSystemRelationName
(
relname
))
if
(
IsSharedSystemRelationName
(
relname
))
{
{
...
@@ -156,7 +156,7 @@ fillatt(TupleDesc tupleDesc)
...
@@ -156,7 +156,7 @@ fillatt(TupleDesc tupleDesc)
0
,
0
,
0
);
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tuple
))
if
(
!
HeapTupleIsValid
(
tuple
))
{
{
elog
(
ERROR
,
"fillatt: unknown atttypid %
l
d"
,
elog
(
ERROR
,
"fillatt: unknown atttypid %d"
,
(
*
attributeP
)
->
atttypid
);
(
*
attributeP
)
->
atttypid
);
}
}
else
else
...
...
src/backend/commands/sequence.c
View file @
1cd4c141
...
@@ -417,7 +417,7 @@ init_sequence(char *caller, char *name)
...
@@ -417,7 +417,7 @@ init_sequence(char *caller, char *name)
if
(
RelationGetRelid
(
seqrel
)
!=
elm
->
relid
)
if
(
RelationGetRelid
(
seqrel
)
!=
elm
->
relid
)
{
{
elog
(
NOTICE
,
"%s.%s: sequence was re-created"
,
elog
(
NOTICE
,
"%s.%s: sequence was re-created"
,
name
,
caller
,
name
);
name
,
caller
);
elm
->
relid
=
RelationGetRelid
(
seqrel
);
elm
->
relid
=
RelationGetRelid
(
seqrel
);
elm
->
cached
=
elm
->
last
=
elm
->
increment
=
0
;
elm
->
cached
=
elm
->
last
=
elm
->
increment
=
0
;
}
}
...
...
src/backend/commands/variable.c
View file @
1cd4c141
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO',
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
* 'SHOW var' and 'RESET var' statements.
*
*
* $Id: variable.c,v 1.2
6 1999/09/27 20:27:03 momjian
Exp $
* $Id: variable.c,v 1.2
7 2000/01/15 02:59:29 petere
Exp $
*
*
*/
*/
...
@@ -523,7 +523,7 @@ reset_timezone()
...
@@ -523,7 +523,7 @@ reset_timezone()
{
{
strcpy
(
tzbuf
,
"="
);
strcpy
(
tzbuf
,
"="
);
if
(
putenv
(
tzbuf
)
!=
0
)
if
(
putenv
(
tzbuf
)
!=
0
)
elog
(
ERROR
,
"Unable to clear TZ environment variable"
,
NULL
);
elog
(
ERROR
,
"Unable to clear TZ environment variable"
);
tzset
();
tzset
();
}
}
...
...
src/backend/optimizer/plan/createplan.c
View file @
1cd4c141
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.7
8 2000/01/09 00:26:34 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.7
9 2000/01/15 02:59:30 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -168,7 +168,7 @@ create_scan_node(Query *root, Path *best_path, List *tlist)
...
@@ -168,7 +168,7 @@ create_scan_node(Query *root, Path *best_path, List *tlist)
break
;
break
;
default:
default:
elog
(
ERROR
,
"create_scan_node: unknown node type"
,
elog
(
ERROR
,
"create_scan_node: unknown node type
: %d
"
,
best_path
->
pathtype
);
best_path
->
pathtype
);
break
;
break
;
}
}
...
@@ -234,7 +234,7 @@ create_join_node(Query *root, JoinPath *best_path, List *tlist)
...
@@ -234,7 +234,7 @@ create_join_node(Query *root, JoinPath *best_path, List *tlist)
inner_tlist
);
inner_tlist
);
break
;
break
;
default:
default:
elog
(
ERROR
,
"create_join_node: unknown node type"
,
elog
(
ERROR
,
"create_join_node: unknown node type
: %d
"
,
best_path
->
path
.
pathtype
);
best_path
->
path
.
pathtype
);
}
}
...
...
src/backend/optimizer/util/plancat.c
View file @
1cd4c141
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.4
3 2000/01/12 00:53:21 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.4
4 2000/01/15 02:59:31 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -410,7 +410,7 @@ restriction_selectivity(Oid functionObjectId,
...
@@ -410,7 +410,7 @@ restriction_selectivity(Oid functionObjectId,
elog
(
ERROR
,
"restriction_selectivity: bad pointer"
);
elog
(
ERROR
,
"restriction_selectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ERROR
,
"restriction_selectivity: bad value %
l
f"
,
*
result
);
elog
(
ERROR
,
"restriction_selectivity: bad value %f"
,
*
result
);
return
(
Selectivity
)
*
result
;
return
(
Selectivity
)
*
result
;
}
}
...
@@ -446,7 +446,7 @@ join_selectivity(Oid functionObjectId,
...
@@ -446,7 +446,7 @@ join_selectivity(Oid functionObjectId,
elog
(
ERROR
,
"join_selectivity: bad pointer"
);
elog
(
ERROR
,
"join_selectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ERROR
,
"join_selectivity: bad value %
l
f"
,
*
result
);
elog
(
ERROR
,
"join_selectivity: bad value %f"
,
*
result
);
return
(
Selectivity
)
*
result
;
return
(
Selectivity
)
*
result
;
}
}
...
...
src/backend/parser/analyze.c
View file @
1cd4c141
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: analyze.c,v 1.12
8 2000/01/10 05:20:21 momjian
Exp $
* $Id: analyze.c,v 1.12
9 2000/01/15 02:59:31 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -732,7 +732,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
...
@@ -732,7 +732,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
break
;
break
;
default:
default:
elog
(
ERROR
,
"parser: unrecognized constraint (internal error)"
,
NULL
);
elog
(
ERROR
,
"parser: unrecognized constraint (internal error)"
);
break
;
break
;
}
}
}
}
...
@@ -1598,7 +1598,7 @@ transformForUpdate(Query *qry, List *forUpdate)
...
@@ -1598,7 +1598,7 @@ transformForUpdate(Query *qry, List *forUpdate)
i
++
;
i
++
;
}
}
if
(
l2
==
NULL
)
if
(
l2
==
NULL
)
elog
(
ERROR
,
"FOR UPDATE: relation %s not found in FROM clause"
,
lfirst
(
l
));
elog
(
ERROR
,
"FOR UPDATE: relation %s not found in FROM clause"
,
strVal
(
lfirst
(
l
)
));
}
}
qry
->
rowMark
=
rowMark
;
qry
->
rowMark
=
rowMark
;
...
...
src/backend/parser/gram.y
View file @
1cd4c141
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.12
5 2000/01/14 22:11:34
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.12
6 2000/01/15 02:59:32
petere Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -3622,7 +3622,7 @@ Character: character '(' Iconst ')'
...
@@ -3622,7 +3622,7 @@ Character: character '(' Iconst ')'
if ($3 < 1)
if ($3 < 1)
elog(ERROR,"length for '%s' type must be at least 1",$1);
elog(ERROR,"length for '%s' type must be at least 1",$1);
else if ($3 > MaxAttrSize)
else if ($3 > MaxAttrSize)
elog(ERROR,"length for type '%s' cannot exceed %d",$1,
elog(ERROR,"length for type '%s' cannot exceed %
l
d",$1,
MaxAttrSize);
MaxAttrSize);
/* we actually implement this sort of like a varlen, so
/* we actually implement this sort of like a varlen, so
...
...
src/backend/parser/parse_node.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.3
4 1999/12/24 06:43:33 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.3
5 2000/01/15 02:59:32 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -261,7 +261,7 @@ transformArraySubscripts(ParseState *pstate,
...
@@ -261,7 +261,7 @@ transformArraySubscripts(ParseState *pstate,
typeelement
=
type_struct_array
->
typelem
;
typeelement
=
type_struct_array
->
typelem
;
if
(
typeelement
==
InvalidOid
)
if
(
typeelement
==
InvalidOid
)
elog
(
ERROR
,
"transformArraySubscripts: type %s is not an array"
,
elog
(
ERROR
,
"transformArraySubscripts: type %s is not an array"
,
type_struct_array
->
typname
);
NameStr
(
type_struct_array
->
typname
)
);
/* Get the type tuple for the array element type */
/* Get the type tuple for the array element type */
type_tuple
=
SearchSysCacheTuple
(
TYPEOID
,
type_tuple
=
SearchSysCacheTuple
(
TYPEOID
,
...
...
src/backend/parser/parse_type.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.2
7 1999/11/22 17:56:21 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.2
8 2000/01/15 02:59:32 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -226,7 +226,7 @@ GetArrayElementType(Oid typearray)
...
@@ -226,7 +226,7 @@ GetArrayElementType(Oid typearray)
if
(
type_struct_array
->
typelem
==
InvalidOid
)
if
(
type_struct_array
->
typelem
==
InvalidOid
)
{
{
elog
(
ERROR
,
"GetArrayElementType: type %s is not an array"
,
elog
(
ERROR
,
"GetArrayElementType: type %s is not an array"
,
type_struct_array
->
typname
);
NameStr
(
type_struct_array
->
typname
)
);
}
}
return
type_struct_array
->
typelem
;
return
type_struct_array
->
typelem
;
...
...
src/backend/storage/buffer/bufmgr.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.
69 2000/01/05 18:23:49 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.
70 2000/01/15 02:59:33 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1225,8 +1225,8 @@ BufferPoolCheckLeak()
...
@@ -1225,8 +1225,8 @@ BufferPoolCheckLeak()
BufferDesc
*
buf
=
&
(
BufferDescriptors
[
i
-
1
]);
BufferDesc
*
buf
=
&
(
BufferDescriptors
[
i
-
1
]);
elog
(
NOTICE
,
elog
(
NOTICE
,
"Buffer Leak: [%03d] (freeNext=%
d, freePrev=%
d, \
"Buffer Leak: [%03d] (freeNext=%
ld, freePrev=%l
d, \
relname=%s, blockNum=%d, flags=0x%x, refcount=%d %d)"
,
relname=%s, blockNum=%d, flags=0x%x, refcount=%d %
l
d)"
,
i
-
1
,
buf
->
freeNext
,
buf
->
freePrev
,
i
-
1
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
refcount
,
PrivateRefCount
[
i
-
1
]);
buf
->
refcount
,
PrivateRefCount
[
i
-
1
]);
...
@@ -1536,8 +1536,8 @@ PrintBufferDescs()
...
@@ -1536,8 +1536,8 @@ PrintBufferDescs()
SpinAcquire
(
BufMgrLock
);
SpinAcquire
(
BufMgrLock
);
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
{
{
elog
(
DEBUG
,
"[%02d] (freeNext=%
d, freePrev=%
d, relname=%s, \
elog
(
DEBUG
,
"[%02d] (freeNext=%
ld, freePrev=%l
d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)"
,
blockNum=%d, flags=0x%x, refcount=%d %
l
d)"
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
refcount
,
PrivateRefCount
[
i
]);
buf
->
refcount
,
PrivateRefCount
[
i
]);
...
@@ -1566,8 +1566,8 @@ PrintPinnedBufs()
...
@@ -1566,8 +1566,8 @@ PrintPinnedBufs()
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
{
{
if
(
PrivateRefCount
[
i
]
>
0
)
if
(
PrivateRefCount
[
i
]
>
0
)
elog
(
NOTICE
,
"[%02d] (freeNext=%
d, freePrev=%
d, relname=%s, \
elog
(
NOTICE
,
"[%02d] (freeNext=%
ld, freePrev=%l
d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)
\n
"
,
blockNum=%d, flags=0x%x, refcount=%d %
l
d)
\n
"
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
refcount
,
PrivateRefCount
[
i
]);
buf
->
refcount
,
PrivateRefCount
[
i
]);
...
@@ -1668,7 +1668,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
...
@@ -1668,7 +1668,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
}
}
if
(
LocalRefCount
[
i
]
>
0
)
if
(
LocalRefCount
[
i
]
>
0
)
{
{
elog
(
NOTICE
,
"FlushRelationBuffers(%s (local), %u): block %u is referenced (%d)"
,
elog
(
NOTICE
,
"FlushRelationBuffers(%s (local), %u): block %u is referenced (%
l
d)"
,
RelationGetRelationName
(
rel
),
block
,
RelationGetRelationName
(
rel
),
block
,
buf
->
tag
.
blockNum
,
LocalRefCount
[
i
]);
buf
->
tag
.
blockNum
,
LocalRefCount
[
i
]);
return
-
2
;
return
-
2
;
...
@@ -1694,7 +1694,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
...
@@ -1694,7 +1694,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
SpinRelease
(
BufMgrLock
);
SpinRelease
(
BufMgrLock
);
if
(
FlushBuffer
(
i
+
1
,
false
)
!=
STATUS_OK
)
if
(
FlushBuffer
(
i
+
1
,
false
)
!=
STATUS_OK
)
{
{
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is dirty (private %d, global %d), could not flush it"
,
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is dirty (private %
l
d, global %d), could not flush it"
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
PrivateRefCount
[
i
],
buf
->
refcount
);
PrivateRefCount
[
i
],
buf
->
refcount
);
return
-
1
;
return
-
1
;
...
@@ -1704,7 +1704,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
...
@@ -1704,7 +1704,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
else
else
{
{
SpinRelease
(
BufMgrLock
);
SpinRelease
(
BufMgrLock
);
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is dirty (private %d, global %d)"
,
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is dirty (private %
l
d, global %d)"
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
PrivateRefCount
[
i
],
buf
->
refcount
);
PrivateRefCount
[
i
],
buf
->
refcount
);
return
-
1
;
return
-
1
;
...
@@ -1713,7 +1713,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
...
@@ -1713,7 +1713,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
if
(
!
(
buf
->
flags
&
BM_FREE
))
if
(
!
(
buf
->
flags
&
BM_FREE
))
{
{
SpinRelease
(
BufMgrLock
);
SpinRelease
(
BufMgrLock
);
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is referenced (private %d, global %d)"
,
elog
(
NOTICE
,
"FlushRelationBuffers(%s, %u): block %u is referenced (private %
l
d, global %d)"
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
buf
->
sb_relname
,
block
,
buf
->
tag
.
blockNum
,
PrivateRefCount
[
i
],
buf
->
refcount
);
PrivateRefCount
[
i
],
buf
->
refcount
);
return
-
2
;
return
-
2
;
...
@@ -2091,7 +2091,7 @@ LockBuffer(Buffer buffer, int mode)
...
@@ -2091,7 +2091,7 @@ LockBuffer(Buffer buffer, int mode)
BufferLocks
[
buffer
-
1
]
&=
~
BL_W_LOCK
;
BufferLocks
[
buffer
-
1
]
&=
~
BL_W_LOCK
;
}
}
else
else
elog
(
ERROR
,
"UNLockBuffer: buffer %u is not locked"
,
buffer
);
elog
(
ERROR
,
"UNLockBuffer: buffer %
l
u is not locked"
,
buffer
);
}
}
else
if
(
mode
==
BUFFER_LOCK_SHARE
)
else
if
(
mode
==
BUFFER_LOCK_SHARE
)
{
{
...
...
src/backend/storage/ipc/ipc.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.4
3 1999/11/22 02:06:31 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.4
4 2000/01/15 02:59:34 petere
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -554,7 +554,7 @@ static void
...
@@ -554,7 +554,7 @@ static void
IpcMemoryDetach
(
int
status
,
char
*
shmaddr
)
IpcMemoryDetach
(
int
status
,
char
*
shmaddr
)
{
{
if
(
shmdt
(
shmaddr
)
<
0
)
if
(
shmdt
(
shmaddr
)
<
0
)
elog
(
NOTICE
,
"IpcMemoryDetach: shmdt(0x%
x
): %m"
,
shmaddr
);
elog
(
NOTICE
,
"IpcMemoryDetach: shmdt(0x%
p
): %m"
,
shmaddr
);
}
}
/****************************************************************************/
/****************************************************************************/
...
...
src/backend/storage/lmgr/lock.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
3 1999/11/28 01:56:48 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
4 2000/01/15 02:59:35 petere
Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -1362,7 +1362,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
...
@@ -1362,7 +1362,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
{
{
/* Should never happen */
/* Should never happen */
elog
(
NOTICE
,
elog
(
NOTICE
,
"LockReleaseAll: INVALID PID: [%u] [%d,%d,%d]"
,
"LockReleaseAll: INVALID PID: [%u] [%
l
d,%d,%d]"
,
lock
->
tag
.
objId
.
blkno
,
lock
->
tag
.
objId
.
blkno
,
xidLook
->
tag
.
lock
,
xidLook
->
tag
.
pid
,
xidLook
->
tag
.
xid
);
xidLook
->
tag
.
lock
,
xidLook
->
tag
.
pid
,
xidLook
->
tag
.
xid
);
nleft
++
;
nleft
++
;
...
...
src/backend/utils/adt/cash.c
View file @
1cd4c141
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.3
2 1999/07/17 20:17:54 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.3
3 2000/01/15 02:59:36 petere
Exp $
*/
*/
#include <limits.h>
#include <limits.h>
...
@@ -285,7 +285,7 @@ cash_out(Cash *in_value)
...
@@ -285,7 +285,7 @@ cash_out(Cash *in_value)
if
(
minus
)
if
(
minus
)
{
{
if
(
!
PointerIsValid
(
result
=
palloc
(
CASH_BUFSZ
+
2
-
count
+
strlen
(
nsymbol
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
CASH_BUFSZ
+
2
-
count
+
strlen
(
nsymbol
))))
elog
(
ERROR
,
"Memory allocation failed, can't output cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't output cash"
);
/* Position code of 0 means use parens */
/* Position code of 0 means use parens */
if
(
convention
==
0
)
if
(
convention
==
0
)
...
@@ -298,7 +298,7 @@ cash_out(Cash *in_value)
...
@@ -298,7 +298,7 @@ cash_out(Cash *in_value)
else
else
{
{
if
(
!
PointerIsValid
(
result
=
palloc
(
CASH_BUFSZ
+
2
-
count
)))
if
(
!
PointerIsValid
(
result
=
palloc
(
CASH_BUFSZ
+
2
-
count
)))
elog
(
ERROR
,
"Memory allocation failed, can't output cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't output cash"
);
strcpy
(
result
,
buf
+
count
);
strcpy
(
result
,
buf
+
count
);
}
}
...
@@ -374,7 +374,7 @@ cash_pl(Cash *c1, Cash *c2)
...
@@ -374,7 +374,7 @@ cash_pl(Cash *c1, Cash *c2)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't add cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't add cash"
);
*
result
=
(
*
c1
+
*
c2
);
*
result
=
(
*
c1
+
*
c2
);
...
@@ -394,7 +394,7 @@ cash_mi(Cash *c1, Cash *c2)
...
@@ -394,7 +394,7 @@ cash_mi(Cash *c1, Cash *c2)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't subtract cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't subtract cash"
);
*
result
=
(
*
c1
-
*
c2
);
*
result
=
(
*
c1
-
*
c2
);
...
@@ -414,7 +414,7 @@ cash_mul_flt8(Cash *c, float8 *f)
...
@@ -414,7 +414,7 @@ cash_mul_flt8(Cash *c, float8 *f)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
);
*
result
=
((
*
f
)
*
(
*
c
));
*
result
=
((
*
f
)
*
(
*
c
));
...
@@ -447,7 +447,7 @@ cash_div_flt8(Cash *c, float8 *f)
...
@@ -447,7 +447,7 @@ cash_div_flt8(Cash *c, float8 *f)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
);
if
(
*
f
==
0
.
0
)
if
(
*
f
==
0
.
0
)
elog
(
ERROR
,
"cash_div: divide by 0.0 error"
);
elog
(
ERROR
,
"cash_div: divide by 0.0 error"
);
...
@@ -469,7 +469,7 @@ cash_mul_flt4(Cash *c, float4 *f)
...
@@ -469,7 +469,7 @@ cash_mul_flt4(Cash *c, float4 *f)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
);
*
result
=
((
*
f
)
*
(
*
c
));
*
result
=
((
*
f
)
*
(
*
c
));
...
@@ -502,7 +502,7 @@ cash_div_flt4(Cash *c, float4 *f)
...
@@ -502,7 +502,7 @@ cash_div_flt4(Cash *c, float4 *f)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
);
if
(
*
f
==
0
.
0
)
if
(
*
f
==
0
.
0
)
elog
(
ERROR
,
"cash_div: divide by 0.0 error"
);
elog
(
ERROR
,
"cash_div: divide by 0.0 error"
);
...
@@ -525,7 +525,7 @@ cash_mul_int4(Cash *c, int4 i)
...
@@ -525,7 +525,7 @@ cash_mul_int4(Cash *c, int4 i)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
);
*
result
=
((
i
)
*
(
*
c
));
*
result
=
((
i
)
*
(
*
c
));
...
@@ -558,7 +558,7 @@ cash_div_int4(Cash *c, int4 i)
...
@@ -558,7 +558,7 @@ cash_div_int4(Cash *c, int4 i)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
);
if
(
i
==
0
)
if
(
i
==
0
)
elog
(
ERROR
,
"cash_idiv: divide by 0 error"
);
elog
(
ERROR
,
"cash_idiv: divide by 0 error"
);
...
@@ -581,7 +581,7 @@ cash_mul_int2(Cash *c, int2 s)
...
@@ -581,7 +581,7 @@ cash_mul_int2(Cash *c, int2 s)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't multiply cash"
);
*
result
=
((
s
)
*
(
*
c
));
*
result
=
((
s
)
*
(
*
c
));
...
@@ -614,7 +614,7 @@ cash_div_int2(Cash *c, int2 s)
...
@@ -614,7 +614,7 @@ cash_div_int2(Cash *c, int2 s)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't divide cash"
);
if
(
s
==
0
)
if
(
s
==
0
)
elog
(
ERROR
,
"cash_div: divide by 0 error"
);
elog
(
ERROR
,
"cash_div: divide by 0 error"
);
...
@@ -637,7 +637,7 @@ cashlarger(Cash *c1, Cash *c2)
...
@@ -637,7 +637,7 @@ cashlarger(Cash *c1, Cash *c2)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't return larger cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't return larger cash"
);
*
result
=
((
*
c1
>
*
c2
)
?
*
c1
:
*
c2
);
*
result
=
((
*
c1
>
*
c2
)
?
*
c1
:
*
c2
);
...
@@ -657,7 +657,7 @@ cashsmaller(Cash *c1, Cash *c2)
...
@@ -657,7 +657,7 @@ cashsmaller(Cash *c1, Cash *c2)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
Cash
))))
elog
(
ERROR
,
"Memory allocation failed, can't return smaller cash"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't return smaller cash"
);
*
result
=
((
*
c1
<
*
c2
)
?
*
c1
:
*
c2
);
*
result
=
((
*
c1
<
*
c2
)
?
*
c1
:
*
c2
);
...
...
src/backend/utils/adt/date.c
View file @
1cd4c141
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.
39 2000/01/02 01:37:26 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.
40 2000/01/15 02:59:36 petere
Exp $
*
*
* NOTES
* NOTES
* This code is actually (almost) unused.
* This code is actually (almost) unused.
...
@@ -133,7 +133,7 @@ reltimein(char *str)
...
@@ -133,7 +133,7 @@ reltimein(char *str)
char
lowstr
[
MAXDATELEN
+
1
];
char
lowstr
[
MAXDATELEN
+
1
];
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) date external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) date external representation"
);
if
(
strlen
(
str
)
>
MAXDATELEN
)
if
(
strlen
(
str
)
>
MAXDATELEN
)
elog
(
ERROR
,
"Bad (length) reltime external representation '%s'"
,
str
);
elog
(
ERROR
,
"Bad (length) reltime external representation '%s'"
,
str
);
...
@@ -362,7 +362,7 @@ reltime_timespan(RelativeTime reltime)
...
@@ -362,7 +362,7 @@ reltime_timespan(RelativeTime reltime)
month
;
month
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
TimeSpan
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
TimeSpan
))))
elog
(
ERROR
,
"Memory allocation failed, can't convert reltime to timespan"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't convert reltime to timespan"
);
switch
(
reltime
)
switch
(
reltime
)
{
{
...
...
src/backend/utils/adt/datetime.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.
39 2000/01/02 01:37:26 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.
40 2000/01/15 02:59:36 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -46,7 +46,7 @@ date_in(char *str)
...
@@ -46,7 +46,7 @@ date_in(char *str)
char
lowstr
[
MAXDATELEN
+
1
];
char
lowstr
[
MAXDATELEN
+
1
];
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) date external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) date external representation"
);
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
||
(
DecodeDateTime
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
,
&
tzp
)
!=
0
))
||
(
DecodeDateTime
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
,
&
tzp
)
!=
0
))
...
@@ -199,10 +199,10 @@ date_datetime(DateADT dateVal)
...
@@ -199,10 +199,10 @@ date_datetime(DateADT dateVal)
result
=
palloc
(
sizeof
(
DateTime
));
result
=
palloc
(
sizeof
(
DateTime
));
if
(
date2tm
(
dateVal
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
if
(
date2tm
(
dateVal
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
elog
(
ERROR
,
"Unable to convert date to datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to convert date to datetime"
);
if
(
tm2datetime
(
tm
,
fsec
,
&
tz
,
result
)
!=
0
)
if
(
tm2datetime
(
tm
,
fsec
,
&
tz
,
result
)
!=
0
)
elog
(
ERROR
,
"Datetime out of range"
,
NULL
);
elog
(
ERROR
,
"Datetime out of range"
);
return
result
;
return
result
;
}
/* date_datetime() */
}
/* date_datetime() */
...
@@ -222,10 +222,10 @@ datetime_date(DateTime *datetime)
...
@@ -222,10 +222,10 @@ datetime_date(DateTime *datetime)
char
*
tzn
;
char
*
tzn
;
if
(
!
PointerIsValid
(
datetime
))
if
(
!
PointerIsValid
(
datetime
))
elog
(
ERROR
,
"Unable to convert null datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert null datetime to date"
);
if
(
DATETIME_NOT_FINITE
(
*
datetime
))
if
(
DATETIME_NOT_FINITE
(
*
datetime
))
elog
(
ERROR
,
"Unable to convert datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert datetime to date"
);
if
(
DATETIME_IS_EPOCH
(
*
datetime
))
if
(
DATETIME_IS_EPOCH
(
*
datetime
))
{
{
...
@@ -240,7 +240,7 @@ datetime_date(DateTime *datetime)
...
@@ -240,7 +240,7 @@ datetime_date(DateTime *datetime)
else
else
{
{
if
(
datetime2tm
(
*
datetime
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
if
(
datetime2tm
(
*
datetime
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
elog
(
ERROR
,
"Unable to convert datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert datetime to date"
);
}
}
result
=
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
)
-
date2j
(
2000
,
1
,
1
));
result
=
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
)
-
date2j
(
2000
,
1
,
1
));
...
@@ -265,7 +265,7 @@ abstime_date(AbsoluteTime abstime)
...
@@ -265,7 +265,7 @@ abstime_date(AbsoluteTime abstime)
case
INVALID_ABSTIME
:
case
INVALID_ABSTIME
:
case
NOSTART_ABSTIME
:
case
NOSTART_ABSTIME
:
case
NOEND_ABSTIME
:
case
NOEND_ABSTIME
:
elog
(
ERROR
,
"Unable to convert reserved abstime value to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert reserved abstime value to date"
);
/*
/*
* pretend to drop through to make compiler think that result
* pretend to drop through to make compiler think that result
...
@@ -387,7 +387,7 @@ time_in(char *str)
...
@@ -387,7 +387,7 @@ time_in(char *str)
int
ftype
[
MAXDATEFIELDS
];
int
ftype
[
MAXDATEFIELDS
];
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) time external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) time external representation"
);
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
||
(
DecodeTimeOnly
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
)
!=
0
))
||
(
DecodeTimeOnly
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
)
!=
0
))
...
@@ -505,10 +505,10 @@ datetime_time(DateTime *datetime)
...
@@ -505,10 +505,10 @@ datetime_time(DateTime *datetime)
char
*
tzn
;
char
*
tzn
;
if
(
!
PointerIsValid
(
datetime
))
if
(
!
PointerIsValid
(
datetime
))
elog
(
ERROR
,
"Unable to convert null datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert null datetime to date"
);
if
(
DATETIME_NOT_FINITE
(
*
datetime
))
if
(
DATETIME_NOT_FINITE
(
*
datetime
))
elog
(
ERROR
,
"Unable to convert datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert datetime to date"
);
if
(
DATETIME_IS_EPOCH
(
*
datetime
))
if
(
DATETIME_IS_EPOCH
(
*
datetime
))
{
{
...
@@ -523,7 +523,7 @@ datetime_time(DateTime *datetime)
...
@@ -523,7 +523,7 @@ datetime_time(DateTime *datetime)
else
else
{
{
if
(
datetime2tm
(
*
datetime
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
if
(
datetime2tm
(
*
datetime
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
elog
(
ERROR
,
"Unable to convert datetime to date"
,
NULL
);
elog
(
ERROR
,
"Unable to convert datetime to date"
);
}
}
result
=
palloc
(
sizeof
(
TimeADT
));
result
=
palloc
(
sizeof
(
TimeADT
));
...
...
src/backend/utils/adt/dt.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.8
0 2000/01/04 07:53:27 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.8
1 2000/01/15 02:59:36 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -114,7 +114,7 @@ datetime_in(char *str)
...
@@ -114,7 +114,7 @@ datetime_in(char *str)
char
lowstr
[
MAXDATELEN
+
1
];
char
lowstr
[
MAXDATELEN
+
1
];
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) datetime external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) datetime external representation"
);
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
||
(
DecodeDateTime
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
,
&
tz
)
!=
0
))
||
(
DecodeDateTime
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
,
&
tz
)
!=
0
))
...
@@ -223,7 +223,7 @@ timespan_in(char *str)
...
@@ -223,7 +223,7 @@ timespan_in(char *str)
fsec
=
0
;
fsec
=
0
;
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) timespan external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) timespan external representation"
);
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
if
((
ParseDateTime
(
str
,
lowstr
,
field
,
ftype
,
MAXDATEFIELDS
,
&
nf
)
!=
0
)
||
(
DecodeDateDelta
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
)
!=
0
))
||
(
DecodeDateDelta
(
field
,
ftype
,
nf
,
&
dtype
,
tm
,
&
fsec
)
!=
0
))
...
@@ -270,7 +270,7 @@ timespan_out(TimeSpan *span)
...
@@ -270,7 +270,7 @@ timespan_out(TimeSpan *span)
return
NULL
;
return
NULL
;
if
(
EncodeTimeSpan
(
tm
,
fsec
,
DateStyle
,
buf
)
!=
0
)
if
(
EncodeTimeSpan
(
tm
,
fsec
,
DateStyle
,
buf
)
!=
0
)
elog
(
ERROR
,
"Unable to format timespan"
,
NULL
);
elog
(
ERROR
,
"Unable to format timespan"
);
result
=
palloc
(
strlen
(
buf
)
+
1
);
result
=
palloc
(
strlen
(
buf
)
+
1
);
...
@@ -841,7 +841,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
...
@@ -841,7 +841,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
tm
->
tm_mday
=
(
day_tab
[
isleap
(
tm
->
tm_year
)][
tm
->
tm_mon
-
1
]);
tm
->
tm_mday
=
(
day_tab
[
isleap
(
tm
->
tm_year
)][
tm
->
tm_mon
-
1
]);
if
(
tm2datetime
(
tm
,
fsec
,
&
tz
,
&
dt
)
!=
0
)
if
(
tm2datetime
(
tm
,
fsec
,
&
tz
,
&
dt
)
!=
0
)
elog
(
ERROR
,
"Unable to add datetime and timespan"
,
NULL
);
elog
(
ERROR
,
"Unable to add datetime and timespan"
);
}
}
else
else
...
@@ -1037,7 +1037,7 @@ timespan_div(TimeSpan *span1, float8 *arg2)
...
@@ -1037,7 +1037,7 @@ timespan_div(TimeSpan *span1, float8 *arg2)
return
NULL
;
return
NULL
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
TimeSpan
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
TimeSpan
))))
elog
(
ERROR
,
"Memory allocation failed, can't divide timespans"
,
NULL
);
elog
(
ERROR
,
"Memory allocation failed, can't divide timespans"
);
if
(
*
arg2
==
0
.
0
)
if
(
*
arg2
==
0
.
0
)
elog
(
ERROR
,
"timespan_div: divide by 0.0 error"
);
elog
(
ERROR
,
"timespan_div: divide by 0.0 error"
);
...
@@ -1164,11 +1164,11 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
...
@@ -1164,11 +1164,11 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
}
}
if
(
tm2timespan
(
tm
,
fsec
,
result
)
!=
0
)
if
(
tm2timespan
(
tm
,
fsec
,
result
)
!=
0
)
elog
(
ERROR
,
"Unable to decode datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to decode datetime"
);
}
}
else
else
elog
(
ERROR
,
"Unable to decode datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to decode datetime"
);
return
result
;
return
result
;
}
/* datetime_age() */
}
/* datetime_age() */
...
@@ -1528,7 +1528,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
...
@@ -1528,7 +1528,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
}
}
else
else
{
{
elog
(
NOTICE
,
"Timespan out of range"
,
NULL
);
elog
(
NOTICE
,
"Timespan out of range"
);
result
=
NULL
;
result
=
NULL
;
}
}
...
@@ -1547,7 +1547,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
...
@@ -1547,7 +1547,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
}
}
else
else
{
{
elog
(
ERROR
,
"Timespan units '%s' not recognized"
,
units
);
elog
(
ERROR
,
"Timespan units '%s' not recognized"
,
textout
(
units
)
);
result
=
NULL
;
result
=
NULL
;
}
}
...
@@ -1688,14 +1688,14 @@ datetime_part(text *units, DateTime *datetime)
...
@@ -1688,14 +1688,14 @@ datetime_part(text *units, DateTime *datetime)
case
DTK_DOW
:
case
DTK_DOW
:
if
(
datetime2tm
(
dt
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
if
(
datetime2tm
(
dt
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
elog
(
ERROR
,
"Unable to encode datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to encode datetime"
);
*
result
=
j2day
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
));
*
result
=
j2day
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
));
break
;
break
;
case
DTK_DOY
:
case
DTK_DOY
:
if
(
datetime2tm
(
dt
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
if
(
datetime2tm
(
dt
,
&
tz
,
tm
,
&
fsec
,
&
tzn
)
!=
0
)
elog
(
ERROR
,
"Unable to encode datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to encode datetime"
);
*
result
=
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
)
*
result
=
(
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
)
-
date2j
(
tm
->
tm_year
,
1
,
1
)
+
1
);
-
date2j
(
tm
->
tm_year
,
1
,
1
)
+
1
);
...
@@ -1754,7 +1754,7 @@ timespan_part(text *units, TimeSpan *timespan)
...
@@ -1754,7 +1754,7 @@ timespan_part(text *units, TimeSpan *timespan)
if
(
TIMESPAN_IS_INVALID
(
*
timespan
))
if
(
TIMESPAN_IS_INVALID
(
*
timespan
))
{
{
#if NOT_USED
#if NOT_USED
elog
(
ERROR
,
"Timespan is not finite"
,
NULL
);
elog
(
ERROR
,
"Timespan is not finite"
);
#endif
#endif
*
result
=
0
;
*
result
=
0
;
...
@@ -1815,14 +1815,14 @@ timespan_part(text *units, TimeSpan *timespan)
...
@@ -1815,14 +1815,14 @@ timespan_part(text *units, TimeSpan *timespan)
break
;
break
;
default:
default:
elog
(
ERROR
,
"Timespan units '%s' not yet supported"
,
units
);
elog
(
ERROR
,
"Timespan units '%s' not yet supported"
,
textout
(
units
)
);
result
=
NULL
;
result
=
NULL
;
}
}
}
}
else
else
{
{
elog
(
NOTICE
,
"Timespan out of range"
,
NULL
);
elog
(
NOTICE
,
"Timespan out of range"
);
*
result
=
0
;
*
result
=
0
;
}
}
...
@@ -1839,7 +1839,7 @@ timespan_part(text *units, TimeSpan *timespan)
...
@@ -1839,7 +1839,7 @@ timespan_part(text *units, TimeSpan *timespan)
}
}
else
else
{
{
elog
(
ERROR
,
"Timespan units '%s' not recognized"
,
units
);
elog
(
ERROR
,
"Timespan units '%s' not recognized"
,
textout
(
units
)
);
*
result
=
0
;
*
result
=
0
;
}
}
...
@@ -1889,7 +1889,7 @@ datetime_zone(text *zone, DateTime *datetime)
...
@@ -1889,7 +1889,7 @@ datetime_zone(text *zone, DateTime *datetime)
* could return null but Postgres doesn't like that currently. -
* could return null but Postgres doesn't like that currently. -
* tgl 97/06/12
* tgl 97/06/12
*/
*/
elog
(
ERROR
,
"Datetime is not finite"
,
NULL
);
elog
(
ERROR
,
"Datetime is not finite"
);
result
=
NULL
;
result
=
NULL
;
}
}
...
@@ -1902,7 +1902,7 @@ datetime_zone(text *zone, DateTime *datetime)
...
@@ -1902,7 +1902,7 @@ datetime_zone(text *zone, DateTime *datetime)
dt
=
dt2local
(
dt
,
tz
);
dt
=
dt2local
(
dt
,
tz
);
if
(
datetime2tm
(
dt
,
NULL
,
tm
,
&
fsec
,
NULL
)
!=
0
)
if
(
datetime2tm
(
dt
,
NULL
,
tm
,
&
fsec
,
NULL
)
!=
0
)
elog
(
ERROR
,
"Datetime not legal"
,
NULL
);
elog
(
ERROR
,
"Datetime not legal"
);
up
=
upzone
;
up
=
upzone
;
lp
=
lowzone
;
lp
=
lowzone
;
...
...
src/backend/utils/adt/float.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.5
1 1999/12/20 02:15:35 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.5
2 2000/01/15 02:59:37 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -830,10 +830,10 @@ dtoi4(float64 num)
...
@@ -830,10 +830,10 @@ dtoi4(float64 num)
int32
result
;
int32
result
;
if
(
!
PointerIsValid
(
num
))
if
(
!
PointerIsValid
(
num
))
elog
(
ERROR
,
"dtoi4: unable to convert null"
,
NULL
);
elog
(
ERROR
,
"dtoi4: unable to convert null"
);
if
((
*
num
<
INT_MIN
)
||
(
*
num
>
INT_MAX
))
if
((
*
num
<
INT_MIN
)
||
(
*
num
>
INT_MAX
))
elog
(
ERROR
,
"dtoi4: integer out of range"
,
NULL
);
elog
(
ERROR
,
"dtoi4: integer out of range"
);
result
=
rint
(
*
num
);
result
=
rint
(
*
num
);
return
result
;
return
result
;
...
@@ -849,10 +849,10 @@ dtoi2(float64 num)
...
@@ -849,10 +849,10 @@ dtoi2(float64 num)
int16
result
;
int16
result
;
if
(
!
PointerIsValid
(
num
))
if
(
!
PointerIsValid
(
num
))
elog
(
ERROR
,
"dtoi2: unable to convert null"
,
NULL
);
elog
(
ERROR
,
"dtoi2: unable to convert null"
);
if
((
*
num
<
SHRT_MIN
)
||
(
*
num
>
SHRT_MAX
))
if
((
*
num
<
SHRT_MIN
)
||
(
*
num
>
SHRT_MAX
))
elog
(
ERROR
,
"dtoi2: integer out of range"
,
NULL
);
elog
(
ERROR
,
"dtoi2: integer out of range"
);
result
=
rint
(
*
num
);
result
=
rint
(
*
num
);
return
result
;
return
result
;
...
@@ -898,10 +898,10 @@ ftoi4(float32 num)
...
@@ -898,10 +898,10 @@ ftoi4(float32 num)
int32
result
;
int32
result
;
if
(
!
PointerIsValid
(
num
))
if
(
!
PointerIsValid
(
num
))
elog
(
ERROR
,
"ftoi4: unable to convert null"
,
NULL
);
elog
(
ERROR
,
"ftoi4: unable to convert null"
);
if
((
*
num
<
INT_MIN
)
||
(
*
num
>
INT_MAX
))
if
((
*
num
<
INT_MIN
)
||
(
*
num
>
INT_MAX
))
elog
(
ERROR
,
"ftoi4: integer out of range"
,
NULL
);
elog
(
ERROR
,
"ftoi4: integer out of range"
);
result
=
rint
(
*
num
);
result
=
rint
(
*
num
);
return
result
;
return
result
;
...
@@ -917,10 +917,10 @@ ftoi2(float32 num)
...
@@ -917,10 +917,10 @@ ftoi2(float32 num)
int16
result
;
int16
result
;
if
(
!
PointerIsValid
(
num
))
if
(
!
PointerIsValid
(
num
))
elog
(
ERROR
,
"ftoi2: unable to convert null"
,
NULL
);
elog
(
ERROR
,
"ftoi2: unable to convert null"
);
if
((
*
num
<
SHRT_MIN
)
||
(
*
num
>
SHRT_MAX
))
if
((
*
num
<
SHRT_MIN
)
||
(
*
num
>
SHRT_MAX
))
elog
(
ERROR
,
"ftoi2: integer out of range"
,
NULL
);
elog
(
ERROR
,
"ftoi2: integer out of range"
);
result
=
rint
(
*
num
);
result
=
rint
(
*
num
);
return
result
;
return
result
;
...
...
src/backend/utils/adt/geo_ops.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.4
6 1999/12/21 17:01:44 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.4
7 2000/01/15 02:59:37 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -282,7 +282,7 @@ path_encode(bool closed, int npts, Point *pt)
...
@@ -282,7 +282,7 @@ path_encode(bool closed, int npts, Point *pt)
{
{
*
cp
++
=
LDELIM
;
*
cp
++
=
LDELIM
;
if
(
!
pair_encode
(
pt
->
x
,
pt
->
y
,
cp
))
if
(
!
pair_encode
(
pt
->
x
,
pt
->
y
,
cp
))
elog
(
ERROR
,
"Unable to format path"
,
NULL
);
elog
(
ERROR
,
"Unable to format path"
);
cp
+=
strlen
(
cp
);
cp
+=
strlen
(
cp
);
*
cp
++
=
RDELIM
;
*
cp
++
=
RDELIM
;
*
cp
++
=
DELIM
;
*
cp
++
=
DELIM
;
...
@@ -352,7 +352,7 @@ box_in(char *str)
...
@@ -352,7 +352,7 @@ box_in(char *str)
y
;
y
;
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
" Bad (null) box external representation"
,
NULL
);
elog
(
ERROR
,
" Bad (null) box external representation"
);
if
((
!
path_decode
(
FALSE
,
2
,
str
,
&
isopen
,
&
s
,
&
(
box
->
high
)))
if
((
!
path_decode
(
FALSE
,
2
,
str
,
&
isopen
,
&
s
,
&
(
box
->
high
)))
||
(
*
s
!=
'\0'
))
||
(
*
s
!=
'\0'
))
...
@@ -777,7 +777,7 @@ line_in(char *str)
...
@@ -777,7 +777,7 @@ line_in(char *str)
#endif
#endif
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
" Bad (null) line external representation"
,
NULL
);
elog
(
ERROR
,
" Bad (null) line external representation"
);
#ifdef ENABLE_LINE_TYPE
#ifdef ENABLE_LINE_TYPE
if
((
!
path_decode
(
TRUE
,
2
,
str
,
&
isopen
,
&
s
,
&
(
lseg
.
p
[
0
])))
if
((
!
path_decode
(
TRUE
,
2
,
str
,
&
isopen
,
&
s
,
&
(
lseg
.
p
[
0
])))
...
@@ -1645,7 +1645,7 @@ lseg_in(char *str)
...
@@ -1645,7 +1645,7 @@ lseg_in(char *str)
char
*
s
;
char
*
s
;
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
" Bad (null) lseg external representation"
,
NULL
);
elog
(
ERROR
,
" Bad (null) lseg external representation"
);
lseg
=
palloc
(
sizeof
(
LSEG
));
lseg
=
palloc
(
sizeof
(
LSEG
));
...
@@ -2193,7 +2193,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
...
@@ -2193,7 +2193,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
LSEG
seg
;
LSEG
seg
;
if
(
!
PointerIsValid
(
circle
)
||
!
PointerIsValid
(
poly
))
if
(
!
PointerIsValid
(
circle
)
||
!
PointerIsValid
(
poly
))
elog
(
ERROR
,
"Invalid (null) input for distance"
,
NULL
);
elog
(
ERROR
,
"Invalid (null) input for distance"
);
if
(
point_inside
(
&
(
circle
->
center
),
poly
->
npts
,
poly
->
p
))
if
(
point_inside
(
&
(
circle
->
center
),
poly
->
npts
,
poly
->
p
))
{
{
...
@@ -2669,7 +2669,7 @@ Point *
...
@@ -2669,7 +2669,7 @@ Point *
close_lb
(
LINE
*
line
,
BOX
*
box
)
close_lb
(
LINE
*
line
,
BOX
*
box
)
{
{
/* think about this one for a while */
/* think about this one for a while */
elog
(
ERROR
,
"close_lb not implemented"
,
NULL
);
elog
(
ERROR
,
"close_lb not implemented"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -2939,7 +2939,7 @@ make_bound_box(POLYGON *poly)
...
@@ -2939,7 +2939,7 @@ make_bound_box(POLYGON *poly)
box_fill
(
&
(
poly
->
boundbox
),
x1
,
x2
,
y1
,
y2
);
box_fill
(
&
(
poly
->
boundbox
),
x1
,
x2
,
y1
,
y2
);
}
}
else
else
elog
(
ERROR
,
"Unable to create bounding box for empty polygon"
,
NULL
);
elog
(
ERROR
,
"Unable to create bounding box for empty polygon"
);
}
}
/*------------------------------------------------------------------
/*------------------------------------------------------------------
...
@@ -3540,7 +3540,7 @@ path_center(PATH *path)
...
@@ -3540,7 +3540,7 @@ path_center(PATH *path)
if
(
!
PointerIsValid
(
path
))
if
(
!
PointerIsValid
(
path
))
return
NULL
;
return
NULL
;
elog
(
ERROR
,
"path_center not implemented"
,
NULL
);
elog
(
ERROR
,
"path_center not implemented"
);
result
=
palloc
(
sizeof
(
Point
));
result
=
palloc
(
sizeof
(
Point
));
result
=
NULL
;
result
=
NULL
;
...
@@ -3559,7 +3559,7 @@ path_poly(PATH *path)
...
@@ -3559,7 +3559,7 @@ path_poly(PATH *path)
return
NULL
;
return
NULL
;
if
(
!
path
->
closed
)
if
(
!
path
->
closed
)
elog
(
ERROR
,
"Open path cannot be converted to polygon"
,
NULL
);
elog
(
ERROR
,
"Open path cannot be converted to polygon"
);
size
=
offsetof
(
POLYGON
,
p
[
0
])
+
(
sizeof
(
poly
->
p
[
0
])
*
path
->
npts
);
size
=
offsetof
(
POLYGON
,
p
[
0
])
+
(
sizeof
(
poly
->
p
[
0
])
*
path
->
npts
);
poly
=
palloc
(
size
);
poly
=
palloc
(
size
);
...
@@ -3598,7 +3598,7 @@ upgradepath(PATH *path)
...
@@ -3598,7 +3598,7 @@ upgradepath(PATH *path)
return
NULL
;
return
NULL
;
if
(
!
isoldpath
(
path
))
if
(
!
isoldpath
(
path
))
elog
(
ERROR
,
"upgradepath: path already upgraded?"
,
NULL
);
elog
(
ERROR
,
"upgradepath: path already upgraded?"
);
npts
=
(
path
->
npts
-
1
);
npts
=
(
path
->
npts
-
1
);
size
=
offsetof
(
PATH
,
p
[
0
])
+
(
sizeof
(
path
->
p
[
0
])
*
npts
);
size
=
offsetof
(
PATH
,
p
[
0
])
+
(
sizeof
(
path
->
p
[
0
])
*
npts
);
...
@@ -3862,7 +3862,7 @@ circle_in(char *str)
...
@@ -3862,7 +3862,7 @@ circle_in(char *str)
int
depth
=
0
;
int
depth
=
0
;
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
" Bad (null) circle external representation"
,
NULL
);
elog
(
ERROR
,
" Bad (null) circle external representation"
);
circle
=
palloc
(
sizeof
(
CIRCLE
));
circle
=
palloc
(
sizeof
(
CIRCLE
));
...
@@ -3927,13 +3927,13 @@ circle_out(CIRCLE *circle)
...
@@ -3927,13 +3927,13 @@ circle_out(CIRCLE *circle)
*
cp
++
=
LDELIM_C
;
*
cp
++
=
LDELIM_C
;
*
cp
++
=
LDELIM
;
*
cp
++
=
LDELIM
;
if
(
!
pair_encode
(
circle
->
center
.
x
,
circle
->
center
.
y
,
cp
))
if
(
!
pair_encode
(
circle
->
center
.
x
,
circle
->
center
.
y
,
cp
))
elog
(
ERROR
,
"Unable to format circle"
,
NULL
);
elog
(
ERROR
,
"Unable to format circle"
);
cp
+=
strlen
(
cp
);
cp
+=
strlen
(
cp
);
*
cp
++
=
RDELIM
;
*
cp
++
=
RDELIM
;
*
cp
++
=
DELIM
;
*
cp
++
=
DELIM
;
if
(
!
single_encode
(
circle
->
radius
,
cp
))
if
(
!
single_encode
(
circle
->
radius
,
cp
))
elog
(
ERROR
,
"Unable to format circle"
,
NULL
);
elog
(
ERROR
,
"Unable to format circle"
);
cp
+=
strlen
(
cp
);
cp
+=
strlen
(
cp
);
*
cp
++
=
RDELIM_C
;
*
cp
++
=
RDELIM_C
;
...
@@ -4395,7 +4395,7 @@ circle_poly(int npts, CIRCLE *circle)
...
@@ -4395,7 +4395,7 @@ circle_poly(int npts, CIRCLE *circle)
return
NULL
;
return
NULL
;
if
(
FPzero
(
circle
->
radius
)
||
(
npts
<
2
))
if
(
FPzero
(
circle
->
radius
)
||
(
npts
<
2
))
elog
(
ERROR
,
"Unable to convert circle to polygon"
,
NULL
);
elog
(
ERROR
,
"Unable to convert circle to polygon"
);
size
=
offsetof
(
POLYGON
,
p
[
0
])
+
(
sizeof
(
poly
->
p
[
0
])
*
npts
);
size
=
offsetof
(
POLYGON
,
p
[
0
])
+
(
sizeof
(
poly
->
p
[
0
])
*
npts
);
poly
=
palloc
(
size
);
poly
=
palloc
(
size
);
...
@@ -4431,7 +4431,7 @@ poly_circle(POLYGON *poly)
...
@@ -4431,7 +4431,7 @@ poly_circle(POLYGON *poly)
return
NULL
;
return
NULL
;
if
(
poly
->
npts
<
2
)
if
(
poly
->
npts
<
2
)
elog
(
ERROR
,
"Unable to convert polygon to circle"
,
NULL
);
elog
(
ERROR
,
"Unable to convert polygon to circle"
);
circle
=
palloc
(
sizeof
(
CIRCLE
));
circle
=
palloc
(
sizeof
(
CIRCLE
));
...
@@ -4452,7 +4452,7 @@ poly_circle(POLYGON *poly)
...
@@ -4452,7 +4452,7 @@ poly_circle(POLYGON *poly)
circle
->
radius
/=
poly
->
npts
;
circle
->
radius
/=
poly
->
npts
;
if
(
FPzero
(
circle
->
radius
))
if
(
FPzero
(
circle
->
radius
))
elog
(
ERROR
,
"Unable to convert polygon to circle"
,
NULL
);
elog
(
ERROR
,
"Unable to convert polygon to circle"
);
return
circle
;
return
circle
;
}
/* poly_circle() */
}
/* poly_circle() */
...
...
src/backend/utils/adt/nabstime.c
View file @
1cd4c141
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nabstime.c,v 1.6
3 2000/01/02 01:37:27 momjian
Exp $
* $Id: nabstime.c,v 1.6
4 2000/01/15 02:59:38 petere
Exp $
*
*
*/
*/
#include <ctype.h>
#include <ctype.h>
...
@@ -265,7 +265,7 @@ nabstimein(char *str)
...
@@ -265,7 +265,7 @@ nabstimein(char *str)
ftype
[
MAXDATEFIELDS
];
ftype
[
MAXDATEFIELDS
];
if
(
!
PointerIsValid
(
str
))
if
(
!
PointerIsValid
(
str
))
elog
(
ERROR
,
"Bad (null) abstime external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) abstime external representation"
);
if
(
strlen
(
str
)
>
MAXDATELEN
)
if
(
strlen
(
str
)
>
MAXDATELEN
)
elog
(
ERROR
,
"Bad (length) abstime external representation '%s'"
,
str
);
elog
(
ERROR
,
"Bad (length) abstime external representation '%s'"
,
str
);
...
@@ -552,7 +552,7 @@ abstime_datetime(AbsoluteTime abstime)
...
@@ -552,7 +552,7 @@ abstime_datetime(AbsoluteTime abstime)
DateTime
*
result
;
DateTime
*
result
;
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
DateTime
))))
if
(
!
PointerIsValid
(
result
=
palloc
(
sizeof
(
DateTime
))))
elog
(
ERROR
,
"Unable to allocate space to convert abstime to datetime"
,
NULL
);
elog
(
ERROR
,
"Unable to allocate space to convert abstime to datetime"
);
switch
(
abstime
)
switch
(
abstime
)
{
{
...
...
src/backend/utils/adt/ruleutils.c
View file @
1cd4c141
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* out of its tuple
* out of its tuple
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.3
7 2000/01/05 18:23:50 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.3
8 2000/01/15 02:59:38 petere
Exp $
*
*
* This software is copyrighted by Jan Wieck - Hamburg.
* This software is copyrighted by Jan Wieck - Hamburg.
*
*
...
@@ -411,10 +411,10 @@ pg_get_indexdef(Oid indexrelid)
...
@@ -411,10 +411,10 @@ pg_get_indexdef(Oid indexrelid)
spirc
=
SPI_execp
(
plan_getam
,
spi_args
,
spi_nulls
,
1
);
spirc
=
SPI_execp
(
plan_getam
,
spi_args
,
spi_nulls
,
1
);
if
(
spirc
!=
SPI_OK_SELECT
)
if
(
spirc
!=
SPI_OK_SELECT
)
elog
(
ERROR
,
"failed to get pg_am tuple for index %s"
,
elog
(
ERROR
,
"failed to get pg_am tuple for index %s"
,
idxrelrec
->
relname
);
NameStr
(
idxrelrec
->
relname
)
);
if
(
SPI_processed
!=
1
)
if
(
SPI_processed
!=
1
)
elog
(
ERROR
,
"failed to get pg_am tuple for index %s"
,
elog
(
ERROR
,
"failed to get pg_am tuple for index %s"
,
idxrelrec
->
relname
);
NameStr
(
idxrelrec
->
relname
)
);
spi_tup
=
SPI_tuptable
->
vals
[
0
];
spi_tup
=
SPI_tuptable
->
vals
[
0
];
spi_ttc
=
SPI_tuptable
->
tupdesc
;
spi_ttc
=
SPI_tuptable
->
tupdesc
;
spi_fno
=
SPI_fnumber
(
spi_ttc
,
"amname"
);
spi_fno
=
SPI_fnumber
(
spi_ttc
,
"amname"
);
...
...
src/backend/utils/adt/selfuncs.c
View file @
1cd4c141
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.4
6 2000/01/10 17:14:38 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.4
7 2000/01/15 02:59:38 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -760,7 +760,7 @@ btreesel(Oid operatorObjectId,
...
@@ -760,7 +760,7 @@ btreesel(Oid operatorObjectId,
if
(
!
PointerIsValid
(
result
))
if
(
!
PointerIsValid
(
result
))
elog
(
ERROR
,
"Btree Selectivity: bad pointer"
);
elog
(
ERROR
,
"Btree Selectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ERROR
,
"Btree Selectivity: bad value %
l
f"
,
*
result
);
elog
(
ERROR
,
"Btree Selectivity: bad value %f"
,
*
result
);
return
result
;
return
result
;
}
}
...
@@ -911,7 +911,7 @@ hashsel(Oid operatorObjectId,
...
@@ -911,7 +911,7 @@ hashsel(Oid operatorObjectId,
if
(
!
PointerIsValid
(
result
))
if
(
!
PointerIsValid
(
result
))
elog
(
ERROR
,
"Hash Table Selectivity: bad pointer"
);
elog
(
ERROR
,
"Hash Table Selectivity: bad pointer"
);
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
if
(
*
result
<
0
.
0
||
*
result
>
1
.
0
)
elog
(
ERROR
,
"Hash Table Selectivity: bad value %
l
f"
,
*
result
);
elog
(
ERROR
,
"Hash Table Selectivity: bad value %f"
,
*
result
);
return
result
;
return
result
;
...
...
src/backend/utils/adt/tid.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.1
3 1999/12/20 01:23:04 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.1
4 2000/01/15 02:59:38 petere
Exp $
*
*
* NOTES
* NOTES
* input routine largely stolen from boxin().
* input routine largely stolen from boxin().
...
@@ -200,7 +200,7 @@ currtid_byrelname(const text *relname, ItemPointer tid)
...
@@ -200,7 +200,7 @@ currtid_byrelname(const text *relname, ItemPointer tid)
heap_close
(
rel
,
AccessShareLock
);
heap_close
(
rel
,
AccessShareLock
);
}
}
else
else
elog
(
ERROR
,
"Relation %s not found"
,
relname
);
elog
(
ERROR
,
"Relation %s not found"
,
textout
((
text
*
)
relname
)
);
pfree
(
str
);
pfree
(
str
);
return
result
;
return
result
;
...
...
src/backend/utils/adt/varchar.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.5
5 1999/11/07 23:08:24 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.5
6 2000/01/15 02:59:38 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -83,7 +83,7 @@ bpcharin(char *s, int dummy, int32 atttypmod)
...
@@ -83,7 +83,7 @@ bpcharin(char *s, int dummy, int32 atttypmod)
len
=
atttypmod
-
VARHDRSZ
;
len
=
atttypmod
-
VARHDRSZ
;
if
(
len
>
MaxAttrSize
)
if
(
len
>
MaxAttrSize
)
elog
(
ERROR
,
"bpcharin: length of char() must be less than %d"
,
elog
(
ERROR
,
"bpcharin: length of char() must be less than %
l
d"
,
MaxAttrSize
);
MaxAttrSize
);
result
=
(
char
*
)
palloc
(
atttypmod
);
result
=
(
char
*
)
palloc
(
atttypmod
);
...
@@ -154,7 +154,7 @@ bpchar(char *s, int32 len)
...
@@ -154,7 +154,7 @@ bpchar(char *s, int32 len)
rlen
=
len
-
VARHDRSZ
;
rlen
=
len
-
VARHDRSZ
;
if
(
rlen
>
MaxAttrSize
)
if
(
rlen
>
MaxAttrSize
)
elog
(
ERROR
,
"bpchar: length of char() must be less than %d"
,
elog
(
ERROR
,
"bpchar: length of char() must be less than %
l
d"
,
MaxAttrSize
);
MaxAttrSize
);
#ifdef STRINGDEBUG
#ifdef STRINGDEBUG
...
@@ -336,7 +336,7 @@ varcharin(char *s, int dummy, int32 atttypmod)
...
@@ -336,7 +336,7 @@ varcharin(char *s, int dummy, int32 atttypmod)
len
=
atttypmod
;
/* clip the string at max length */
len
=
atttypmod
;
/* clip the string at max length */
if
(
len
>
MaxAttrSize
)
if
(
len
>
MaxAttrSize
)
elog
(
ERROR
,
"varcharin: length of char() must be less than %d"
,
elog
(
ERROR
,
"varcharin: length of char() must be less than %
l
d"
,
MaxAttrSize
);
MaxAttrSize
);
result
=
(
char
*
)
palloc
(
len
);
result
=
(
char
*
)
palloc
(
len
);
...
@@ -408,7 +408,7 @@ varchar(char *s, int32 slen)
...
@@ -408,7 +408,7 @@ varchar(char *s, int32 slen)
#endif
#endif
if
(
len
>
MaxAttrSize
)
if
(
len
>
MaxAttrSize
)
elog
(
ERROR
,
"varchar: length of varchar() must be less than %d"
,
elog
(
ERROR
,
"varchar: length of varchar() must be less than %
l
d"
,
MaxAttrSize
);
MaxAttrSize
);
result
=
(
char
*
)
palloc
(
slen
);
result
=
(
char
*
)
palloc
(
slen
);
...
@@ -460,7 +460,7 @@ bpcharlen(char *arg)
...
@@ -460,7 +460,7 @@ bpcharlen(char *arg)
#endif
#endif
if
(
!
PointerIsValid
(
arg
))
if
(
!
PointerIsValid
(
arg
))
elog
(
ERROR
,
"Bad (null) char() external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) char() external representation"
);
#ifdef MULTIBYTE
#ifdef MULTIBYTE
l
=
bcTruelen
(
arg
);
l
=
bcTruelen
(
arg
);
len
=
0
;
len
=
0
;
...
@@ -482,7 +482,7 @@ int32
...
@@ -482,7 +482,7 @@ int32
bpcharoctetlen
(
char
*
arg
)
bpcharoctetlen
(
char
*
arg
)
{
{
if
(
!
PointerIsValid
(
arg
))
if
(
!
PointerIsValid
(
arg
))
elog
(
ERROR
,
"Bad (null) char() external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) char() external representation"
);
return
bcTruelen
(
arg
);
return
bcTruelen
(
arg
);
}
}
...
@@ -629,7 +629,7 @@ varcharlen(char *arg)
...
@@ -629,7 +629,7 @@ varcharlen(char *arg)
#endif
#endif
if
(
!
PointerIsValid
(
arg
))
if
(
!
PointerIsValid
(
arg
))
elog
(
ERROR
,
"Bad (null) varchar() external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) varchar() external representation"
);
#ifdef MULTIBYTE
#ifdef MULTIBYTE
len
=
0
;
len
=
0
;
...
@@ -652,7 +652,7 @@ int32
...
@@ -652,7 +652,7 @@ int32
varcharoctetlen
(
char
*
arg
)
varcharoctetlen
(
char
*
arg
)
{
{
if
(
!
PointerIsValid
(
arg
))
if
(
!
PointerIsValid
(
arg
))
elog
(
ERROR
,
"Bad (null) varchar() external representation"
,
NULL
);
elog
(
ERROR
,
"Bad (null) varchar() external representation"
);
return
VARSIZE
(
arg
)
-
VARHDRSZ
;
return
VARSIZE
(
arg
)
-
VARHDRSZ
;
}
}
...
...
src/backend/utils/adt/varlena.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.5
4 1999/11/07 23:08:24 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.5
5 2000/01/15 02:59:38 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -172,6 +172,7 @@ textin(char *inputText)
...
@@ -172,6 +172,7 @@ textin(char *inputText)
* textout - converts internal representation to "..."
* textout - converts internal representation to "..."
*/
*/
char
*
char
*
textout
(
text
*
vlena
)
textout
(
text
*
vlena
)
{
{
int
len
;
int
len
;
...
...
src/backend/utils/cache/relcache.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.8
4 1999/12/30 05:05:11 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.8
5 2000/01/15 02:59:39 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -845,7 +845,7 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo,
...
@@ -845,7 +845,7 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo,
Assert
(
fd
>=
-
1
);
Assert
(
fd
>=
-
1
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
elog
(
NOTICE
,
"RelationIdBuildRelation: smgropen(%s): %m"
,
elog
(
NOTICE
,
"RelationIdBuildRelation: smgropen(%s): %m"
,
&
relp
->
relname
);
NameStr
(
relp
->
relname
)
);
relation
->
rd_fd
=
fd
;
relation
->
rd_fd
=
fd
;
...
...
src/backend/utils/mmgr/portalmem.c
View file @
1cd4c141
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.3
1 1999/12/10 03:56:03 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.3
2 2000/01/15 02:59:40 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -269,7 +269,7 @@ PortalHeapMemoryFree(PortalHeapMemory this,
...
@@ -269,7 +269,7 @@ PortalHeapMemoryFree(PortalHeapMemory this,
else
else
{
{
elog
(
NOTICE
,
elog
(
NOTICE
,
"PortalHeapMemoryFree: 0x%
x
not in alloc set!"
,
"PortalHeapMemoryFree: 0x%
p
not in alloc set!"
,
pointer
);
pointer
);
#ifdef ALLOCFREE_ERROR_ABORT
#ifdef ALLOCFREE_ERROR_ABORT
Assert
(
AllocSetContains
(
&
block
->
setData
,
pointer
));
Assert
(
AllocSetContains
(
&
block
->
setData
,
pointer
));
...
...
src/include/port/linux.h
View file @
1cd4c141
...
@@ -29,7 +29,7 @@ typedef unsigned int slock_t;
...
@@ -29,7 +29,7 @@ typedef unsigned int slock_t;
#endif
#endif
#if (__GLIBC__ >= 2)
#if
defined(__GLIBC__) &&
(__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif
#endif
...
...
src/include/postgres.h
View file @
1cd4c141
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1995, Regents of the University of California
* Copyright (c) 1995, Regents of the University of California
*
*
* $Id: postgres.h,v 1.3
4 2000/01/10 16:13:18 momjian
Exp $
* $Id: postgres.h,v 1.3
5 2000/01/15 02:59:41 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -210,6 +210,7 @@ typedef uint32 CommandId;
...
@@ -210,6 +210,7 @@ typedef uint32 CommandId;
#define CATALOG(x) \
#define CATALOG(x) \
typedef struct CppConcat(FormData_,x)
typedef struct CppConcat(FormData_,x)
/* Huh? */
#define DATA(x) extern int errno
#define DATA(x) extern int errno
#define DESCR(x) extern int errno
#define DESCR(x) extern int errno
#define DECLARE_INDEX(x) extern int errno
#define DECLARE_INDEX(x) extern int errno
...
...
src/include/storage/lock.h
View file @
1cd4c141
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: lock.h,v 1.3
4 1999/09/06 19:37:37 tgl
Exp $
* $Id: lock.h,v 1.3
5 2000/01/15 02:59:42 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -234,7 +234,6 @@ typedef struct LOCK
...
@@ -234,7 +234,6 @@ typedef struct LOCK
#define LockLockTable() SpinAcquire(LockMgrLock);
#define LockLockTable() SpinAcquire(LockMgrLock);
#define UnlockLockTable() SpinRelease(LockMgrLock);
#define UnlockLockTable() SpinRelease(LockMgrLock);
extern
SPINLOCK
LockMgrLock
;
/*
/*
* function prototypes
* function prototypes
...
...
src/include/utils/int8.h
View file @
1cd4c141
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: int8.h,v 1.1
5 2000/01/10 16:13:22 momjian
Exp $
* $Id: int8.h,v 1.1
6 2000/01/15 02:59:43 petere
Exp $
*
*
* NOTES
* NOTES
* These data types are supported on all 64-bit architectures, and may
* These data types are supported on all 64-bit architectures, and may
...
@@ -91,7 +91,7 @@ extern int64 *int48div(int32 val1, int64 *val2);
...
@@ -91,7 +91,7 @@ extern int64 *int48div(int32 val1, int64 *val2);
extern
int64
*
int48
(
int32
val
);
extern
int64
*
int48
(
int32
val
);
extern
int32
int84
(
int64
*
val
);
extern
int32
int84
(
int64
*
val
);
#if NOT_USED
#if
def
NOT_USED
extern
int64
*
int2vector
(
int16
val
);
extern
int64
*
int2vector
(
int16
val
);
extern
int16
int82
(
int64
*
val
);
extern
int16
int82
(
int64
*
val
);
...
...
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