From d84b6ef56be10d0c24859d38fcc4fa99cb1f43e2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 26 Sep 2003 15:27:37 +0000 Subject: [PATCH] Various message fixes, among those fixes for the previous round of fixes --- src/backend/access/transam/xlog.c | 6 +++--- src/backend/catalog/pg_proc.c | 4 ++-- src/backend/commands/indexcmds.c | 4 ++-- src/backend/commands/opclasscmds.c | 6 +++--- src/backend/libpq/auth.c | 4 ++-- src/backend/libpq/be-secure.c | 8 +++++--- src/backend/parser/analyze.c | 4 ++-- src/backend/parser/gram.y | 6 +++--- src/backend/parser/parse_clause.c | 6 +++--- src/backend/parser/parse_expr.c | 8 ++++---- src/backend/port/sysv_sema.c | 4 ++-- src/backend/port/sysv_shmem.c | 4 ++-- src/backend/postmaster/postmaster.c | 4 ++-- src/backend/rewrite/rewriteDefine.c | 6 +++--- src/backend/utils/adt/ascii.c | 4 ++-- src/backend/utils/adt/date.c | 4 ++-- src/backend/utils/init/miscinit.c | 4 ++-- src/backend/utils/misc/guc.c | 4 ++-- 18 files changed, 46 insertions(+), 44 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 32e7672945..282ea7058d 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,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/access/transam/xlog.c,v 1.123 2003/09/25 06:57:57 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.124 2003/09/26 15:27:19 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1962,7 +1962,7 @@ got_record:; { ereport(emode, (errcode_for_file_access(), - errmsg("could not read log file %u, segment %u, offset %u: %m", + errmsg("could not from read log file %u, segment %u, offset %u: %m", readId, readSeg, readOff))); goto next_record_is_invalid; } @@ -2197,7 +2197,7 @@ WriteControlFile(void) if (pg_fsync(fd) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not fsync of control file: %m"))); + errmsg("could not fsync control file: %m"))); close(fd); } diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index 0734e479fc..e28cdbd112 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.106 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.107 2003/09/26 15:27:26 petere Exp $ * *------------------------------------------------------------------------- */ @@ -532,7 +532,7 @@ check_sql_fn_retval(Oid rettype, char fn_typtype, List *queryTreeList) /* This should already have been caught ... */ ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("cannot determine result datatype"), + errmsg("cannot determine result data type"), errdetail("A function returning ANYARRAY or ANYELEMENT must have at least one argument of either type."))); } else diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 8ded744b67..12ed77f18f 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.110 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.111 2003/09/26 15:27:31 petere Exp $ * *------------------------------------------------------------------------- */ @@ -168,7 +168,7 @@ DefineIndex(RangeVar *heapRelation, if (length(rangetable) != 1 || getrelid(1, rangetable) != relationId) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("index expressions and predicates may refer only to the base relation"))); + errmsg("index expressions and predicates may refer only to the table being indexed"))); } /* diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index abccad1078..c183d7ad5b 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.20 2003/09/25 06:57:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.21 2003/09/26 15:27:31 petere Exp $ * *------------------------------------------------------------------------- */ @@ -284,10 +284,10 @@ DefineOpClass(CreateOpClassStmt *stmt) if (opclass->opcintype == typeoid && opclass->opcdefault) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("could not make class \"%s\" be default for type %s", + errmsg("could not make operator class \"%s\" be default for type %s", opcname, TypeNameToString(stmt->datatype)), - errdetail("Class \"%s\" already is the default.", + errdetail("Operator class \"%s\" already is the default.", NameStr(opclass->opcname)))); } diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index dca08a3493..65b1da6328 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.111 2003/09/25 06:57:59 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.112 2003/09/26 15:27:31 petere Exp $ * *------------------------------------------------------------------------- */ @@ -492,7 +492,7 @@ ClientAuthentication(Port *port) if (setsockopt(port->sock, 0, LOCAL_CREDS, &on, sizeof(on)) < 0) ereport(FATAL, (errcode_for_socket_access(), - errmsg("failed to enable credential receipt: %m"))); + errmsg("could not enable credential reception: %m"))); } #endif if (port->raddr.addr.ss_family == AF_UNIX) diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 216cf505b9..1e69f14fd4 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.42 2003/09/25 06:57:59 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.43 2003/09/26 15:27:31 petere Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -293,7 +293,8 @@ rloop: default: ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("unrecognized SSL error code"))); + errmsg("unrecognized SSL error code %d", + SSL_get_error(port->ssl, n)))); n = -1; break; } @@ -377,7 +378,8 @@ wloop: default: ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("unrecognized SSL error code"))); + errmsg("unrecognized SSL error code %d", + SSL_get_error(port->ssl, n)))); n = -1; break; } diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 37f543c1ea..4d1cd28f12 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.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/parser/analyze.c,v 1.288 2003/09/25 06:58:00 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.289 2003/09/26 15:27:32 petere Exp $ * *------------------------------------------------------------------------- */ @@ -3029,7 +3029,7 @@ transformConstraintAttrs(List *constraintList) else if (!((FkConstraint *) lastprimarynode)->deferrable) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("INITIALLY DEFERRED constraint must be DEFERRABLE"))); + errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); break; case CONSTR_ATTR_IMMEDIATE: if (lastprimarynode == NULL || diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 914b715040..9e72f3bcd3 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.434 2003/09/25 06:58:00 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.435 2003/09/26 15:27:32 petere Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -2190,7 +2190,7 @@ ConstraintAttributeSpec: if ($1 == 0 && $2 != 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("INITIALLY DEFERRED constraint must be DEFERRABLE"))); + errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); $$ = $1 | $2; } | ConstraintTimeSpec @@ -2205,7 +2205,7 @@ ConstraintAttributeSpec: if ($2 == 0 && $1 != 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("INITIALLY DEFERRED constraint must be DEFERRABLE"))); + errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); $$ = $1 | $2; } | /*EMPTY*/ diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index ac5543735e..20937ad2b6 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.123 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.124 2003/09/26 15:27:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -749,7 +749,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels) if (l_index < 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" specified in USING clause not found in left table", + errmsg("column \"%s\" specified in USING clause does not exist in left table", u_colname))); /* Find it in right input */ @@ -772,7 +772,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels) if (r_index < 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" specified in USING clause not found in right table", + errmsg("column \"%s\" specified in USING clause does not exist in right table", u_colname))); l_colvar = nth(l_index, l_colvars); diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 88768b3b4e..b5d23fadfe 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.162 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.163 2003/09/26 15:27:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -601,17 +601,17 @@ transformExpr(ParseState *pstate, Node *expr) if (opform->oprresult != BOOLOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("operator %s must return boolean, not type %s", + errmsg("operator %s must return type boolean, not type %s", opname, format_type_be(opform->oprresult)), - errhint("The operator of a quantified predicate subquery must return boolean."))); + errhint("The operator of a quantified predicate subquery must return type boolean."))); if (get_func_retset(opform->oprcode)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("operator %s must not return a set", opname), - errhint("The operator of a quantified predicate subquery must return boolean."))); + errhint("The operator of a quantified predicate subquery must return type boolean."))); sublink->operOids = lappendo(sublink->operOids, oprid(optup)); diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 41963d6582..4adba6d3b8 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.9 2003/08/04 02:40:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.10 2003/09/26 15:27:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -115,7 +115,7 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey, int numSems) */ ereport(FATAL, (errmsg("could not create semaphores: %m"), - errdetail("Failed syscall was semget(%d, %d, 0%o).", + errdetail("Failed system call was semget(%d, %d, 0%o).", (int) semKey, numSems, IPC_CREAT | IPC_EXCL | IPCProtection), (errno == ENOSPC) ? diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 04fd98dc1b..d19020f12c 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.15 2003/08/04 02:40:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.16 2003/09/26 15:27:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -90,7 +90,7 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size) */ ereport(FATAL, (errmsg("could not create shared memory segment: %m"), - errdetail("Failed syscall was shmget(key=%d, size=%u, 0%o).", + errdetail("Failed system call was shmget(key=%d, size=%u, 0%o).", (int) memKey, size, IPC_CREAT | IPC_EXCL | IPCProtection), (errno == EINVAL) ? diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 9907cb3a8a..26cf8f9633 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.346 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.347 2003/09/26 15:27:35 petere Exp $ * * NOTES * @@ -977,7 +977,7 @@ usage(const char *progname) printf(gettext(" -l enable SSL connections\n")); #endif printf(gettext(" -N MAX-CONNECT maximum number of allowed connections\n")); - printf(gettext(" -o OPTIONS pass 'OPTIONS' to each backend server\n")); + printf(gettext(" -o OPTIONS pass \"OPTIONS\" to each server process\n")); printf(gettext(" -p PORT port number to listen on\n")); printf(gettext(" -S silent mode (start in background without logging output)\n")); printf(gettext(" --help show this help, then exit\n")); diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index dfe693134b..49ca4f7565 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.88 2003/09/25 06:58:01 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.89 2003/09/26 15:27:36 petere Exp $ * *------------------------------------------------------------------------- */ @@ -253,7 +253,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (length(action) == 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("INSTEAD NOTHING rules on select are not implemented"), + errmsg("INSTEAD NOTHING rules on SELECT are not implemented"), errhint("Use views instead."))); /* @@ -271,7 +271,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (!is_instead || query->commandType != CMD_SELECT) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("rules on SELECT rule must have action INSTEAD SELECT"))); + errmsg("rules on SELECT must have action INSTEAD SELECT"))); /* * ... there can be no rule qual, ... diff --git a/src/backend/utils/adt/ascii.c b/src/backend/utils/adt/ascii.c index 30014011ee..7742a085d7 100644 --- a/src/backend/utils/adt/ascii.c +++ b/src/backend/utils/adt/ascii.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1999-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ascii.c,v 1.18 2003/08/04 23:59:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ascii.c,v 1.19 2003/09/26 15:27:36 petere Exp $ * *----------------------------------------------------------------------- */ @@ -65,7 +65,7 @@ pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("unsupported encoding conversion from %s to ASCII", + errmsg("encoding conversion from %s to ASCII not supported", pg_encoding_to_char(enc)))); return; /* keep compiler quiet */ } diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 49ef50d21c..a0d00e73dc 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.92 2003/09/25 06:58:03 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.93 2003/09/26 15:27:36 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2241,7 +2241,7 @@ timetz_izone(PG_FUNCTION_ARGS) if (zone->month != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"interval\" time zone \"%s\" not legal", + errmsg("\"interval\" time zone \"%s\" not valid", DatumGetCString(DirectFunctionCall1(interval_out, PointerGetDatum(zone)))))); diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index a127296cd9..2b9ab06618 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.115 2003/09/25 06:58:05 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.116 2003/09/26 15:27:37 petere Exp $ * *------------------------------------------------------------------------- */ @@ -823,7 +823,7 @@ ValidatePgVersion(const char *path) else ereport(FATAL, (errcode_for_file_access(), - errmsg("could not open \"%s\": %m", full_path))); + errmsg("could not open file \"%s\": %m", full_path))); } ret = fscanf(file, "%ld.%ld", &file_major, &file_minor); diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9386013ac1..dbd71dcbca 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.159 2003/09/25 06:58:05 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.160 2003/09/26 15:27:37 petere Exp $ * *-------------------------------------------------------------------- */ @@ -1315,7 +1315,7 @@ static struct config_string ConfigureNamesString[] = { {"log_min_error_statement", PGC_USERLIMIT, LOGGING_WHEN, - gettext_noop("log statement generating error at or above this level"), + gettext_noop("log statements generating error at or above this level"), gettext_noop("All SQL statements that cause an error of the " "specified level or a higher level are logged.") },