Error message editing in backend/bootstrap, /lib, /nodes, /port.
authorTom Lane <[email protected]>
Tue, 22 Jul 2003 23:30:39 +0000 (23:30 +0000)
committerTom Lane <[email protected]>
Tue, 22 Jul 2003 23:30:39 +0000 (23:30 +0000)
21 files changed:
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootscanner.l
src/backend/bootstrap/bootstrap.c
src/backend/lib/dllist.c
src/backend/nodes/bitmapset.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/list.c
src/backend/nodes/outfuncs.c
src/backend/nodes/print.c
src/backend/nodes/read.c
src/backend/nodes/readfuncs.c
src/backend/port/beos/sem.c
src/backend/port/beos/support.c
src/backend/port/dynloader/bsdi.c
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/ultrix4.c
src/backend/port/ipc_test.c
src/backend/port/posix_sema.c
src/backend/port/sysv_sema.c
src/backend/port/sysv_shmem.c

index 65a7f51a23a0395cd6f67d927ec74c293b093ebd..9988271f0d82b01700b2c486ce10c4e9edb3d1f0 100644 (file)
@@ -155,7 +155,7 @@ Boot_CreateStmt:
                                {
                                        do_start();
                                        numattr = 0;
-                                       elog(DEBUG4, "creating%s%s relation %s...",
+                                       elog(DEBUG4, "creating%s%s relation %s",
                                                 $2 ? " bootstrap" : "",
                                                 $3 ? " shared" : "",
                                                 LexIDStr($5));
@@ -210,9 +210,9 @@ Boot_InsertStmt:
                                {
                                        do_start();
                                        if ($2)
-                                               elog(DEBUG4, "inserting row with oid %u...", $2);
+                                               elog(DEBUG4, "inserting row with oid %u", $2);
                                        else
-                                               elog(DEBUG4, "inserting row...");
+                                               elog(DEBUG4, "inserting row");
                                        num_columns_read = 0;
                                }
                  LPAREN  boot_tuplelist RPAREN
@@ -302,7 +302,7 @@ boot_typelist:
 boot_type_thing:
                  boot_ident EQUALS boot_ident
                                {
-                                  if(++numattr > MAXATTR)
+                                  if (++numattr > MAXATTR)
                                                elog(FATAL, "too many columns");
                                   DefineAttr(LexIDStr($1),LexIDStr($3),numattr-1);
                                }
index 3d5c0986548303e260c91a8d4855dbce924ef3d2..de225977c07e1160fd303fe8384ac95c979f1559 100644 (file)
@@ -129,7 +129,7 @@ insert                      { return(INSERT_TUPLE); }
                                                }
 
 .                              {
-                                       elog(ERROR, "syntax error at line %d: unexpected character %s", yyline, yytext);
+                                       elog(ERROR, "syntax error at line %d: unexpected character \"%s\"", yyline, yytext);
                                }
 
 
@@ -139,5 +139,5 @@ insert                      { return(INSERT_TUPLE); }
 void
 yyerror(const char *str)
 {
-       elog(ERROR, "syntax error at line %d: unexpected token %s", yyline, str);
+       elog(ERROR, "syntax error at line %d: unexpected token \"%s\"", yyline, str);
 }
index 403f26ed2b98aaf5be743d3fdea976e4168bc635..2be5560d9479a6ab54252f47c4091e9693fc2221 100644 (file)
@@ -314,9 +314,15 @@ BootstrapMain(int argc, char *argv[])
                                        if (!value)
                                        {
                                                if (flag == '-')
-                                                       elog(ERROR, "--%s requires argument", optarg);
+                                                       ereport(ERROR,
+                                                                       (errcode(ERRCODE_SYNTAX_ERROR),
+                                                                        errmsg("--%s requires a value",
+                                                                                       optarg)));
                                                else
-                                                       elog(ERROR, "-c %s requires argument", optarg);
+                                                       ereport(ERROR,
+                                                                       (errcode(ERRCODE_SYNTAX_ERROR),
+                                                                        errmsg("-c %s requires a value",
+                                                                                       optarg)));
                                        }
 
                                        SetConfigOption(name, value, PGC_POSTMASTER, PGC_S_ARGV);
@@ -455,7 +461,7 @@ BootstrapMain(int argc, char *argv[])
                        proc_exit(0);           /* done */
 
                default:
-                       elog(PANIC, "Unsupported XLOG op %d", xlogop);
+                       elog(PANIC, "unrecognized XLOG op: %d", xlogop);
                        proc_exit(0);
        }
 
