*
*
* 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
*((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]);
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);
if (HeapTupleNoNulls(tuple))
{
-#if IN_MACRO
+#ifdef IN_MACRO
/* This is handled in the macro */
if (att[attnum]->attcacheoff != -1)
{
* ----------------
*/
-#if IN_MACRO
+#ifdef IN_MACRO
/* This is handled in the macro */
if (att_isnull(attnum, bp))
{
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;
}
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;
}
HeapTuple tuple; /* return tuple */
HeapTupleHeader td; /* tuple data */
int bitmaplen;
- long len;
+ unsigned long len;
int hoff;
bool hasnull = false;
int i;
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));
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))
{
HeapTuple tuple;
HeapTupleHeader td; /* tuple data */
- long len;
+ unsigned long len;
int hoff;
AssertArg(natts > 0);
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));
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
tp = (char *) palloc(size);
tuple = (IndexTuple) tp;
- MemSet(tp, 0, (int) size);
+ MemSet(tp, 0, size);
DataFill((char *) tp + hoff,
tupleDescriptor,
int data_off; /* tuple data offset */
Form_pg_attribute *att = tupleDesc->attrs;
+ (void)isnull;
/* ----------------
* sanity checks
* ----------------
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;
*
*
* 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
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
/*
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
if (IsBootstrapProcessingMode())
heap_endscan(scan);
- elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %lu",
- (uint32) operatorObjectId);
+ elog(ERROR, "OperatorObjectIdFillScanKeyEntry: unknown operator %u",
+ operatorObjectId);
}
entry->sk_flags = 0;
if (!RegProcedureIsValid(entry->sk_procedure))
{
elog(ERROR,
- "OperatorObjectIdFillScanKeyEntry: no procedure for operator %lu",
- (uint32) operatorObjectId);
+ "OperatorObjectIdFillScanKeyEntry: no procedure for operator %u",
+ operatorObjectId);
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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));
*
*
* 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
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;
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
*
*
* 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.
*/
if (num < 1)
{
-#if ACLDEBUG_TRACE || 1
+#if defined(ACLDEBUG_TRACE) || 1
elog(DEBUG, "aclcheck: zero-length ACL, returning 1");
#endif
return ACLCHECK_OK;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
relpath(char *relname)
{
char *path;
- int bufsize = 0;
+ size_t bufsize = 0;
if (IsSharedSystemRelationName(relname))
{
0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
- elog(ERROR, "fillatt: unknown atttypid %ld",
+ elog(ERROR, "fillatt: unknown atttypid %d",
(*attributeP)->atttypid);
}
else
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;
}
* 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 $
*
*/
{
strcpy(tzbuf, "=");
if (putenv(tzbuf) != 0)
- elog(ERROR, "Unable to clear TZ environment variable", NULL);
+ elog(ERROR, "Unable to clear TZ environment variable");
tzset();
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
break;
default:
- elog(ERROR, "create_scan_node: unknown node type",
+ elog(ERROR, "create_scan_node: unknown node type: %d",
best_path->pathtype);
break;
}
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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;
}
*
* 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 $
*
*-------------------------------------------------------------------------
*/
break;
default:
- elog(ERROR, "parser: unrecognized constraint (internal error)", NULL);
+ elog(ERROR, "parser: unrecognized constraint (internal error)");
break;
}
}
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;
*
*
* 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
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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]);
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]);
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]);
}
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;
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;
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;
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;
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)
{
*
*
* 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
*
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);
}
/****************************************************************************/
*
*
* 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
{
/* 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++;
* 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>
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)
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);
}
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);
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);
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));
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");
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));
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");
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));
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");
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));
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");
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);
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);
*
*
* 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.
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);
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)
{
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
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() */
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))
{
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));
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
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))
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))
{
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));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
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))
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);
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
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");
}
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() */
}
else
{
- elog(NOTICE, "Timespan out of range", NULL);
+ elog(NOTICE, "Timespan out of range");
result = NULL;
}
}
else
{
- elog(ERROR, "Timespan units '%s' not recognized", units);
+ elog(ERROR, "Timespan units '%s' not recognized", textout(units));
result = NULL;
}
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);
if (TIMESPAN_IS_INVALID(*timespan))
{
#if NOT_USED
- elog(ERROR, "Timespan is not finite", NULL);
+ elog(ERROR, "Timespan is not finite");
#endif
*result = 0;
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;
}
}
else
{
- elog(ERROR, "Timespan units '%s' not recognized", units);
+ elog(ERROR, "Timespan units '%s' not recognized", textout(units));
*result = 0;
}
* 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;
}
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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;
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;
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
*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;
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'))
#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])))
char *s;
if (!PointerIsValid(str))
- elog(ERROR, " Bad (null) lseg external representation", NULL);
+ elog(ERROR, " Bad (null) lseg external representation");
lseg = palloc(sizeof(LSEG));
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))
{
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;
}
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");
}
/*------------------------------------------------------------------
if (!PointerIsValid(path))
return NULL;
- elog(ERROR, "path_center not implemented", NULL);
+ elog(ERROR, "path_center not implemented");
result = palloc(sizeof(Point));
result = NULL;
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);
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);
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));
*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;
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);
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));
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() */
*
* 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>
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);
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)
{
* 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.
*
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");
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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;
*
*
* 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().
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
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
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);
#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);
#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;
bpcharoctetlen(char *arg)
{
if (!PointerIsValid(arg))
- elog(ERROR, "Bad (null) char() external representation", NULL);
+ elog(ERROR, "Bad (null) char() external representation");
return bcTruelen(arg);
}
#endif
if (!PointerIsValid(arg))
- elog(ERROR, "Bad (null) varchar() external representation", NULL);
+ elog(ERROR, "Bad (null) varchar() external representation");
#ifdef MULTIBYTE
len = 0;
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* textout - converts internal representation to "..."
*/
char *
+
textout(text *vlena)
{
int len;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
Assert(fd >= -1);
if (fd == -1)
elog(NOTICE, "RelationIdBuildRelation: smgropen(%s): %m",
- &relp->relname);
+ NameStr(relp->relname));
relation->rd_fd = fd;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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));
#endif
-#if (__GLIBC__ >= 2)
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#define LockLockTable() SpinAcquire(LockMgrLock);
#define UnlockLockTable() SpinRelease(LockMgrLock);
-extern SPINLOCK LockMgrLock;
/*
* function prototypes
*
* 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
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);