From 7438af96fa6e13117a031193390a377e0560a01b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 29 Sep 2003 00:05:25 +0000 Subject: [PATCH] More message editing, some suggested by Alvaro Herrera --- src/backend/catalog/index.c | 4 +- src/backend/catalog/pg_proc.c | 4 +- src/backend/commands/dbcommands.c | 4 +- src/backend/commands/functioncmds.c | 9 +--- src/backend/commands/indexcmds.c | 4 +- src/backend/commands/tablecmds.c | 8 +-- src/backend/commands/typecmds.c | 8 +-- src/backend/commands/user.c | 4 +- src/backend/commands/vacuum.c | 4 +- src/backend/parser/parse_coerce.c | 4 +- src/backend/parser/parse_func.c | 4 +- src/backend/port/sysv_shmem.c | 8 +-- src/backend/rewrite/rewriteDefine.c | 4 +- src/backend/storage/freespace/freespace.c | 4 +- src/backend/storage/page/bufpage.c | 4 +- src/backend/tcop/postgres.c | 66 +++++++++++------------ src/backend/utils/adt/formatting.c | 4 +- src/backend/utils/adt/geo_ops.c | 16 +++--- src/backend/utils/adt/mac.c | 4 +- src/backend/utils/adt/nabstime.c | 4 +- src/backend/utils/adt/network.c | 12 ++--- src/backend/utils/adt/numeric.c | 8 +-- src/backend/utils/adt/ri_triggers.c | 4 +- src/backend/utils/adt/timestamp.c | 4 +- src/backend/utils/misc/guc.c | 22 ++++---- src/test/regress/expected/domain.out | 2 +- 26 files changed, 109 insertions(+), 114 deletions(-) diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index d8c2de188a..ccf5224826 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.218 2003/09/25 06:57:57 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.219 2003/09/29 00:05:24 petere Exp $ * * * INTERFACE ROUTINES @@ -1656,7 +1656,7 @@ reindex_index(Oid indexId) if (inplace && IsUnderPostmaster) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("shared index \"%s\" can only be reindexed in standalone mode", + errmsg("shared index \"%s\" can only be reindexed in stand-alone mode", RelationGetRelationName(iRel)))); /* Fetch info needed for index_build */ diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index e28cdbd112..99f07549bd 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.107 2003/09/26 15:27:26 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.108 2003/09/29 00:05:24 petere Exp $ * *------------------------------------------------------------------------- */ @@ -533,7 +533,7 @@ check_sql_fn_retval(Oid rettype, char fn_typtype, List *queryTreeList) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("cannot determine result data type"), - errdetail("A function returning ANYARRAY or ANYELEMENT must have at least one argument of either type."))); + errdetail("A function returning \"anyarray\" or \"anyelement\" must have at least one argument of either type."))); } else ereport(ERROR, diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 4710cec67a..bc34adfcf3 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.123 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.124 2003/09/29 00:05:24 petere Exp $ * *------------------------------------------------------------------------- */ @@ -200,7 +200,7 @@ createdb(const CreatedbStmt *stmt) if (dbpath != NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use an alternate location on this platform"))); + errmsg("cannot use an alternative location on this platform"))); #endif /* diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 5843183512..0dcb16a0d7 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.36 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.37 2003/09/29 00:05:24 petere Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -441,13 +441,8 @@ CreateFunction(CreateFunctionStmt *stmt) errmsg("language \"%s\" does not exist", languageName), (strcmp(languageName, "plperl") == 0 || strcmp(languageName, "plperlu") == 0 || - strcmp(languageName, "plphp") == 0 || strcmp(languageName, "plpgsql") == 0 || - strcmp(languageName, "plpython") == 0 || strcmp(languageName, "plpythonu") == 0 || - strcmp(languageName, "plr") == 0 || - strcmp(languageName, "plruby") == 0 || - strcmp(languageName, "plsh") == 0 || strcmp(languageName, "pltcl") == 0 || strcmp(languageName, "pltclu") == 0) ? errhint("You need to use \"createlang\" to load the language into the database.") : 0)); @@ -948,7 +943,7 @@ CreateCast(CreateCastStmt *stmt) typ1align != typ2align) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("source and target datatypes are not physically compatible"))); + errmsg("source and target data types are not physically compatible"))); } /* convert CoercionContext enum to char value for castcontext */ diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 12ed77f18f..99f3b31971 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.111 2003/09/26 15:27:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.112 2003/09/29 00:05:24 petere Exp $ * *------------------------------------------------------------------------- */ @@ -648,7 +648,7 @@ ReindexTable(RangeVar *relation, bool force /* currently unused */ ) if (((Form_pg_class) GETSTRUCT(tuple))->relisshared && IsUnderPostmaster) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("shared table \"%s\" can only be reindexed in standalone mode", + errmsg("shared table \"%s\" can only be reindexed in stand-alone mode", relation->relname))); ReleaseSysCache(tuple); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index d223a5ba3e..9d0ebbd148 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.83 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.84 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -4075,7 +4075,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) if (shared_relation && IsUnderPostmaster) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("shared relations cannot be toasted after initdb"))); + errmsg("shared tables cannot be toasted after initdb"))); /* * Is it already toasted? @@ -4090,7 +4090,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("relation \"%s\" already has a TOAST table", + errmsg("tables \"%s\" already has a TOAST table", RelationGetRelationName(rel)))); } @@ -4107,7 +4107,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("relation \"%s\" does not need a TOAST table", + errmsg("table \"%s\" does not need a TOAST table", RelationGetRelationName(rel)))); } diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 2c49ad3620..a41ccf5923 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.46 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.47 2003/09/29 00:05:25 petere Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -1554,9 +1554,9 @@ AlterDomainAddConstraint(List *names, Node *newConstraint) if (!isNull && !DatumGetBool(conResult)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("relation \"%s\" column \"%s\" contains values that violate the new constraint", - RelationGetRelationName(testrel), - NameStr(tupdesc->attrs[attnum - 1]->attname)))); + errmsg("column \"%s\" of table \"%s\" contains values that violate the new constraint", + NameStr(tupdesc->attrs[attnum - 1]->attname), + RelationGetRelationName(testrel)))); } ResetExprContext(econtext); diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 6135104360..c6c9b7f9a3 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.126 2003/09/25 06:57:59 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.127 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1227,7 +1227,7 @@ CheckPgUserAclNotNull(void) if (heap_attisnull(htup, Anum_pg_class_relacl)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("before using passwords you must revoke permissions on %s", + errmsg("before using passwords you must revoke privileges on %s", ShadowRelationName), errdetail("This restriction is to prevent unprivileged users from reading the passwords."), errhint("Try REVOKE ALL ON \"%s\" FROM PUBLIC.", diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index b9ca4dfbf9..6359c27531 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.261 2003/09/25 06:57:59 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.262 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2726,7 +2726,7 @@ vacuum_index(VacPageList vacpagelist, Relation indrel, if (stats->num_index_tuples > num_tuples + keep_tuples || !vac_is_partial_index(indrel)) ereport(WARNING, - (errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f tuples", + (errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f row versions", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples + keep_tuples), errhint("Rebuild the index with REINDEX."))); diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index 9d11663a1e..570ddf86ef 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.110 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.111 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -960,7 +960,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared \"anyarray\" is not an array but %s", + errmsg("argument declared \"anyarray\" is not an array but type %s", format_type_be(array_typeid)))); } diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index e3691716f1..a922f5599e 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.160 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.161 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -221,7 +221,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot pass result of subquery or join %s to a function", + errmsg("cannot pass result of subquery or join \"%s\" to a function", relname))); toid = InvalidOid; /* keep compiler quiet */ break; diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index d19020f12c..e72818b11d 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -10,7 +10,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.16 2003/09/26 15:27:35 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.17 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -96,9 +96,9 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size) (errno == EINVAL) ? errhint("This error usually means that PostgreSQL's request for a shared memory " "segment exceeded your kernel's SHMMAX parameter. You can either " - "reduce the request size or reconfigure the kernel with larger SHMMAX. " - "To reduce the request size (currently %u bytes), reduce " - "PostgreSQL's shared_buffers parameter (currently %d) and/or " + "reduce the request size or reconfigure the kernel with larger SHMMAX. " + "To reduce the request size (currently %u bytes), reduce " + "PostgreSQL's shared_buffers parameter (currently %d) and/or " "its max_connections parameter (currently %d).\n" "If the request size is already small, it's possible that it is less than " "your kernel's SHMMIN parameter, in which case raising the request size or " diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 49ca4f7565..08b392ff33 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.89 2003/09/26 15:27:36 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.90 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -262,7 +262,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (length(action) > 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("multiple action rules on select are not implemented"))); + errmsg("multiple actions for rules on SELECT are not implemented"))); /* * ... the one action must be a SELECT, ... diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 818f9acdfe..51f8e4ea5d 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.22 2003/09/25 06:58:02 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.23 2003/09/29 00:05:25 petere Exp $ * * * NOTES: @@ -704,7 +704,7 @@ PrintFreeSpaceMapStatistics(int elevel) ereport(elevel, (errmsg("free space map: %d relations, %d pages stored; %.0f total pages needed", numRels, storedPages, needed), - errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB shared mem.", + errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB shared memory.", MaxFSMRelations, MaxFSMPages, (double) FreeSpaceShmemSize() / 1024.0))); } diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index 1e2e0bcea7..a2365c42be 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.55 2003/08/04 02:40:03 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.56 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -489,7 +489,7 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum) offset != MAXALIGN(offset) || size != MAXALIGN(size)) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("corrupted item pointer: offset = %u size = %u", + errmsg("corrupted item pointer: offset = %u, size = %u", offset, (unsigned int) size))); /* diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index d05380f476..f0c9be20cd 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.366 2003/09/27 09:29:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.367 2003/09/29 00:05:25 petere Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1972,36 +1972,36 @@ ProcessInterrupts(void) static void usage(char *progname) { - printf("%s is the PostgreSQL stand-alone backend. It is not\nintended to be used by normal users.\n\n", progname); + printf(gettext("%s is the PostgreSQL stand-alone backend. It is not\nintended to be used by normal users.\n\n"), progname); - printf("Usage:\n %s [OPTION]... [DBNAME]\n\n", progname); - printf("Options:\n"); + printf(gettext("Usage:\n %s [OPTION]... [DBNAME]\n\n"), progname); + printf(gettext("Options:\n")); #ifdef USE_ASSERT_CHECKING - printf(" -A 1|0 enable/disable run-time assert checking\n"); + printf(gettext(" -A 1|0 enable/disable run-time assert checking\n")); #endif - printf(" -B NBUFFERS number of shared buffers\n"); - printf(" -c NAME=VALUE set run-time parameter\n"); - printf(" -d 0-5 debugging level (0 is off)\n"); - printf(" -D DATADIR database directory\n"); - printf(" -e use European date input format (DMY)\n"); - printf(" -E echo query before execution\n"); - printf(" -F turn fsync off\n"); - printf(" -N do not use newline as interactive query delimiter\n"); - printf(" -o FILENAME send stdout and stderr to given file\n"); - printf(" -P disable system indexes\n"); - printf(" -s show statistics after each query\n"); - printf(" -S SORT-MEM set amount of memory for sorts (in kbytes)\n"); - printf(" --help-config show configuration parameters, then exit;\n" - " details: --help-config -h\n"); - printf(" --help show this help, then exit\n"); - printf(" --version output version information, then exit\n"); - printf("\nDeveloper options:\n"); - printf(" -f s|i|n|m|h forbid use of some plan types\n"); - printf(" -i do not execute queries\n"); - printf(" -O allow system table structure changes\n"); - printf(" -t pa|pl|ex show timings after each query\n"); - printf(" -W NUM wait NUM seconds to allow attach from a debugger\n"); - printf("\nReport bugs to .\n"); + printf(gettext(" -B NBUFFERS number of shared buffers\n")); + printf(gettext(" -c NAME=VALUE set run-time parameter\n")); + printf(gettext(" -d 0-5 debugging level (0 is off)\n")); + printf(gettext(" -D DATADIR database directory\n")); + printf(gettext(" -e use European date input format (DMY)\n")); + printf(gettext(" -E echo query before execution\n")); + printf(gettext(" -F turn fsync off\n")); + printf(gettext(" -N do not use newline as interactive query delimiter\n")); + printf(gettext(" -o FILENAME send stdout and stderr to given file\n")); + printf(gettext(" -P disable system indexes\n")); + printf(gettext(" -s show statistics after each query\n")); + printf(gettext(" -S SORT-MEM set amount of memory for sorts (in kbytes)\n")); + printf(gettext(" --help-config show configuration parameters, then exit;\n" + " details: --help-config -h\n")); + printf(gettext(" --help show this help, then exit\n")); + printf(gettext(" --version output version information, then exit\n")); + printf(gettext("\nDeveloper options:\n")); + printf(gettext(" -f s|i|n|m|h forbid use of some plan types\n")); + printf(gettext(" -i do not execute queries\n")); + printf(gettext(" -O allow system table structure changes\n")); + printf(gettext(" -t pa|pl|ex show timings after each query\n")); + printf(gettext(" -W NUM wait NUM seconds to allow attach from a debugger\n")); + printf(gettext("\nReport bugs to .\n")); } @@ -2475,7 +2475,7 @@ PostgresMain(int argc, char *argv[], const char *username) { ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("query-level statistics are disabled because parser, planner, or executor statistics are on"))); + errmsg("statement-level statistics are disabled because parser, planner, or executor statistics are on"))); SetConfigOption("show_statement_stats", "false", ctx, gucsource); } @@ -2564,8 +2564,8 @@ PostgresMain(int argc, char *argv[], const char *username) { ereport(FATAL, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("invalid backend command-line arguments"), - errhint("Try -? for help."))); + errmsg("invalid command-line arguments for server process"), + errhint("Try \"%s --help\" for more information.", argv[0]))); } BaseInit(); #ifdef EXECBACKEND @@ -2581,7 +2581,7 @@ PostgresMain(int argc, char *argv[], const char *username) (errcode(ERRCODE_SYNTAX_ERROR), errmsg("%s: invalid command-line arguments", argv[0]), - errhint("Try -? for help."))); + errhint("Try \"%s --help\" for more information.", argv[0]))); } else if (argc - optind == 1) dbname = argv[optind]; @@ -2662,7 +2662,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.366 $ $Date: 2003/09/27 09:29:31 $\n"); + puts("$Revision: 1.367 $ $Date: 2003/09/29 00:05:25 $\n"); } /* diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 4407e450f9..727d0f86df 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------- * formatting.c * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.68 2003/09/03 14:59:41 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.69 2003/09/29 00:05:25 petere Exp $ * * * Portions Copyright (c) 1999-2003, PostgreSQL Global Development Group @@ -3163,7 +3163,7 @@ do_to_timestamp(text *date_txt, text *fmt, if (!tm->tm_year) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("cannot convert yday without year information"))); + errmsg("cannot calculate day of year without year information"))); y = ysum[isleap(tm->tm_year)]; diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index d3fe88ad20..0e80190958 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.81 2003/09/25 06:58:03 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.82 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -312,7 +312,7 @@ path_encode(bool closed, int npts, Point *pt) if (!pair_encode(pt->x, pt->y, cp)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not format path"))); + errmsg("could not format \"path\" value"))); cp += strlen(cp); *cp++ = RDELIM; @@ -1386,7 +1386,7 @@ path_recv(PG_FUNCTION_ARGS) if (npts < 0 || npts >= (int32) (INT_MAX / sizeof(Point))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid number of points in external path"))); + errmsg("invalid number of points in external \"path\" value"))); size = offsetof(PATH, p[0]) +sizeof(path->p[0]) * npts; path = (PATH *) palloc(size); @@ -3415,7 +3415,7 @@ poly_recv(PG_FUNCTION_ARGS) if (npts < 0 || npts >= (int32) ((INT_MAX - offsetof(POLYGON, p[0])) / sizeof(Point))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid number of points in external polygon"))); + errmsg("invalid number of points in external \"polygon\" value"))); size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * npts; poly = (POLYGON *) palloc0(size); /* zero any holes */ @@ -4274,7 +4274,7 @@ circle_out(PG_FUNCTION_ARGS) if (!pair_encode(circle->center.x, circle->center.y, cp)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not format circle"))); + errmsg("could not format \"circle\" value"))); cp += strlen(cp); *cp++ = RDELIM; @@ -4282,7 +4282,7 @@ circle_out(PG_FUNCTION_ARGS) if (!single_encode(circle->radius, cp)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not format circle"))); + errmsg("could not format \"circle\" value"))); cp += strlen(cp); *cp++ = RDELIM_C; @@ -4309,7 +4309,7 @@ circle_recv(PG_FUNCTION_ARGS) if (circle->radius < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid radius in external circle"))); + errmsg("invalid radius in external \"circle\" value"))); PG_RETURN_CIRCLE_P(circle); } @@ -4803,7 +4803,7 @@ circle_poly(PG_FUNCTION_ARGS) if (FPzero(circle->radius)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert zero-size circle to polygon"))); + errmsg("cannot convert circle with radius zero to polygon"))); if (npts < 2) ereport(ERROR, diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c index b1372c6a65..745dac0e63 100644 --- a/src/backend/utils/adt/mac.c +++ b/src/backend/utils/adt/mac.c @@ -1,7 +1,7 @@ /* * PostgreSQL type definitions for MAC addresses. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.31 2003/09/25 06:58:04 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.32 2003/09/29 00:05:25 petere Exp $ */ #include "postgres.h" @@ -69,7 +69,7 @@ macaddr_in(PG_FUNCTION_ARGS) (e < 0) || (e > 255) || (f < 0) || (f > 255)) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("invalid octet value in macaddr: \"%s\"", str))); + errmsg("invalid octet value in \"macaddr\" value: \"%s\"", str))); result = (macaddr *) palloc(sizeof(macaddr)); diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 28c144fea5..2e4f80cd72 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.116 2003/09/25 06:58:04 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.117 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -942,7 +942,7 @@ tintervalrecv(PG_FUNCTION_ARGS) interval->status == T_INTERVAL_VALID)) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid status in external tinterval"))); + errmsg("invalid status in external \"tinterval\" value"))); interval->data[0] = pq_getmsgint(buf, sizeof(interval->data[0])); interval->data[1] = pq_getmsgint(buf, sizeof(interval->data[1])); diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index b26931b77c..8d9ea26643 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -1,7 +1,7 @@ /* * PostgreSQL type definitions for the INET and CIDR types. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.46 2003/09/25 06:58:04 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.47 2003/09/29 00:05:25 petere Exp $ * * Jon Postel RIP 16 Oct 1998 */ @@ -191,23 +191,23 @@ inet_recv(PG_FUNCTION_ARGS) ip_family(addr) != PGSQL_AF_INET6) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid family in external inet"))); + errmsg("invalid address family in external \"inet\" value"))); bits = pq_getmsgbyte(buf); if (bits < 0 || bits > ip_maxbits(addr)) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid bits in external inet"))); + errmsg("invalid bits in external \"inet\" value"))); ip_bits(addr) = bits; ip_type(addr) = pq_getmsgbyte(buf); if (ip_type(addr) != 0 && ip_type(addr) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid type in external inet"))); + errmsg("invalid type in external \"inet\" value"))); nb = pq_getmsgbyte(buf); if (nb != ip_addrsize(addr)) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid length in external inet"))); + errmsg("invalid length in external \"inet\" value"))); VARATT_SIZEP(addr) = VARHDRSZ + ((char *) ip_addr(addr) - (char *) VARDATA(addr)) + ip_addrsize(addr); @@ -225,7 +225,7 @@ inet_recv(PG_FUNCTION_ARGS) if (!addressOK(ip_addr(addr), bits, ip_family(addr))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid external cidr value"), + errmsg("invalid external \"cidr\" value"), errdetail("Value has bits set to right of mask."))); } diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 8178ed42fc..f29bbf22b1 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -14,7 +14,7 @@ * Copyright (c) 1998-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.66 2003/09/25 06:58:04 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.67 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -400,7 +400,7 @@ numeric_recv(PG_FUNCTION_ARGS) if (len < 0 || len > NUMERIC_MAX_PRECISION + NUMERIC_MAX_RESULT_SCALE) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid length in external numeric"))); + errmsg("invalid length in external \"numeric\" value"))); alloc_var(&value, len); @@ -411,7 +411,7 @@ numeric_recv(PG_FUNCTION_ARGS) value.sign == NUMERIC_NAN)) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid sign in external numeric"))); + errmsg("invalid sign in external \"numeric\" value"))); value.dscale = (uint16) pq_getmsgint(buf, sizeof(uint16)); for (i = 0; i < len; i++) @@ -421,7 +421,7 @@ numeric_recv(PG_FUNCTION_ARGS) if (d < 0 || d >= NBASE) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid digit in external numeric"))); + errmsg("invalid digit in external \"numeric\" value"))); value.digits[i] = d; } diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index fc91a88cd0..181484b7b2 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -17,7 +17,7 @@ * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.59 2003/09/28 02:11:23 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.60 2003/09/29 00:05:25 petere Exp $ * * ---------- */ @@ -2731,7 +2731,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) errmsg("no target table given for trigger \"%s\" on table \"%s\"", trigdata->tg_trigger->tgname, RelationGetRelationName(trigdata->tg_relation)), - errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); + errhint("Remove this referential integrity trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); } diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 7ac3fc9d81..fec7ae4e81 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.95 2003/09/25 06:58:04 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.96 2003/09/29 00:05:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2853,7 +2853,7 @@ isoweek2date(int woy, int *year, int *mon, int *mday) if (!*year) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot convert week number without year information"))); + errmsg("cannot calculate week number without year information"))); /* fourth day of current year */ day4 = date2j(*year, 1, 4); diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index dbd71dcbca..1b08510492 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.160 2003/09/26 15:27:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.161 2003/09/29 00:05:25 petere Exp $ * *-------------------------------------------------------------------- */ @@ -423,7 +423,7 @@ static struct config_bool ConfigureNamesBool[] = { /* Not for general use --- used by SET SESSION AUTHORIZATION */ {"is_superuser", PGC_INTERNAL, UNGROUPED, - gettext_noop("set to indicate current user's privilege status"), + gettext_noop("shows whether the current user is a superuser"), NULL, GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -473,7 +473,7 @@ static struct config_bool ConfigureNamesBool[] = { {"silent_mode", PGC_POSTMASTER, LOGGING_WHEN, gettext_noop("run the server silently"), - gettext_noop("If this option is set, the server will automatically run in the " + gettext_noop("If this parameter is set, the server will automatically run in the " "background and any controlling terminals are dissociated.") }, &SilentMode, @@ -560,7 +560,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"debug_print_plan", PGC_USERSET, LOGGING_WHAT, - gettext_noop("print execution plan to the server log"), + gettext_noop("print execution plan to server log"), NULL }, &Debug_print_plan, @@ -760,7 +760,7 @@ static struct config_bool ConfigureNamesBool[] = gettext_noop("encrypt passwords"), gettext_noop("When a password is specified in CREATE USER or " "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " - "this option determines whether the password is to be encrypted.") + "this parameter determines whether the password is to be encrypted.") }, &Password_encryption, true, NULL, NULL @@ -890,7 +890,7 @@ static struct config_int ConfigureNamesInt[] = {"geqo_generations", PGC_USERSET, QUERY_TUNING_GEQO, gettext_noop("GEQO: number of iterations in the algorithm"), gettext_noop("The number must be a positive integer. If 0 is " - "specified then effort * log2(poolsize) is used") + "specified then effort * log2(poolsize) is used.") }, &Geqo_generations, 0, 0, INT_MAX, NULL, NULL @@ -909,7 +909,7 @@ static struct config_int ConfigureNamesInt[] = { {"syslog", PGC_SIGHUP, LOGGING_SYSLOG, gettext_noop("use syslog for logging"), - gettext_noop("If this option is 1, messages go both to syslog " + gettext_noop("If this parameter is 1, messages go both to syslog " "and the standard output. A value of 2 sends output only to syslog. " "(Some messages will still go to the standard output/error.) The " "default is 0, which means syslog is off.") @@ -966,7 +966,7 @@ static struct config_int ConfigureNamesInt[] = {"unix_socket_permissions", PGC_POSTMASTER, CONN_AUTH_SETTINGS, gettext_noop("access permissions of the Unix-domain socket"), gettext_noop("Unix-domain sockets use the usual Unix file system " - "permission set. The option value is expected to be an numeric mode " + "permission set. The parameter value is expected to be an numeric mode " "specification in the form accepted by the chmod and umask system " "calls. (To use the customary octal format the number must start with " "a 0 (zero).)") @@ -1094,7 +1094,7 @@ static struct config_int ConfigureNamesInt[] = { {"checkpoint_segments", PGC_SIGHUP, WAL_CHECKPOINTS, - gettext_noop("maximum distance between automatic WAL checkpoints"), + gettext_noop("maximum distance in log segments between automatic WAL checkpoints"), NULL }, &CheckPointSegments, @@ -1114,7 +1114,7 @@ static struct config_int ConfigureNamesInt[] = {"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS, gettext_noop("log if filling of checkpoint segments happens more " "frequently than this (in seconds)"), - gettext_noop("Send a message to the server logs if checkpoints " + gettext_noop("Write a message to the server log if checkpoints " "caused by the filling of checkpoint segment files happens more " "frequently than this number of seconds. Zero turns off the warning.") }, @@ -1348,7 +1348,7 @@ static struct config_string ConfigureNamesString[] = {"dynamic_library_path", PGC_SUSET, CLIENT_CONN_OTHER, gettext_noop("path for dynamically loadable modules"), gettext_noop("If a dynamically loadable module needs to be opened and " - "the specified name does not have a directory component (i.e. the " + "the specified name does not have a directory component (i.e., the " "name does not contain a slash), the system will search this path for " "the specified file.") }, diff --git a/src/test/regress/expected/domain.out b/src/test/regress/expected/domain.out index 0a6fc81c55..87a941e003 100644 --- a/src/test/regress/expected/domain.out +++ b/src/test/regress/expected/domain.out @@ -247,7 +247,7 @@ create table domcontest (col1 con); insert into domcontest values (1); insert into domcontest values (2); alter domain con add constraint t check (VALUE < 1); -- fails -ERROR: relation "domcontest" column "col1" contains values that violate the new constraint +ERROR: column "col1" of table "domcontest" contains values that violate the new constraint alter domain con add constraint t check (VALUE < 34); alter domain con add check (VALUE > 0); insert into domcontest values (-5); -- fails -- 2.40.0