@@ -566,7 +572,8 @@ boot_openrel(char *relname)
        if (boot_reldesc != NULL)
                closerel(NULL);
 
-       elog(DEBUG4, "open relation %s, attrsize %d", relname ? relname : "(null)",
+       elog(DEBUG4, "open relation %s, attrsize %d",
+                relname ? relname : "(null)",
                 (int) ATTRIBUTE_TUPLE_SIZE);
 
        boot_reldesc = heap_openr(relname, NoLock);
@@ -601,11 +608,11 @@ closerel(char *name)
                if (boot_reldesc)
                {
                        if (strcmp(RelationGetRelationName(boot_reldesc), name) != 0)
-                               elog(ERROR, "closerel: close of '%s' when '%s' was expected",
+                               elog(ERROR, "close of %s when %s was expected",
                                         name, relname ? relname : "(null)");
                }
                else
-                       elog(ERROR, "closerel: close of '%s' before any relation was opened",
+                       elog(ERROR, "close of %s before any relation was opened",
                                 name);
        }
 
@@ -637,7 +644,7 @@ DefineAttr(char *name, char *type, int attnum)
 
        if (boot_reldesc != NULL)
        {
-               elog(LOG, "warning: no open relations allowed with 'create' command");
+               elog(WARNING, "no open relations allowed with CREATE command");
                closerel(relname);
        }
 
@@ -770,7 +777,7 @@ InsertOneValue(char *value, int i)
 
        AssertArg(i >= 0 || i < MAXATTR);
 
-       elog(DEBUG4, "inserting column %d value '%s'", i, value);
+       elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
 
        if (Typ != (struct typmap **) NULL)
        {
@@ -783,7 +790,7 @@ InsertOneValue(char *value, int i)
                ap = *app;
                if (ap == NULL)
                {
-                       elog(FATAL, "unable to find atttypid %u in Typ list",
+                       elog(FATAL, "could not find atttypid %u in Typ list",
                                 boot_reldesc->rd_att->attrs[i]->atttypid);
                }
                values[i] = OidFunctionCall3(ap->am_typ.typinput,
@@ -875,7 +882,7 @@ cleanup(void)
                beenhere = 1;
        else
        {
-               elog(FATAL, "Memory manager fault: cleanup called twice");
+               elog(FATAL, "cleanup called twice");
                proc_exit(1);
        }
        if (boot_reldesc != NULL)
@@ -946,7 +953,7 @@ gettype(char *type)
                heap_close(rel, NoLock);
                return gettype(type);
        }
-       elog(ERROR, "Error: unknown type '%s'.\n", type);
+       elog(ERROR, "unrecognized type \"%s\"", type);
        err_out();
        /* not reached, here to make compiler happy */
        return 0;
@@ -962,7 +969,7 @@ AllocateAttribute(void)
        Form_pg_attribute attribute = (Form_pg_attribute) malloc(ATTRIBUTE_TUPLE_SIZE);
 
        if (!PointerIsValid(attribute))
-               elog(FATAL, "AllocateAttribute: malloc failed");
+               elog(FATAL, "out of memory");
        MemSet(attribute, 0, ATTRIBUTE_TUPLE_SIZE);
 
        return attribute;
@@ -1109,14 +1116,8 @@ AddStr(char *str, int strlength, int mderef)
        int                     hashresult;
        int                     len;
 
-       if (++strtable_end == STRTABLESIZE)
-       {
-               /* Error, string table overflow, so we Punt */
-               elog(FATAL,
-                        "There are too many string constants and identifiers for the compiler to handle.");
-
-
-       }
+       if (++strtable_end >= STRTABLESIZE)
+               elog(FATAL, "bootstrap string table overflow");
 
        /*
         * Some of the utilites (eg, define type, create relation) assume that
index 3cdacc24265005a06affd445a21a4ce2bcbc534e..2c9575cd751b80c7ab53fa833aaf5f6160a33381 100644 (file)
@@ -35,10 +35,12 @@ DLNewList(void)
        if (l == NULL)
        {
 #ifdef FRONTEND
-               fprintf(stderr, "Memory exhausted in DLNewList\n");
+               fprintf(stderr, "memory exhausted in DLNewList\n");
                exit(1);
 #else
-               elog(ERROR, "Memory exhausted in DLNewList");
+               ereport(ERROR,
+                               (errcode(ERRCODE_OUT_OF_MEMORY),
+                                errmsg("out of memory")));
 #endif
        }
        l->dll_head = 0;
@@ -78,10 +80,12 @@ DLNewElem(void *val)
        if (e == NULL)
        {
 #ifdef FRONTEND
-               fprintf(stderr, "Memory exhausted in DLNewElem\n");
+               fprintf(stderr, "memory exhausted in DLNewElem\n");
                exit(1);
 #else
-               elog(ERROR, "Memory exhausted in DLNewElem");
+               ereport(ERROR,
+                               (errcode(ERRCODE_OUT_OF_MEMORY),
+                                errmsg("out of memory")));
 #endif
        }
        e->dle_next = 0;
index c0925b3b5155073db4781b6e44a9cf364324b1df..dfd2727fef32fecf7b4f0f36de34ba8d9eeba38c 100644 (file)
@@ -184,7 +184,7 @@ bms_make_singleton(int x)
                                bitnum;
 
        if (x < 0)
-               elog(ERROR, "bms_make_singleton: negative set member not allowed");
+               elog(ERROR, "negative bitmapset member not allowed");
        wordnum = WORDNUM(x);
        bitnum = BITNUM(x);
        result = (Bitmapset *) palloc0(BITMAPSET_SIZE(wordnum + 1));
@@ -354,7 +354,7 @@ bms_is_member(int x, const Bitmapset *a)
 
        /* XXX better to just return false for x<0 ? */
        if (x < 0)
-               elog(ERROR, "bms_is_member: negative set member not allowed");
+               elog(ERROR, "negative bitmapset member not allowed");
        if (a == NULL)
                return false;
        wordnum = WORDNUM(x);
@@ -431,7 +431,7 @@ bms_singleton_member(const Bitmapset *a)
        int             wordnum;
 
        if (a == NULL)
-               elog(ERROR, "bms_singleton_member: set is empty");
+               elog(ERROR, "bitmapset is empty");
        nwords = a->nwords;
        for (wordnum = 0; wordnum < nwords; wordnum++)
        {
@@ -440,7 +440,7 @@ bms_singleton_member(const Bitmapset *a)
                if (w != 0)
                {
                        if (result >= 0 || HAS_MULTIPLE_ONES(w))
-                               elog(ERROR, "bms_singleton_member: set has multiple members");
+                               elog(ERROR, "bitmapset has multiple members");
                        result = wordnum * BITS_PER_BITMAPWORD;
                        while ((w & 255) == 0)
                        {
@@ -451,7 +451,7 @@ bms_singleton_member(const Bitmapset *a)
                }
        }
        if (result < 0)
-               elog(ERROR, "bms_singleton_member: set is empty");
+               elog(ERROR, "bitmapset is empty");
        return result;
 }
 
@@ -558,7 +558,7 @@ bms_add_member(Bitmapset *a, int x)
                                bitnum;
 
        if (x < 0)
-               elog(ERROR, "bms_add_member: negative set member not allowed");
+               elog(ERROR, "negative bitmapset member not allowed");
        if (a == NULL)
                return bms_make_singleton(x);
        wordnum = WORDNUM(x);
@@ -598,7 +598,7 @@ bms_del_member(Bitmapset *a, int x)
                                bitnum;
 
        if (x < 0)
-               elog(ERROR, "bms_del_member: negative set member not allowed");
+               elog(ERROR, "negative bitmapset member not allowed");
        if (a == NULL)
                return NULL;
        wordnum = WORDNUM(x);
index 8617abf7552757a07546c9b01a7f7aa863630982..1f4fa2a6f1108d6c8688dba8a91b1ec5fa8435cb 100644 (file)
@@ -1328,7 +1328,8 @@ _copyAConst(A_Const *from)
                        /* nothing to do */
                        break;
                default:
-                       elog(ERROR, "_copyAConst: unknown node type %d", from->val.type);
+                       elog(ERROR, "unrecognized node type: %d",
+                                (int) from->val.type);
                        break;
        }
 
@@ -2443,7 +2444,8 @@ _copyValue(Value *from)
                        /* nothing to do */
                        break;
                default:
-                       elog(ERROR, "_copyValue: unknown node type %d", from->type);
+                       elog(ERROR, "unrecognized node type: %d",
+                                (int) from->type);
                        break;
        }
        return newnode;
@@ -2966,8 +2968,7 @@ copyObject(void *from)
                        break;
 
                default:
-                       elog(ERROR, "copyObject: don't know how to copy node type %d",
-                                nodeTag(from));
+                       elog(ERROR, "unrecognized node type: %d", (int) nodeTag(from));
                        retval = from;          /* keep compiler quiet */
                        break;
        }
index a0bb58bb5493fba29dd67750319b821b1f81918d..2542431030b9a88d1584a4d6c24fee847db596c2 100644 (file)
@@ -189,7 +189,7 @@ _equalParam(Param *a, Param *b)
                        COMPARE_SCALAR_FIELD(paramid);
                        break;
                default:
-                       elog(ERROR, "_equalParam: Invalid paramkind value: %d",
+                       elog(ERROR, "unrecognized paramkind value: %d",
                                 a->paramkind);
        }
 
@@ -1616,7 +1616,7 @@ _equalValue(Value *a, Value *b)
                        /* nothing to do */
                        break;
                default:
-                       elog(ERROR, "_equalValue: unknown node type %d", a->type);
+                       elog(ERROR, "unrecognized node type: %d", (int) a->type);
                        break;
        }
 
