Make some messages more consistent
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 31 May 2007 15:13:06 +0000 (15:13 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 31 May 2007 15:13:06 +0000 (15:13 +0000)
contrib/pg_standby/pg_standby.c
src/backend/access/transam/xlog.c
src/backend/commands/tablespace.c
src/bin/initdb/initdb.c
src/bin/pg_config/pg_config.c
src/bin/pg_ctl/pg_ctl.c
src/interfaces/ecpg/ecpglib/error.c
src/pl/plpython/plpython.c
src/test/regress/pg_regress.c
src/timezone/pgtz.c

index 83a7cee8678a738f8cee923631d097c0908c6ac3..de3ad5ed2e43dcde3fcb894c3b8d9361b4c276ad 100644 (file)
@@ -270,7 +270,7 @@ CustomizableCleanupPriorWALFiles(void)
 
                                        rc = unlink(WALFilePath);
                                        if (rc !=0 )
-                                               fprintf(stderr, "\npg_standby: ERROR failed to remove \"%s\" because %s\n", WALFilePath,  strerror(errno));
+                                               fprintf(stderr, "\npg_standby: ERROR failed to remove \"%s\": %s\n", WALFilePath,  strerror(errno));
 
 
                                }
@@ -320,7 +320,7 @@ CheckForExternalTrigger(void)
                rc = unlink(triggerPath);
                if (rc != 0)
                {
-                       fprintf(stderr, "\n ERROR: unable to remove \"%s\", because %s", triggerPath, strerror(errno));
+                       fprintf(stderr, "\n ERROR: could not remove \"%s\": %s", triggerPath, strerror(errno));
                        fflush(stderr);
                        exit(rc);
                }
index 7a4866a8d9999223de250eb3d459179e629c71c4..680730a1124a99d5cb98e328acf1192ff8ed7018 100644 (file)
@@ -2933,7 +2933,7 @@ ReadRecord(XLogRecPtr *RecPtr, int emode)
                {
                        ereport(emode,
                                        (errcode_for_file_access(),
-                                        errmsg("could not read from log file %u, segment %u at offset %u: %m",
+                                        errmsg("could not read from log file %u, segment %u, offset %u: %m",
                                                        readId, readSeg, readOff)));
                        goto next_record_is_invalid;
                }
index 55b11b3486f334989657d0c20328be6a36ed8d20..80dc51d55be7b9bcb943bbae1fb58b139df0667f 100644 (file)
@@ -570,7 +570,7 @@ remove_tablespace_directories(Oid tablespaceoid, bool redo)
                if (rmdir(subfile) < 0)
                        ereport(ERROR,
                                        (errcode_for_file_access(),
-                                        errmsg("could not delete directory \"%s\": %m",
+                                        errmsg("could not remove directory \"%s\": %m",
                                                        subfile)));
 
                pfree(subfile);
index f96db5f408c3a89b76e8dc36364bc52254e30df3..71e3b4588dfcbbc66b75efa018b8f44737a25c50 100644 (file)
@@ -2328,7 +2328,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION * processInfo)
 
        if (_CreateRestrictedToken == NULL)
        {
-               fprintf(stderr, "WARNING: Unable to create restricted tokens on this platform\n");
+               fprintf(stderr, "WARNING: cannot create restricted tokens on this platform\n");
                if (Advapi32Handle != NULL)
                        FreeLibrary(Advapi32Handle);
                return 0;
@@ -3005,7 +3005,7 @@ main(int argc, char *argv[])
                        exit_nicely();
                }
 #else
-               fprintf(stderr, _("%s: symlinks are not supported on this plataform"));
+               fprintf(stderr, _("%s: symlinks are not supported on this platform"));
                exit_nicely();
 #endif
        }
index e95cb23de028703566448f8c185f3c2050636465..06465bd3f14137694159c85a91c77edc7a1df3b8 100644 (file)
@@ -469,7 +469,7 @@ main(int argc, char **argv)
 
        if (ret)
        {
-               fprintf(stderr, _("%s: could not find own executable\n"), progname);
+               fprintf(stderr, _("%s: could not find own program executable\n"), progname);
                exit(1);
        }
 
index 59bddc6bcee9f166d738c8a40315a5bc80db82c5..5d020432e954541e215ca7e96599858a81976db0 100644 (file)
@@ -1257,7 +1257,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION * processInfo)
                 * NT4 doesn't have CreateRestrictedToken, so just call ordinary
                 * CreateProcess
                 */
