]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fixed all elog related warnings, as well as a few others.
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 15 Jan 2000 02:59:43 +0000 (02:59 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 15 Jan 2000 02:59:43 +0000 (02:59 +0000)
42 files changed:
src/backend/access/common/heaptuple.c
src/backend/access/common/indextuple.c
src/backend/access/gist/gistscan.c
src/backend/access/hash/hashscan.c
src/backend/access/heap/hio.c
src/backend/access/index/istrat.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/rtree/rtscan.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/catalog.c
src/backend/commands/sequence.c
src/backend/commands/variable.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/plancat.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_node.c
src/backend/parser/parse_type.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/ipc/ipc.c
src/backend/storage/lmgr/lock.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/dt.c
src/backend/utils/adt/float.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/tid.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/cache/relcache.c
src/backend/utils/mmgr/portalmem.c
src/include/port/linux.h
src/include/postgres.h
src/include/storage/lock.h
src/include/utils/int8.h

index 469a5ba252aa93c5f1a58f9acc4ae4c457a2d3d6..998ce5a457c6def98e73466976e3f30f7d0a59aa 100644 (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;
 }
index 9a096e8930b4c41ca81ed9aaab291a960e869215..694aeca33fe83c4de3ef2eb34c9a6833449af37d 100644 (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
         * ----------------
index e7a864985a474d4854c8547d68fa7d24d7e1de13..a7d1faf43db1b9ffcf45fda183f9e0415aa54a62 100644 (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;
index d3bd838bc123fc61ee7d7f4026380bf78fe77421..7e7b38c90c94693ce9d5dcbd9c9b6fefffc7e876 100644 (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;
index d21d219c10c9eea4941ba07ee703544d58eeba1e..9edd35e72d0dc0498bf1da9d22bf2c298b8eaf7b 100644 (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);
 
        /*
index ee3477bedc17de2dc0c84ae57511670de00ae4d4..7169e2ec66a64e4454f95bd3be8bd3a5f617c832 100644 (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);
        }
 }
 
index 57c57997e3c7ecb8adc85fefa8a84a9c6e86dc53..dcbac83cf78e64e9fd70ff537198d21df779274f 100644 (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));
 
index f5c1f7b99f8b5dbe847689582207b45a4fa643d8..1b791db633a381521e47911f25ea6f8463b69acd 100644 (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;
index fff65b7d79d514dcb379d48ae9ad0b11c946bdf7..c1f9e5403de4914b3f4ff3fcc93996c6a55c2f5a 100644 (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));
 
index 30bf065d121b9a57367126b117cc9702b0237057..f34bf50ba575a64b755fd1ddc05e206171009d02 100644 (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;
index c07210bc5e6216e7d94bfebbf070b1d8080031b2..8e9f125996df6906c18f54cdd9bbde6ee396120c 100644 (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)
index e5fcf1434c1daca659b8e25c709d9a2118bca59c..b94855328347a0daf329b3cfe1c9109be834670d 100644 (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;
index fc2536f543c75217c3742fa805aff3de35d3d68c..1523786aa99d4cffa83b5a8f078273fa503894d5 100644 (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
index ad81df2316766962128255a0451e1cb12941473f..23280ec5673a21602003aef43c70efc6e8107abb 100644 (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;
                }
index ffbe98b97ff70542a55f0649e5f43f8a3906a983..031512839c244876729f9aa6eded68b151bd45c1 100644 (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();
        }
 
index fc476fe267d87ad48b52f4a213eb44cf10e4ef13..fd87a89968f6b8ca441588df21c610039ca94d05 100644 (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);
        }
 
index fd4913576519e07a4c634018815a1989c9e5b342..6468ef528fdb3fd55b5dece3f793ad033a8eae33 100644 (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;
 }
index 2ac263fb2679bc2eb5c3604703f5f869751c46a5..bf8494c18cbfc84c41f3bc7ec9e2ad5ebe59a5a7 100644 (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;
index 069af39f05f5f478774d5d7a8c9263fc7221eac5..b7e3b6f47a97c6003d312ad2c8ec559ea4e91403 100644 (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
index c660df38261ae59dcf67df27b17035c016af7b9e..544a4462dd1def0a9ca6f667077f9718992dd609 100644 (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,
index d76d573de136b622f7bfe8d08772825e79de1260..1a2693d69f2527bb8c444f6b75d8a9ab317d28fb 100644 (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;
index 292fb728c113e99c1de365c8f3f1aa88ec112a7b..4404aa53d36e9ceb52ccb41816765477d60dff93 100644 (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)
        {
index 5c4dc5052c6234d627c42734d08ee800b89e271e..7676fd20e3d5f0d7852593edc4d98bee66a3b56f 100644 (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);
 }
 
 /****************************************************************************/
index 26849f211b7c907b2aac4ce809e109bd8b40028d..0b898697e482d83b4889fe3e448f8b547680a50a 100644 (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++;
index 0bc44f4b95b93bbf2f0d933eb01b7b30c70a8d0a..1dd31df343898e27b74ee15d2129322fd60d7d30 100644 (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);
 
index 7045b6d209141f244f9e2a2bf7f3ae92a8454ee9..c2144e85430c4e17b59043aa64e9770e5d03fb32 100644 (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)
        {
index 508b2dffb24a2da45db87faf5691183a459de140..2d733ccec560e6a2f95d0b075563c390d5c3c2ab 100644 (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));
index a9ae4eebe379bd784298886e27f22b1f9c2344e0..e633613eca4eb4aa5479b3c7f0506eb3532a9e28 100644 (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;
index 6145ad04614c039777c4529acc08f3252651ec51..1a3eddb9ab2d094b2f8c010388f43443579d8ebf 100644 (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;
index b56b7f5d8da3a4e4b07f6f4316e56a0dbba4c1d9..5fc86c6a62e651455bf66b3374ba92475a649eb4 100644 (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() */
index 1b57d70c91baee0afc35fb2bbd1c187d95138cb4..e2ad623a470b913851a801f2d4ad197180f7cb1a 100644 (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)
        {
index 8e473b558a00dbc5a2f4c0b35e883cb1389fdfbb..496fb94ddc921cd3e02924949594b26645eb7167 100644 (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");
index 5755926e9d88950a2f7bb3555ffdcc8efa9729d1..b711d768c07f7961fc4eba6daeabfedf0c2ddf9c 100644 (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;
 
index dc243205e9199b51d6da938ea8a7ccaff09075d3..25c22cfb8c3505d21a65ea58823ba8b80854c266 100644 (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;
index 9ac113301d715e7a8c7f77c74dd776643b4c8656..c821a35a2df6fa2b60547216cfa5c8a2927c75a6 100644 (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;
 }
 
index 90f898fe971e7cf0e2d55a2d5e448d6ccea86754..aaa0ffd45041a19520193ee96247a4aa61f3a751 100644 (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;
index 7eec36ddb0f2bd77d18ec388c75c688a978f5dab..ed11b77325dea03ee03c8b8867455006cd3515eb 100644 (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;
 
index aaec2dfd65aee60f803b518b24c7effc399dd49b..7d9ceecaae802d569707bb94266535b3e34b3abf 100644 (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));
index 345aac71b1d5b494de886ce7ab7231ed73978f2d..b2b4545a2ab0da1492241a1bed0e005c04ba9327 100644 (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
index 455b8f23294fb2df2805cfaed46a706b93170b33..d857613daf17e5a86cb5bee9805291181450c249 100644 (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
index 8f0f834e0f4ff11147a606f7a5b40d1abd22e593..a8ad7e978d8a2413a0b2dded72bebc6141c4be96 100644 (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
index b55cecf84719907717d528d91c0d596ac6a4a3f5..89d328af21d4007c12e49e357b36fdf285a0a71d 100644 (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);