@@ -1630,7 +1630,7 @@ _equalValue(Value *a, Value *b)
 bool
 equal(void *a, void *b)
 {
-       bool            retval = false;
+       bool            retval;
 
        if (a == b)
                return true;
@@ -2081,8 +2081,9 @@ equal(void *a, void *b)
                        break;
 
                default:
-                       elog(WARNING, "equal: don't know whether nodes of type %d are equal",
-                                nodeTag(a));
+                       elog(ERROR, "unrecognized node type: %d",
+                                (int) nodeTag(a));
+                       retval = false;         /* keep compiler quiet */
                        break;
        }
 
index f0ab412d142bb2f459b58fe2cbb2fd5d8f3107c3..89e89dfee0668f621f7d6b14cb4639c5db1be65e 100644 (file)
@@ -186,7 +186,7 @@ nconc(List *l1, List *l2)
        if (l2 == NIL)
                return l1;
        if (l1 == l2)
-               elog(ERROR, "can't nconc a list to itself");
+               elog(ERROR, "cannot nconc a list to itself");
 
        for (temp = l1; lnext(temp) != NIL; temp = lnext(temp))
                ;
@@ -352,7 +352,7 @@ void *
 llast(List *l)
 {
        if (l == NIL)
-               elog(ERROR, "llast: empty list");
+               elog(ERROR, "empty list does not have a last item");
        while (lnext(l) != NIL)
                l = lnext(l);
        return lfirst(l);
index b3752f67f408bd78929be1b753c98f370d66451b..bcbe6b82d7b63444babd192297208603ed48bc1e 100644 (file)
@@ -1322,7 +1322,7 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
                        WRITE_NODE_FIELD(joinaliasvars);
                        break;
                default:
-                       elog(ERROR, "bogus rte kind %d", (int) node->rtekind);
+                       elog(ERROR, "unrecognized rte kind: %d", (int) node->rtekind);
                        break;
        }
 
