Fixed all elog related warnings, as well as a few others.

This commit is contained in:
Peter Eisentraut 2000-01-15 02:59:43 +00:00
parent 7c9390caa1
commit 1cd4c14116
42 changed files with 184 additions and 182 deletions

View File

@ -8,7 +8,7 @@
*
*
* 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
* The old interface functions have been converted to macros
@ -136,8 +136,9 @@ DataFill(char *data,
*((int32 *) value[i]));
break;
default:
memmove(data, DatumGetPointer(value[i]),
att[i]->attlen);
Assert(att[i]->attlen >= 0);
memmove(data, DatumGetPointer(value[i]),
(size_t)(att[i]->attlen));
break;
}
data = (char *) att_addlength((long) data, att[i]->attlen, value[i]);
@ -324,8 +325,8 @@ nocachegetattr(HeapTuple tuple,
Form_pg_attribute *att = tupleDesc->attrs;
int slow = 0; /* do we have to walk nulls? */
#if IN_MACRO
(void)isnull; /*not used*/
#ifdef IN_MACRO
/* This is handled in the macro */
Assert(attnum > 0);
@ -346,7 +347,7 @@ nocachegetattr(HeapTuple tuple,
if (HeapTupleNoNulls(tuple))
{
#if IN_MACRO
#ifdef IN_MACRO
/* This is handled in the macro */
if (att[attnum]->attcacheoff != -1)
{
@ -376,7 +377,7 @@ nocachegetattr(HeapTuple tuple,
* ----------------
*/
#if IN_MACRO
#ifdef IN_MACRO
/* This is handled in the macro */
if (att_isnull(attnum, bp))
{
@ -565,7 +566,7 @@ heap_copytuple(HeapTuple tuple)
newTuple->t_datamcxt = CurrentMemoryContext;
newTuple->t_data = (HeapTupleHeader) ((char *) newTuple + HEAPTUPLESIZE);
memmove((char *) newTuple->t_data,
(char *) tuple->t_data, (int) tuple->t_len);
(char *) tuple->t_data, tuple->t_len);
return newTuple;
}
@ -589,7 +590,7 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
dest->t_datamcxt = CurrentMemoryContext;
dest->t_data = (HeapTupleHeader) palloc(src->t_len);
memmove((char *) dest->t_data,
(char *) src->t_data, (int) src->t_len);
(char *) src->t_data, src->t_len);
return;
}
@ -655,7 +656,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
HeapTuple tuple; /* return tuple */
HeapTupleHeader td; /* tuple data */
int bitmaplen;
long len;
unsigned long len;
int hoff;
bool hasnull = false;
int i;
@ -687,7 +688,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
tuple->t_datamcxt = CurrentMemoryContext;
td = tuple->t_data = (HeapTupleHeader) ((char *) tuple + HEAPTUPLESIZE);
MemSet((char *) td, 0, (int) len);
MemSet((char *) td, 0, len);
tuple->t_len = len;
ItemPointerSetInvalid(&(tuple->t_self));
@ -803,8 +804,6 @@ heap_modifytuple(HeapTuple tuple,
void
heap_freetuple(HeapTuple htup)
{
extern int getpid();
if (htup->t_data != NULL)
if (htup->t_datamcxt != NULL && (char *)(htup->t_data) !=
((char *) htup + HEAPTUPLESIZE))
@ -828,7 +827,7 @@ heap_addheader(uint32 natts, /* max domain index */
{
HeapTuple tuple;
HeapTupleHeader td; /* tuple data */
long len;
unsigned long len;
int hoff;
AssertArg(natts > 0);
@ -841,7 +840,7 @@ heap_addheader(uint32 natts, /* max domain index */
tuple->t_datamcxt = CurrentMemoryContext;
td = tuple->t_data = (HeapTupleHeader) ((char *) tuple + HEAPTUPLESIZE);
MemSet((char *) td, 0, (int) len);
MemSet((char *) td, 0, len);
tuple->t_len = len;
ItemPointerSetInvalid(&(tuple->t_self));
@ -850,7 +849,8 @@ heap_addheader(uint32 natts, /* max domain index */
td->t_infomask = 0;
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;
}

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.40 2000/01/11 03:33:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.41 2000/01/15 02:59:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -63,7 +63,7 @@ index_formtuple(TupleDesc tupleDescriptor,
tp = (char *) palloc(size);
tuple = (IndexTuple) tp;
MemSet(tp, 0, (int) size);
MemSet(tp, 0, size);
DataFill((char *) tp + hoff,
tupleDescriptor,
@ -133,6 +133,7 @@ nocache_index_getattr(IndexTuple tup,
int data_off; /* tuple data offset */
Form_pg_attribute *att = tupleDesc->attrs;
(void)isnull;
/* ----------------
* sanity checks
* ----------------

View File

@ -266,7 +266,7 @@ gistdropscan(IndexScanDesc s)
prev = l;
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)
GISTScans = l->gsl_next;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.20 1999/07/15 23:02:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.21 2000/01/15 02:59:19 petere Exp $
*
* NOTES
* Because we can be doing an index scan on a relation while we
@ -74,7 +74,7 @@ _hash_dropscan(IndexScanDesc scan)
last = chk;
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)
HashScans = chk->hashsl_next;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Id: hio.c,v 1.27 1999/11/29 04:34:55 tgl Exp $
* $Id: hio.c,v 1.28 2000/01/15 02:59:20 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -114,7 +114,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
* this code should go away eventually.
*/
if (len > MaxTupleSize)
elog(ERROR, "Tuple is too big: size %d, max size %d",
elog(ERROR, "Tuple is too big: size %d, max size %ld",
len, MaxTupleSize);
/*

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.38 1999/11/22 17:55:53 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.39 2000/01/15 02:59:21 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -502,8 +502,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
{
if (IsBootstrapProcessingMode())
heap_endscan(scan);
elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu",
(uint32) operatorObjectId);
elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %u",
operatorObjectId);
}
entry->sk_flags = 0;
@ -517,8 +517,8 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
if (!RegProcedureIsValid(entry->sk_procedure))
{
elog(ERROR,
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu",
(uint32) operatorObjectId);
"OperatorObjectIdFillScanKeyEntry: no procedure for operator %u",
operatorObjectId);
}
}

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.52 1999/12/26 03:48:22 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.53 2000/01/15 02:59:23 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -275,7 +275,7 @@ _bt_insertonpg(Relation rel,
* Note that at this point, itemsz doesn't include the ItemId.
*/
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 %ld",
itemsz,
(PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData));

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.28 1999/08/08 20:12:51 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.29 2000/01/15 02:59:23 petere Exp $
*
*
* NOTES
@ -95,7 +95,7 @@ _bt_dropscan(IndexScanDesc scan)
last = chk;
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)
BTScans = chk->btsl_next;

View File

@ -27,7 +27,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.48 2000/01/08 21:24:49 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.49 2000/01/15 02:59:23 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -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.
*/
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 %ld",
btisz,
(PageGetPageSize(npage)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData));

View File

@ -7,7 +7,7 @@
*
*
* 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)
prev = l;
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)
RTScans = l->rtsl_next;

View File

@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.76 2000/01/11 04:00:30 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.77 2000/01/15 02:59:27 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -771,7 +771,7 @@ cleanup()
beenhere = 1;
else
{
elog(FATAL, "Memory manager fault: cleanup called twice.\n", stderr);
elog(FATAL, "Memory manager fault: cleanup called twice.\n");
proc_exit(1);
}
if (reldesc != (Relation) NULL)

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.33 2000/01/13 18:26:04 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.34 2000/01/15 02:59:28 petere Exp $
*
* NOTES
* See acl.h.
@ -264,7 +264,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
*/
if (num < 1)
{
#if ACLDEBUG_TRACE || 1
#if defined(ACLDEBUG_TRACE) || 1
elog(DEBUG, "aclcheck: zero-length ACL, returning 1");
#endif
return ACLCHECK_OK;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.26 1999/11/22 17:55:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.27 2000/01/15 02:59:28 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -29,7 +29,7 @@ char *
relpath(char *relname)
{
char *path;
int bufsize = 0;
size_t bufsize = 0;
if (IsSharedSystemRelationName(relname))
{
@ -156,7 +156,7 @@ fillatt(TupleDesc tupleDesc)
0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
elog(ERROR, "fillatt: unknown atttypid %ld",
elog(ERROR, "fillatt: unknown atttypid %d",
(*attributeP)->atttypid);
}
else

View File

@ -417,7 +417,7 @@ init_sequence(char *caller, char *name)
if (RelationGetRelid(seqrel) != elm->relid)
{
elog(NOTICE, "%s.%s: sequence was re-created",
name, caller, name);
name, caller);
elm->relid = RelationGetRelid(seqrel);
elm->cached = elm->last = elm->increment = 0;
}

View File

@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
* $Id: variable.c,v 1.26 1999/09/27 20:27:03 momjian Exp $
* $Id: variable.c,v 1.27 2000/01/15 02:59:29 petere Exp $
*
*/
@ -523,7 +523,7 @@ reset_timezone()
{
strcpy(tzbuf, "=");
if (putenv(tzbuf) != 0)
elog(ERROR, "Unable to clear TZ environment variable", NULL);
elog(ERROR, "Unable to clear TZ environment variable");
tzset();
}

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.78 2000/01/09 00:26:34 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.79 2000/01/15 02:59:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -168,7 +168,7 @@ create_scan_node(Query *root, Path *best_path, List *tlist)
break;
default:
elog(ERROR, "create_scan_node: unknown node type",
elog(ERROR, "create_scan_node: unknown node type: %d",
best_path->pathtype);
break;
}
@ -234,7 +234,7 @@ create_join_node(Query *root, JoinPath *best_path, List *tlist)
inner_tlist);
break;
default:
elog(ERROR, "create_join_node: unknown node type",
elog(ERROR, "create_join_node: unknown node type: %d",
best_path->path.pathtype);
}

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.43 2000/01/12 00:53:21 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.44 2000/01/15 02:59:31 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -410,7 +410,7 @@ restriction_selectivity(Oid functionObjectId,
elog(ERROR, "restriction_selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
elog(ERROR, "restriction_selectivity: bad value %lf", *result);
elog(ERROR, "restriction_selectivity: bad value %f", *result);
return (Selectivity) *result;
}
@ -446,7 +446,7 @@ join_selectivity(Oid functionObjectId,
elog(ERROR, "join_selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
elog(ERROR, "join_selectivity: bad value %lf", *result);
elog(ERROR, "join_selectivity: bad value %f", *result);
return (Selectivity) *result;
}

View File

@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: analyze.c,v 1.128 2000/01/10 05:20:21 momjian Exp $
* $Id: analyze.c,v 1.129 2000/01/15 02:59:31 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -732,7 +732,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
break;
default:
elog(ERROR, "parser: unrecognized constraint (internal error)", NULL);
elog(ERROR, "parser: unrecognized constraint (internal error)");
break;
}
}
@ -1598,7 +1598,7 @@ transformForUpdate(Query *qry, List *forUpdate)
i++;
}
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;

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.125 2000/01/14 22:11:34 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.126 2000/01/15 02:59:32 petere Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -3622,7 +3622,7 @@ Character: character '(' Iconst ')'
if ($3 < 1)
elog(ERROR,"length for '%s' type must be at least 1",$1);
else if ($3 > MaxAttrSize)
elog(ERROR,"length for type '%s' cannot exceed %d",$1,
elog(ERROR,"length for type '%s' cannot exceed %ld",$1,
MaxAttrSize);
/* we actually implement this sort of like a varlen, so

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.34 1999/12/24 06:43:33 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.35 2000/01/15 02:59:32 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -261,7 +261,7 @@ transformArraySubscripts(ParseState *pstate,
typeelement = type_struct_array->typelem;
if (typeelement == InvalidOid)
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 */
type_tuple = SearchSysCacheTuple(TYPEOID,

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.27 1999/11/22 17:56:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.28 2000/01/15 02:59:32 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -226,7 +226,7 @@ GetArrayElementType(Oid typearray)
if (type_struct_array->typelem == InvalidOid)
{
elog(ERROR, "GetArrayElementType: type %s is not an array",
type_struct_array->typname);
NameStr(type_struct_array->typname));
}
return type_struct_array->typelem;

View File

@ -7,7 +7,7 @@
*
*
* 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()
BufferDesc *buf = &(BufferDescriptors[i - 1]);
elog(NOTICE,
"Buffer Leak: [%03d] (freeNext=%d, freePrev=%d, \
relname=%s, blockNum=%d, flags=0x%x, refcount=%d %d)",
"Buffer Leak: [%03d] (freeNext=%ld, freePrev=%ld, \
relname=%s, blockNum=%d, flags=0x%x, refcount=%d %ld)",
i - 1, buf->freeNext, buf->freePrev,
buf->sb_relname, buf->tag.blockNum, buf->flags,
buf->refcount, PrivateRefCount[i - 1]);
@ -1536,8 +1536,8 @@ PrintBufferDescs()
SpinAcquire(BufMgrLock);
for (i = 0; i < NBuffers; ++i, ++buf)
{
elog(DEBUG, "[%02d] (freeNext=%d, freePrev=%d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)",
elog(DEBUG, "[%02d] (freeNext=%ld, freePrev=%ld, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %ld)",
i, buf->freeNext, buf->freePrev,
buf->sb_relname, buf->tag.blockNum, buf->flags,
buf->refcount, PrivateRefCount[i]);
@ -1566,8 +1566,8 @@ PrintPinnedBufs()
for (i = 0; i < NBuffers; ++i, ++buf)
{
if (PrivateRefCount[i] > 0)
elog(NOTICE, "[%02d] (freeNext=%d, freePrev=%d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)\n",
elog(NOTICE, "[%02d] (freeNext=%ld, freePrev=%ld, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %ld)\n",
i, buf->freeNext, buf->freePrev, buf->sb_relname,
buf->tag.blockNum, buf->flags,
buf->refcount, PrivateRefCount[i]);
@ -1668,7 +1668,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
}
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 (%ld)",
RelationGetRelationName(rel), block,
buf->tag.blockNum, LocalRefCount[i]);
return -2;
@ -1694,7 +1694,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
SpinRelease(BufMgrLock);
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 %ld, global %d), could not flush it",
buf->sb_relname, block, buf->tag.blockNum,
PrivateRefCount[i], buf->refcount);
return -1;
@ -1704,7 +1704,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
else
{
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 %ld, global %d)",
buf->sb_relname, block, buf->tag.blockNum,
PrivateRefCount[i], buf->refcount);
return -1;
@ -1713,7 +1713,7 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
if (!(buf->flags & BM_FREE))
{
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 %ld, global %d)",
buf->sb_relname, block, buf->tag.blockNum,
PrivateRefCount[i], buf->refcount);
return -2;
@ -2091,7 +2091,7 @@ LockBuffer(Buffer buffer, int mode)
BufferLocks[buffer - 1] &= ~BL_W_LOCK;
}
else
elog(ERROR, "UNLockBuffer: buffer %u is not locked", buffer);
elog(ERROR, "UNLockBuffer: buffer %lu is not locked", buffer);
}
else if (mode == BUFFER_LOCK_SHARE)
{

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.43 1999/11/22 02:06:31 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.44 2000/01/15 02:59:34 petere Exp $
*
* NOTES
*
@ -554,7 +554,7 @@ static void
IpcMemoryDetach(int status, char *shmaddr)
{
if (shmdt(shmaddr) < 0)
elog(NOTICE, "IpcMemoryDetach: shmdt(0x%x): %m", shmaddr);
elog(NOTICE, "IpcMemoryDetach: shmdt(0x%p): %m", shmaddr);
}
/****************************************************************************/

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.63 1999/11/28 01:56:48 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.64 2000/01/15 02:59:35 petere Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@ -1362,7 +1362,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
{
/* Should never happen */
elog(NOTICE,
"LockReleaseAll: INVALID PID: [%u] [%d,%d,%d]",
"LockReleaseAll: INVALID PID: [%u] [%ld,%d,%d]",
lock->tag.objId.blkno,
xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
nleft++;

View File

@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.32 1999/07/17 20:17:54 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.33 2000/01/15 02:59:36 petere Exp $
*/
#include <limits.h>
@ -285,7 +285,7 @@ cash_out(Cash *in_value)
if (minus)
{
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 */
if (convention == 0)
@ -298,7 +298,7 @@ cash_out(Cash *in_value)
else
{
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);
}
@ -374,7 +374,7 @@ cash_pl(Cash *c1, Cash *c2)
return NULL;
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);
@ -394,7 +394,7 @@ cash_mi(Cash *c1, Cash *c2)
return NULL;
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);
@ -414,7 +414,7 @@ cash_mul_flt8(Cash *c, float8 *f)
return NULL;
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));
@ -447,7 +447,7 @@ cash_div_flt8(Cash *c, float8 *f)
return NULL;
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)
elog(ERROR, "cash_div: divide by 0.0 error");
@ -469,7 +469,7 @@ cash_mul_flt4(Cash *c, float4 *f)
return NULL;
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));
@ -502,7 +502,7 @@ cash_div_flt4(Cash *c, float4 *f)
return NULL;
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)
elog(ERROR, "cash_div: divide by 0.0 error");
@ -525,7 +525,7 @@ cash_mul_int4(Cash *c, int4 i)
return NULL;
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));
@ -558,7 +558,7 @@ cash_div_int4(Cash *c, int4 i)
return NULL;
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)
elog(ERROR, "cash_idiv: divide by 0 error");
@ -581,7 +581,7 @@ cash_mul_int2(Cash *c, int2 s)
return NULL;
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));
@ -614,7 +614,7 @@ cash_div_int2(Cash *c, int2 s)
return NULL;
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)
elog(ERROR, "cash_div: divide by 0 error");
@ -637,7 +637,7 @@ cashlarger(Cash *c1, Cash *c2)
return NULL;
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);
@ -657,7 +657,7 @@ cashsmaller(Cash *c1, Cash *c2)
return NULL;
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);