-               write_stderr("WARNING: Unable to create restricted tokens on this platform\n");
+               write_stderr("WARNING: cannot create restricted tokens on this platform\n");
                if (Advapi32Handle != NULL)
                        FreeLibrary(Advapi32Handle);
                return CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, processInfo);
@@ -1332,7 +1332,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION * processInfo)
                         * Log error if we can't get version, or if we're on WinXP/2003 or
                         * newer
                         */
-                       write_stderr("WARNING: Unable to locate all job object functions in system API!\n");
+                       write_stderr("WARNING: could not locate all job object functions in system API\n");
        }
        else
        {
index c7c564ca06329de9c694c0f05806ac501d0b25cd..bee0fcfec614c75ae81e82503ac049b1d62a8d18 100644 (file)
@@ -62,7 +62,7 @@ ECPGraise(int line, int code, const char *sqlstate, const char *str)
 
                case ECPG_CONVERT_BOOL:
                        snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
-                                        "Unable to convert %s to bool on line %d.", str, line);
+                                        "Could not convert %s to bool on line %d.", str, line);
                        break;
 
                case ECPG_EMPTY:
index 2411f50803b6039d4c82d6f1ac9aae6e7cb1a376..b9a80aa11415438df76907e60f5ec4d282d28302 100644 (file)
@@ -484,7 +484,7 @@ PLy_modify_tuple(PLyProcedure * proc, PyObject * pltd, TriggerData *tdata,
        PG_TRY();
        {
                if ((plntup = PyDict_GetItemString(pltd, "new")) == NULL)
-                       elog(ERROR, "TD[\"new\"] deleted, unable to modify tuple");
+                       elog(ERROR, "TD[\"new\"] deleted, cannot modify tuple");
                if (!PyDict_Check(plntup))
                        elog(ERROR, "TD[\"new\"] is not a dictionary object");
                Py_INCREF(plntup);
@@ -2822,7 +2822,7 @@ PLy_output(volatile int level, PyObject * self, PyObject * args)
        if (so == NULL || ((sv = PyString_AsString(so)) == NULL))
        {
                level = ERROR;
-               sv = "Unable to parse error message in `plpy.elog'";
+               sv = "could not parse error message in `plpy.elog'";
        }
 
        oldcontext = CurrentMemoryContext;
index f9085758bf355bb06de035777dd0980997ff23ea..645900d4061e31892c9cbc52b182635dc912aef6 100644 (file)
@@ -886,14 +886,14 @@ spawn_process(const char *cmdline)
    {
       if (Advapi32Handle != NULL)
        FreeLibrary(Advapi32Handle);
-      fprintf(stderr, "ERROR: Unable to create restricted tokens on this platform\n");
+      fprintf(stderr, "ERROR: cannot create restricted tokens on this platform\n");
       exit_nicely(2);
    }
 
    /* Open the current token to use as base for the restricted one */
    if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken))
    {
-      fprintf(stderr, "Failed to open process token: %lu\n", GetLastError());
+      fprintf(stderr, "could not open process token: %lu\n", GetLastError());
       exit_nicely(2);
    }
 
@@ -904,7 +904,7 @@ spawn_process(const char *cmdline)
                 !AllocateAndInitializeSid(&NtAuthority, 2,
                   SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, 0, &dropSids[1].Sid))
    {
-      fprintf(stderr, "Failed to allocate SIDs: %lu\n", GetLastError());
+      fprintf(stderr, "could not allocate SIDs: %lu\n", GetLastError());
       exit_nicely(2);
    }
        
@@ -923,7 +923,7 @@ spawn_process(const char *cmdline)
    
    if (!b)
    {
-      fprintf(stderr, "Failed to create restricted token: %lu\n", GetLastError());
+      fprintf(stderr, "could not create restricted token: %lu\n", GetLastError());
       exit_nicely(2);
    }
 
index 0828ddac8bb6e6aff21f0505468552da36193c9a..49a583dfd2a2e7b01fc973a484da2a8a39846554 100644 (file)
@@ -455,7 +455,7 @@ identify_system_timezone(void)
        if (std_zone_name[0] == '\0')
        {
                ereport(LOG,
-                               (errmsg("unable to determine system timezone, defaulting to \"%s\"", "GMT"),
+                               (errmsg("could not determine system time zone, defaulting to \"%s\"", "GMT"),
                errhint("You can specify the correct timezone in postgresql.conf.")));
                return NULL;                    /* go to GMT */
        }