@@ -1410,8 +1410,7 @@ _outValue(StringInfo str, Value *value)
                        appendStringInfo(str, "%s", value->val.str);
                        break;
                default:
-                       elog(WARNING, "_outValue: don't know how to print type %d",
-                                value->type);
+                       elog(ERROR, "unrecognized node type: %d", (int) value->type);
                        break;
        }
 }
@@ -1821,8 +1820,12 @@ _outNode(StringInfo str, void *obj)
                                break;
 
                        default:
-                               elog(WARNING, "_outNode: don't know how to print type %d",
-                                        nodeTag(obj));
+                               /*
+                                * This should be an ERROR, but it's too useful to be able
+                                * to dump structures that _outNode only understands part of.
+                                */
+                               elog(WARNING, "could not dump unrecognized node type: %d",
+                                        (int) nodeTag(obj));
                                break;
                }
                appendStringInfoChar(str, '}');
index 4633b40273756309ad4e0ceb760dea3b227915ef..77c6eae6d7d2271a500b8d2ed124878f771e97e1 100644 (file)
@@ -82,7 +82,9 @@ elog_node_display(int lev, const char *title, void *obj, bool pretty)
        else
                f = format_node_dump(s);
        pfree(s);
-       elog(lev, "%s:\n%s", title, f);
+       ereport(lev,
+                       (errmsg_internal("%s:", title),
+                        errdetail("%s", f)));
        pfree(f);
 }
 