View File

@ -9,7 +9,7 @@
*
*
* 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
* This code is actually (almost) unused.
@ -133,7 +133,7 @@ reltimein(char *str)
char lowstr[MAXDATELEN + 1];
if (!PointerIsValid(str))
elog(ERROR, "Bad (null) date external representation", NULL);
elog(ERROR, "Bad (null) date external representation");
if (strlen(str) > MAXDATELEN)
elog(ERROR, "Bad (length) reltime external representation '%s'", str);
@ -362,7 +362,7 @@ reltime_timespan(RelativeTime reltime)
month;
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)
{

View File

@ -7,7 +7,7 @@
*
*
* 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)
char lowstr[MAXDATELEN + 1];
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)
|| (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tzp) != 0))
@ -199,10 +199,10 @@ date_datetime(DateADT dateVal)
result = palloc(sizeof(DateTime));
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)
elog(ERROR, "Datetime out of range", NULL);
elog(ERROR, "Datetime out of range");
return result;
} /* date_datetime() */
@ -222,10 +222,10 @@ datetime_date(DateTime *datetime)
char *tzn;
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))
elog(ERROR, "Unable to convert datetime to date", NULL);
elog(ERROR, "Unable to convert datetime to date");
if (DATETIME_IS_EPOCH(*datetime))
{
@ -240,7 +240,7 @@ datetime_date(DateTime *datetime)
else
{
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));
@ -265,7 +265,7 @@ abstime_date(AbsoluteTime abstime)
case INVALID_ABSTIME:
case NOSTART_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
@ -387,7 +387,7 @@ time_in(char *str)
int ftype[MAXDATEFIELDS];
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)
|| (DecodeTimeOnly(field, ftype, nf, &dtype, tm, &fsec) != 0))
@ -505,10 +505,10 @@ datetime_time(DateTime *datetime)
char *tzn;
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))
elog(ERROR, "Unable to convert datetime to date", NULL);
elog(ERROR, "Unable to convert datetime to date");
if (DATETIME_IS_EPOCH(*datetime))
{
@ -523,7 +523,7 @@ datetime_time(DateTime *datetime)
else
{
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));

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.80 2000/01/04 07:53:27 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.81 2000/01/15 02:59:36 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -114,7 +114,7 @@ datetime_in(char *str)
char lowstr[MAXDATELEN + 1];
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)
|| (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz) != 0))
@ -223,7 +223,7 @@ timespan_in(char *str)
fsec = 0;
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)
|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
@ -270,7 +270,7 @@ timespan_out(TimeSpan *span)
return NULL;
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);
@ -841,7 +841,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
tm->tm_mday = (day_tab[isleap(tm->tm_year)][tm->tm_mon - 1]);
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
@ -1037,7 +1037,7 @@ timespan_div(TimeSpan *span1, float8 *arg2)
return NULL;
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)
elog(ERROR, "timespan_div: divide by 0.0 error");
@ -1164,11 +1164,11 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
}
if (tm2timespan(tm, fsec, result) != 0)
elog(ERROR, "Unable to decode datetime", NULL);
elog(ERROR, "Unable to decode datetime");
}
else
elog(ERROR, "Unable to decode datetime", NULL);
elog(ERROR, "Unable to decode datetime");
return result;
} /* datetime_age() */
@ -1528,7 +1528,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
}
else
{
elog(NOTICE, "Timespan out of range", NULL);
elog(NOTICE, "Timespan out of range");
result = NULL;
}
@ -1547,7 +1547,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
}
else
{
elog(ERROR, "Timespan units '%s' not recognized", units);
elog(ERROR, "Timespan units '%s' not recognized", textout(units));
result = NULL;
}
@ -1688,14 +1688,14 @@ datetime_part(text *units, DateTime *datetime)
case DTK_DOW:
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));
break;
case DTK_DOY:
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)
- date2j(tm->tm_year, 1, 1) + 1);
@ -1754,7 +1754,7 @@ timespan_part(text *units, TimeSpan *timespan)
if (TIMESPAN_IS_INVALID(*timespan))
{
#if NOT_USED
elog(ERROR, "Timespan is not finite", NULL);
elog(ERROR, "Timespan is not finite");
#endif
*result = 0;
@ -1815,14 +1815,14 @@ timespan_part(text *units, TimeSpan *timespan)
break;
default:
elog(ERROR, "Timespan units '%s' not yet supported", units);
elog(ERROR, "Timespan units '%s' not yet supported", textout(units));
result = NULL;
}
}
else
{
elog(NOTICE, "Timespan out of range", NULL);
elog(NOTICE, "Timespan out of range");
*result = 0;
}
@ -1839,7 +1839,7 @@ timespan_part(text *units, TimeSpan *timespan)
}
else
{
elog(ERROR, "Timespan units '%s' not recognized", units);
elog(ERROR, "Timespan units '%s' not recognized", textout(units));
*result = 0;
}
@ -1889,7 +1889,7 @@ datetime_zone(text *zone, DateTime *datetime)
* could return null but Postgres doesn't like that currently. -
* tgl 97/06/12
*/
elog(ERROR, "Datetime is not finite", NULL);
elog(ERROR, "Datetime is not finite");
result = NULL;
}
@ -1902,7 +1902,7 @@ datetime_zone(text *zone, DateTime *datetime)
dt = dt2local(dt, tz);
if (datetime2tm(dt, NULL, tm, &fsec, NULL) != 0)
elog(ERROR, "Datetime not legal", NULL);
elog(ERROR, "Datetime not legal");
up = upzone;
lp = lowzone;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.51 1999/12/20 02:15:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.52 2000/01/15 02:59:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -830,10 +830,10 @@ dtoi4(float64 num)
int32 result;
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))
elog(ERROR, "dtoi4: integer out of range", NULL);
elog(ERROR, "dtoi4: integer out of range");
result = rint(*num);
return result;
@ -849,10 +849,10 @@ dtoi2(float64 num)
int16 result;
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))
elog(ERROR, "dtoi2: integer out of range", NULL);
elog(ERROR, "dtoi2: integer out of range");
result = rint(*num);
return result;
@ -898,10 +898,10 @@ ftoi4(float32 num)
int32 result;
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))
elog(ERROR, "ftoi4: integer out of range", NULL);
elog(ERROR, "ftoi4: integer out of range");
result = rint(*num);
return result;
@ -917,10 +917,10 @@ ftoi2(float32 num)
int16 result;
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))
elog(ERROR, "ftoi2: integer out of range", NULL);
elog(ERROR, "ftoi2: integer out of range");
result = rint(*num);
return result;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.46 1999/12/21 17:01:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.47 2000/01/15 02:59:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -282,7 +282,7 @@ path_encode(bool closed, int npts, Point *pt)
{
*cp++ = LDELIM;
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++ = RDELIM;
*cp++ = DELIM;
@ -352,7 +352,7 @@ box_in(char *str)
y;
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)))
|| (*s != '\0'))
@ -777,7 +777,7 @@ line_in(char *str)
#endif
if (!PointerIsValid(str))
elog(ERROR, " Bad (null) line external representation", NULL);
elog(ERROR, " Bad (null) line external representation");
#ifdef ENABLE_LINE_TYPE
if ((!path_decode(TRUE, 2, str, &isopen, &s, &(lseg.p[0])))
@ -1645,7 +1645,7 @@ lseg_in(char *str)
char *s;
if (!PointerIsValid(str))
elog(ERROR, " Bad (null) lseg external representation", NULL);
elog(ERROR, " Bad (null) lseg external representation");
lseg = palloc(sizeof(LSEG));
@ -2193,7 +2193,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
LSEG seg;
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))
{
@ -2669,7 +2669,7 @@ Point *
close_lb(LINE *line, BOX *box)
{
/* think about this one for a while */
elog(ERROR, "close_lb not implemented", NULL);
elog(ERROR, "close_lb not implemented");
return NULL;
}
@ -2939,7 +2939,7 @@ make_bound_box(POLYGON *poly)
box_fill(&(poly->boundbox), x1, x2, y1, y2);
}
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)
if (!PointerIsValid(path))
return NULL;
elog(ERROR, "path_center not implemented", NULL);
elog(ERROR, "path_center not implemented");
result = palloc(sizeof(Point));
result = NULL;
@ -3559,7 +3559,7 @@ path_poly(PATH *path)
return NULL;
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);
poly = palloc(size);
@ -3598,7 +3598,7 @@ upgradepath(PATH *path)
return NULL;
if (!isoldpath(path))
elog(ERROR, "upgradepath: path already upgraded?", NULL);
elog(ERROR, "upgradepath: path already upgraded?");
npts = (path->npts - 1);
size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * npts);
@ -3862,7 +3862,7 @@ circle_in(char *str)
int depth = 0;
if (!PointerIsValid(str))
elog(ERROR, " Bad (null) circle external representation", NULL);
elog(ERROR, " Bad (null) circle external representation");
circle = palloc(sizeof(CIRCLE));
@ -3927,13 +3927,13 @@ circle_out(CIRCLE *circle)
*cp++ = LDELIM_C;
*cp++ = LDELIM;
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++ = RDELIM;
*cp++ = DELIM;
if (!single_encode(circle->radius, cp))
elog(ERROR, "Unable to format circle", NULL);
elog(ERROR, "Unable to format circle");
cp += strlen(cp);
*cp++ = RDELIM_C;
@ -4395,7 +4395,7 @@ circle_poly(int npts, CIRCLE *circle)
return NULL;
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);
poly = palloc(size);
@ -4431,7 +4431,7 @@ poly_circle(POLYGON *poly)
return NULL;
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));
@ -4452,7 +4452,7 @@ poly_circle(POLYGON *poly)
circle->radius /= poly->npts;
if (FPzero(circle->radius))
elog(ERROR, "Unable to convert polygon to circle", NULL);
elog(ERROR, "Unable to convert polygon to circle");
return circle;
} /* poly_circle() */