@@ -350,7 +352,7 @@ print_expr(Node *expr, List *rtable)
                                                                 ObjectIdGetDatum(c->consttype),
                                                                 0, 0, 0);
                if (!HeapTupleIsValid(typeTup))
-                       elog(ERROR, "Cache lookup for type %u failed", c->consttype);
+                       elog(ERROR, "cache lookup failed for type %u", c->consttype);
                typoutput = ((Form_pg_type) GETSTRUCT(typeTup))->typoutput;
                typelem = ((Form_pg_type) GETSTRUCT(typeTup))->typelem;
                ReleaseSysCache(typeTup);
index aadb017da0e0e11360e84642403f068a1b3c00c1..207655f875536e84826fa32f825b01f33b8d93b7 100644 (file)
@@ -293,7 +293,7 @@ nodeRead(bool read_car_only)
                        this_value = parseNodeString();
                        token = pg_strtok(&tok_len);
                        if (token == NULL || token[0] != '}')
-                               elog(ERROR, "nodeRead: did not find '}' at end of node");
+                               elog(ERROR, "did not find '}' at end of input node");
                        if (!read_car_only)
                                make_dotted_pair_cell = true;
                        else
@@ -373,7 +373,7 @@ nodeRead(bool read_car_only)
                                break;
                        }
                default:
-                       elog(ERROR, "nodeRead: Bad type %d", type);
+                       elog(ERROR, "unrecognized node type: %d", (int) type);
                        this_value = NULL;      /* keep compiler happy */
                        break;
        }
index 557474fd172f05866efbf51a6b975c0b8e4c00d6..74dad69e434680ebe3c97fb1787df61972a2913a 100644 (file)
@@ -146,7 +146,7 @@ toIntList(List *list)
                Value      *v = (Value *) lfirst(l);
 
                if (!IsA(v, Integer))
-                       elog(ERROR, "toIntList: unexpected datatype");
+                       elog(ERROR, "unexpected node type: %d", (int) nodeTag(v));
                lfirsti(l) = intVal(v);
                pfree(v);
        }
@@ -180,7 +180,7 @@ toOidList(List *list)
                        pfree(v);
                }
                else
-                       elog(ERROR, "toOidList: unexpected datatype");
+                       elog(ERROR, "unexpected node type: %d", (int) nodeTag(v));
        }
        return list;
 }
@@ -554,7 +554,7 @@ _readBoolExpr(void)
        else if (strncmp(token, "not", 3) == 0)
                local_node->boolop = NOT_EXPR;
        else
-               elog(ERROR, "_readBoolExpr: unknown boolop \"%.*s\"", length, token);
+               elog(ERROR, "unrecognized boolop \"%.*s\"", length, token);
 
        READ_NODE_FIELD(args);
 
@@ -928,7 +928,8 @@ _readRangeTblEntry(void)
                        READ_NODE_FIELD(joinaliasvars);
                        break;
                default:
-                       elog(ERROR, "bogus rte kind %d", (int) local_node->rtekind);
+                       elog(ERROR, "unrecognized RTE kind: %d",
+                                (int) local_node->rtekind);
                        break;
        }
 
@@ -1078,14 +1079,14 @@ readDatum(bool typbyval)
 
        token = pg_strtok(&tokenLength);        /* read the '[' */
        if (token == NULL || token[0] != '[')
-               elog(ERROR, "readDatum: expected '%s', got '%s'; length = %lu",
-                        "[", token ? (const char *) token : "[NULL]",
+               elog(ERROR, "expected \"[\" to start datum, but got \"%s\"; length = %lu",
+                        token ? (const char *) token : "[NULL]",
                         (unsigned long) length);
 
        if (typbyval)
        {
                if (length > (Size) sizeof(Datum))
-                       elog(ERROR, "readDatum: byval & length = %lu",
+                       elog(ERROR, "byval datum but length = %lu",
                                 (unsigned long) length);
                res = (Datum) 0;
                s = (char *) (&res);
@@ -1110,8 +1111,8 @@ readDatum(bool typbyval)
 
        token = pg_strtok(&tokenLength);        /* read the ']' */
        if (token == NULL || token[0] != ']')
-               elog(ERROR, "readDatum: expected '%s', got '%s'; length = %lu",
-                        "]", token ? (const char *) token : "[NULL]",
+               elog(ERROR, "expected \"]\" to end datum, but got \"%s\"; length = %lu",
+                        token ? (const char *) token : "[NULL]",
                         (unsigned long) length);
 
        return res;
index 71598fcc4c0164054aa54efae1920b3d268914f8..06518e7db7db4807142d3c25ba85ab5f44c25321 100644 (file)
@@ -7,13 +7,11 @@
  *
  *-------------------------------------------------------------------------
  */
-
-
 #include "postgres.h"
+
 #include <errno.h>
 #include <unistd.h>
 #include <OS.h>
-#include "utils/elog.h"
 
 /*#define TDBG*/
 #ifdef TDBG
@@ -155,7 +153,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
        {
                /* TO BE IMPLEMENTED */
                TRACEDBG("--semctl getncnt");
-               elog(ERROR, "beos : semctl error : GETNCNT not implemented");
+               elog(ERROR, "semctl error: GETNCNT not implemented");
                return 0;
        }
 
@@ -170,7 +168,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
                return cnt;
        }
 
-       elog(ERROR, "beos : semctl error : unknown flag");
+       elog(ERROR, "semctl error: unknown flag");
 
        TRACEDBG("<-semctl unknown flag");
        return 0;
index fbc431021dbb8e54e193a31365c233f5bfc17020..6a31adad5783ba699f523eea5c618a0655cb47a8 100644 (file)
@@ -42,7 +42,7 @@ beos_dl_open(char *filename)
 
                if ((beos_dl_port_in <= 0) || (beos_dl_port_out <= 0))
                {
-                       elog(WARNING, "Error loading BeOS support server : can't create communication ports");
+                       elog(WARNING, "error loading BeOS support server: could not create communication ports");
                        return B_ERROR;
                }
                else
@@ -68,7 +68,7 @@ beos_dl_open(char *filename)
        /* Checking integrity */
        if (im < 0)
        {
-               elog(WARNING, "Can't load this add-on ");
+               elog(WARNING, "could not load this add-on");
                return B_ERROR;
        }
        else
@@ -92,7 +92,7 @@ beos_dl_open(char *filename)
                        /* Remap */
                        resu = clone_area(datas, &add, B_EXACT_ADDRESS, B_READ_AREA | B_WRITE_AREA, area);
                        if (resu < 0)
-                               elog(WARNING, "Can't load this add-on : map text error");
+                               elog(WARNING, "could not load this add-on: map text error");
                }
 
                /* read text segment id and address */
@@ -108,7 +108,7 @@ beos_dl_open(char *filename)
                        /* Remap */
                        resu = clone_area(datas, &add, B_EXACT_ADDRESS, B_READ_AREA | B_WRITE_AREA, area);
                        if (resu < 0)
-                               elog(WARNING, "Can't load this add-on : map data error");
+                               elog(WARNING, "could not load this add-on: map data error");
                }
 
                return im;
@@ -126,7 +126,7 @@ beos_dl_sym(image_id im, char *symname, void **fptr)
        read_port(beos_dl_port_out, (int32 *) (fptr), NULL, 0);
 
        if (fptr == NULL)
-               elog(WARNING, "loading symbol '%s' failed ", symname);
+               elog(WARNING, "loading symbol \"%s\" failed", symname);
 }
 
 status_t