View File

@ -4,7 +4,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nabstime.c,v 1.63 2000/01/02 01:37:27 momjian Exp $
* $Id: nabstime.c,v 1.64 2000/01/15 02:59:38 petere Exp $
*
*/
#include <ctype.h>
@ -265,7 +265,7 @@ nabstimein(char *str)
ftype[MAXDATEFIELDS];
if (!PointerIsValid(str))
elog(ERROR, "Bad (null) abstime external representation", NULL);
elog(ERROR, "Bad (null) abstime external representation");
if (strlen(str) > MAXDATELEN)
elog(ERROR, "Bad (length) abstime external representation '%s'", str);
@ -552,7 +552,7 @@ abstime_datetime(AbsoluteTime abstime)
DateTime *result;
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)
{

View File

@ -3,7 +3,7 @@
* out of its tuple
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.37 2000/01/05 18:23:50 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.38 2000/01/15 02:59:38 petere Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@ -411,10 +411,10 @@ pg_get_indexdef(Oid indexrelid)
spirc = SPI_execp(plan_getam, spi_args, spi_nulls, 1);
if (spirc != SPI_OK_SELECT)
elog(ERROR, "failed to get pg_am tuple for index %s",
idxrelrec->relname);
NameStr(idxrelrec->relname));
if (SPI_processed != 1)
elog(ERROR, "failed to get pg_am tuple for index %s",
idxrelrec->relname);
NameStr(idxrelrec->relname));
spi_tup = SPI_tuptable->vals[0];
spi_ttc = SPI_tuptable->tupdesc;
spi_fno = SPI_fnumber(spi_ttc, "amname");

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.46 2000/01/10 17:14:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.47 2000/01/15 02:59:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -760,7 +760,7 @@ btreesel(Oid operatorObjectId,
if (!PointerIsValid(result))
elog(ERROR, "Btree Selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
elog(ERROR, "Btree Selectivity: bad value %lf", *result);
elog(ERROR, "Btree Selectivity: bad value %f", *result);
return result;
}
@ -911,7 +911,7 @@ hashsel(Oid operatorObjectId,
if (!PointerIsValid(result))
elog(ERROR, "Hash Table Selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
elog(ERROR, "Hash Table Selectivity: bad value %lf", *result);
elog(ERROR, "Hash Table Selectivity: bad value %f", *result);
return result;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.13 1999/12/20 01:23:04 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.14 2000/01/15 02:59:38 petere Exp $
*
* NOTES
* input routine largely stolen from boxin().
@ -200,7 +200,7 @@ currtid_byrelname(const text *relname, ItemPointer tid)
heap_close(rel, AccessShareLock);
}
else
elog(ERROR, "Relation %s not found", relname);
elog(ERROR, "Relation %s not found", textout((text *)relname));
pfree(str);
return result;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.55 1999/11/07 23:08:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.56 2000/01/15 02:59:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -83,7 +83,7 @@ bpcharin(char *s, int dummy, int32 atttypmod)
len = atttypmod - VARHDRSZ;
if (len > MaxAttrSize)
elog(ERROR, "bpcharin: length of char() must be less than %d",
elog(ERROR, "bpcharin: length of char() must be less than %ld",
MaxAttrSize);
result = (char *) palloc(atttypmod);
@ -154,7 +154,7 @@ bpchar(char *s, int32 len)
rlen = len - VARHDRSZ;
if (rlen > MaxAttrSize)
elog(ERROR, "bpchar: length of char() must be less than %d",
elog(ERROR, "bpchar: length of char() must be less than %ld",
MaxAttrSize);
#ifdef STRINGDEBUG
@ -336,7 +336,7 @@ varcharin(char *s, int dummy, int32 atttypmod)
len = atttypmod; /* clip the string at max length */
if (len > MaxAttrSize)
elog(ERROR, "varcharin: length of char() must be less than %d",
elog(ERROR, "varcharin: length of char() must be less than %ld",
MaxAttrSize);
result = (char *) palloc(len);
@ -408,7 +408,7 @@ varchar(char *s, int32 slen)
#endif
if (len > MaxAttrSize)
elog(ERROR, "varchar: length of varchar() must be less than %d",
elog(ERROR, "varchar: length of varchar() must be less than %ld",
MaxAttrSize);
result = (char *) palloc(slen);
@ -460,7 +460,7 @@ bpcharlen(char *arg)
#endif
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) char() external representation", NULL);
elog(ERROR, "Bad (null) char() external representation");
#ifdef MULTIBYTE
l = bcTruelen(arg);
len = 0;
@ -482,7 +482,7 @@ int32
bpcharoctetlen(char *arg)
{
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) char() external representation", NULL);
elog(ERROR, "Bad (null) char() external representation");
return bcTruelen(arg);
}
@ -629,7 +629,7 @@ varcharlen(char *arg)
#endif
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) varchar() external representation", NULL);
elog(ERROR, "Bad (null) varchar() external representation");
#ifdef MULTIBYTE
len = 0;
@ -652,7 +652,7 @@ int32
varcharoctetlen(char *arg)
{
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) varchar() external representation", NULL);
elog(ERROR, "Bad (null) varchar() external representation");
return VARSIZE(arg) - VARHDRSZ;
}

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.54 1999/11/07 23:08:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.55 2000/01/15 02:59:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -172,6 +172,7 @@ textin(char *inputText)
* textout - converts internal representation to "..."
*/
char *
textout(text *vlena)
{
int len;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.84 1999/12/30 05:05:11 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.85 2000/01/15 02:59:39 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -845,7 +845,7 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo,
Assert(fd >= -1);
if (fd == -1)
elog(NOTICE, "RelationIdBuildRelation: smgropen(%s): %m",
&relp->relname);
NameStr(relp->relname));
relation->rd_fd = fd;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.31 1999/12/10 03:56:03 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.32 2000/01/15 02:59:40 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -269,7 +269,7 @@ PortalHeapMemoryFree(PortalHeapMemory this,
else
{
elog(NOTICE,
"PortalHeapMemoryFree: 0x%x not in alloc set!",
"PortalHeapMemoryFree: 0x%p not in alloc set!",
pointer);
#ifdef ALLOCFREE_ERROR_ABORT
Assert(AllocSetContains(&block->setData, pointer));

View File

@ -29,7 +29,7 @@ typedef unsigned int slock_t;
#endif
#if (__GLIBC__ >= 2)
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
* $Id: postgres.h,v 1.34 2000/01/10 16:13:18 momjian Exp $
* $Id: postgres.h,v 1.35 2000/01/15 02:59:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -210,6 +210,7 @@ typedef uint32 CommandId;
#define CATALOG(x) \
typedef struct CppConcat(FormData_,x)
/* Huh? */
#define DATA(x) extern int errno
#define DESCR(x) extern int errno
#define DECLARE_INDEX(x) extern int errno

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: lock.h,v 1.34 1999/09/06 19:37:37 tgl Exp $
* $Id: lock.h,v 1.35 2000/01/15 02:59:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -234,7 +234,6 @@ typedef struct LOCK
#define LockLockTable() SpinAcquire(LockMgrLock);
#define UnlockLockTable() SpinRelease(LockMgrLock);
extern SPINLOCK LockMgrLock;
/*
* function prototypes

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: int8.h,v 1.15 2000/01/10 16:13:22 momjian Exp $
* $Id: int8.h,v 1.16 2000/01/15 02:59:43 petere Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
@ -91,7 +91,7 @@ extern int64 *int48div(int32 val1, int64 *val2);
extern int64 *int48(int32 val);
extern int32 int84(int64 *val);
#if NOT_USED
#ifdef NOT_USED
extern int64 *int2vector (int16 val);
extern int16 int82(int64 *val);