index 4687e0bf8ea18a4c53aab22bf4dff1b28c2e2756..7c78506e2806a7dc62778fbf6aa3773b545e1d88 100644 (file)
@@ -56,14 +56,14 @@ pg_dlopen(char *filename)
        {
                if (dld_link("/usr/lib/libc.a"))
                {
-                       elog(WARNING, "dld: Cannot link C library!");
+                       elog(WARNING, "could not link C library");
                        return NULL;
                }
                if (dld_undefined_sym_count > 0)
                {
                        if (dld_link("/usr/lib/libm.a"))
                        {
-                               elog(WARNING, "dld: Cannot link math library!");
+                               elog(WARNING, "could not link math library");
                                return NULL;
                        }
                        if (dld_undefined_sym_count > 0)
@@ -72,10 +72,9 @@ pg_dlopen(char *filename)
                                char      **list = dld_list_undefined_sym();
 
                                /* list the undefined symbols, if any */
-                               elog(WARNING, "dld: Undefined:");
                                do
                                {
-                                       elog(WARNING, "  %s", *list);
+                                       elog(WARNING, "\"%s\" is undefined", *list);
                                        list++;
                                        count--;
                                } while (count > 0);
index 8ad11315d09c3e9784a14dcfb3cfe1b425d63903..e14e3af7528cb678779ed3a4075a63840b89f08d 100644 (file)
@@ -68,14 +68,14 @@ pg_dlopen(char *filename)
        {
                if (dld_link("/usr/lib/libc.a"))
                {
-                       elog(WARNING, "dld: Cannot link C library!");
+                       elog(WARNING, "could not link C library");
                        return NULL;
                }
                if (dld_undefined_sym_count > 0)
                {
                        if (dld_link("/usr/lib/libm.a"))
                        {
-                               elog(WARNING, "dld: Cannot link math library!");
+                               elog(WARNING, "could not link math library");
                                return NULL;
                        }
                        if (dld_undefined_sym_count > 0)
@@ -84,10 +84,9 @@ pg_dlopen(char *filename)
                                char      **list = dld_list_undefined_sym();
 
                                /* list the undefined symbols, if any */
-                               elog(WARNING, "dld: Undefined:");
                                do
                                {
-                                       elog(WARNING, "  %s", *list);
+                                       elog(WARNING, "\"%s\" is undefined", *list);
                                        list++;
                                        count--;
                                } while (count > 0);
index d5437df623b64185a6daf827f67667fce042ff6b..d8bb92f2efd89f3eb8a32c7f2ec93a0d2fabcb65 100644 (file)
@@ -55,10 +55,9 @@ pg_dlopen(char *filename)
                /* list the undefined symbols, if any */
                if (count)
                {
-                       elog(WARNING, "dl: Undefined:");
                        while (*list)
                        {
-                               elog(WARNING, "  %s", *list);
+                               elog(WARNING, "\"%s\" is undefined", *list);
                                list++;
                        }
                }
index 8b5fb6cd79eb768385f7704ce68ad28372e5e4ef..5e40ede5febfca0db929b4d1a6ac1e299953cb1e 100644 (file)
@@ -90,7 +90,7 @@ void
                        on_shmem_exit(void (*function) (), Datum arg)
 {
        if (on_shmem_exit_index >= MAX_ON_EXITS)
-               elog(FATAL, "Out of on_shmem_exit slots");
+               elog(FATAL, "out of on_shmem_exit slots");
 
        on_shmem_exit_list[on_shmem_exit_index].function = function;
        on_shmem_exit_list[on_shmem_exit_index].arg = arg;
index ca36d4c1c10774a81ae7dfa19930f3bf85ae5f31..f7fe48cd9355908d7fa9bcd9c03c8b0277c384a9 100644 (file)
@@ -165,7 +165,7 @@ PGReserveSemaphores(int maxSemas, int port)
 {
        mySemPointers = (sem_t **) malloc(maxSemas * sizeof(sem_t *));
        if (mySemPointers == NULL)
-               elog(PANIC, "Out of memory in PGReserveSemaphores");
+               elog(PANIC, "out of memory");
        numSems = 0;
        maxSems = maxSemas;
        nextSemKey = port * 1000;
@@ -202,7 +202,7 @@ PGSemaphoreCreate(PGSemaphore sema)
        Assert(!IsUnderPostmaster);
 
        if (numSems >= maxSems)
-               elog(PANIC, "PGSemaphoreCreate: too many semaphores created");
+               elog(PANIC, "too many semaphores created");
 
 #ifdef USE_NAMED_POSIX_SEMAPHORES
        *sema = newsem = PosixSemaphoreCreate();
index 2c9c782eecc91c279822a8db1de934708ff3f51a..2c03e89602d591016a737a85eca4f403518f4f5f 100644 (file)
@@ -177,7 +177,7 @@ IpcSemaphoreKill(IpcSemaphoreId semId)
                                semId, strerror(errno));
 
        /*
-        * We used to report a failure via elog(WARNING), but that's pretty
+        * We used to report a failure via ereport(WARNING), but that's pretty
         * pointless considering any client has long since disconnected ...
         */
 }
@@ -316,7 +316,7 @@ PGReserveSemaphores(int maxSemas, int port)
        mySemaSets = (IpcSemaphoreId *)
                malloc(maxSemaSets * sizeof(IpcSemaphoreId));
        if (mySemaSets == NULL)
-               elog(PANIC, "Out of memory in PGReserveSemaphores");
+               elog(PANIC, "out of memory");
        numSemaSets = 0;
        nextSemaKey = port * 1000;
        nextSemaNumber = SEMAS_PER_SET;         /* force sema set alloc on 1st
@@ -355,7 +355,7 @@ PGSemaphoreCreate(PGSemaphore sema)
        {
                /* Time to allocate another semaphore set */
                if (numSemaSets >= maxSemaSets)
-                       elog(PANIC, "PGSemaphoreCreate: too many semaphores created");
+                       elog(PANIC, "too many semaphores created");
                mySemaSets[numSemaSets] = IpcSemaphoreCreate(SEMAS_PER_SET);
                numSemaSets++;
                nextSemaNumber = 0;
index 1ff603c5bddc3e550c5e772cb2ba64f1081febc1..1f4a5c887e5e9bcb7d2aed77ec12ac09fc5d1176 100644 (file)
@@ -181,7 +181,7 @@ IpcMemoryDetach(int status, Datum shmaddr)
                                DatumGetPointer(shmaddr), strerror(errno));
 
        /*
-        * We used to report a failure via elog(WARNING), but that's pretty
+        * We used to report a failure via ereport(WARNING), but that's pretty
         * pointless considering any client has long since disconnected ...
         */
 }
@@ -198,7 +198,7 @@ IpcMemoryDelete(int status, Datum shmId)
                                DatumGetInt32(shmId), IPC_RMID, strerror(errno));
 
        /*
-        * We used to report a failure via elog(WARNING), but that's pretty
+        * We used to report a failure via ereport(WARNING), but that's pretty
         * pointless considering any client has long since disconnected ...
         */
 }