diff options
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/aggregatecmds.c | 4 | ||||
-rw-r--r-- | src/backend/commands/analyze.c | 6 | ||||
-rw-r--r-- | src/backend/commands/cluster.c | 8 | ||||
-rw-r--r-- | src/backend/commands/comment.c | 20 | ||||
-rw-r--r-- | src/backend/commands/copy.c | 6 | ||||
-rw-r--r-- | src/backend/commands/dbcommands.c | 14 | ||||
-rw-r--r-- | src/backend/commands/functioncmds.c | 4 | ||||
-rw-r--r-- | src/backend/commands/indexcmds.c | 22 | ||||
-rw-r--r-- | src/backend/commands/opclasscmds.c | 4 | ||||
-rw-r--r-- | src/backend/commands/proclang.c | 6 | ||||
-rw-r--r-- | src/backend/commands/sequence.c | 14 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 84 | ||||
-rw-r--r-- | src/backend/commands/trigger.c | 18 | ||||
-rw-r--r-- | src/backend/commands/typecmds.c | 36 | ||||
-rw-r--r-- | src/backend/commands/user.c | 22 | ||||
-rw-r--r-- | src/backend/commands/vacuum.c | 28 | ||||
-rw-r--r-- | src/backend/commands/vacuumlazy.c | 14 | ||||
-rw-r--r-- | src/backend/commands/variable.c | 16 | ||||
-rw-r--r-- | src/backend/commands/view.c | 6 |
19 files changed, 166 insertions, 166 deletions
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index 08715a1638b..bad73c573fe 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.14 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.15 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -135,7 +135,7 @@ DefineAggregate(List *names, List *parameters) transTypeId != ANYELEMENTOID) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate transition datatype cannot be %s", + errmsg("aggregate transition data type cannot be %s", format_type_be(transTypeId)))); /* diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index fd93badc556..2e9a7174a34 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.62 2003/09/11 23:12:31 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.63 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -197,7 +197,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) /* No need for a WARNING if we already complained during VACUUM */ if (!vacstmt->vacuum) ereport(WARNING, - (errmsg("skipping \"%s\" --- only table or database owner can ANALYZE it", + (errmsg("skipping \"%s\" --- only table or database owner can analyze it", RelationGetRelationName(onerel)))); relation_close(onerel, AccessShareLock); return; @@ -212,7 +212,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) /* No need for a WARNING if we already complained during VACUUM */ if (!vacstmt->vacuum) ereport(WARNING, - (errmsg("skipping \"%s\" --- cannot ANALYZE indexes, views or special system tables", + (errmsg("skipping \"%s\" --- cannot analyze indexes, views, or special system tables", RelationGetRelationName(onerel)))); relation_close(onerel, AccessShareLock); return; diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 6056a195e75..a3f9ae8aac7 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.115 2003/08/08 21:41:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.116 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -349,7 +349,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster when index access method does not handle nulls"), + errmsg("cannot cluster when index access method does not handle null values"), errhint("You may be able to work around this by marking column \"%s\" NOT NULL.", NameStr(OldHeap->rd_att->attrs[colno - 1]->attname)))); } @@ -362,7 +362,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) /* index expression, lose... */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster on expressional index when index access method does not handle nulls"))); + errmsg("cannot cluster on expressional index when index access method does not handle null values"))); } } @@ -386,7 +386,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) if (isOtherTempNamespace(RelationGetNamespace(OldHeap))) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster temp tables of other processes"))); + errmsg("cannot cluster temporary tables of other sessions"))); /* Drop relcache refcnt on OldIndex, but keep lock */ index_close(OldIndex); diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index df09337d720..e133ef5dd28 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -7,7 +7,7 @@ * Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.70 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.71 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -306,28 +306,28 @@ CommentRelation(int objtype, List *relname, char *comment) if (relation->rd_rel->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", RelationGetRelationName(relation)))); break; case OBJECT_SEQUENCE: if (relation->rd_rel->relkind != RELKIND_SEQUENCE) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a sequence", + errmsg("\"%s\" is not a sequence", RelationGetRelationName(relation)))); break; case OBJECT_TABLE: if (relation->rd_rel->relkind != RELKIND_RELATION) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a table", + errmsg("\"%s\" is not a table", RelationGetRelationName(relation)))); break; case OBJECT_VIEW: if (relation->rd_rel->relkind != RELKIND_VIEW) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a view", + errmsg("\"%s\" is not a view", RelationGetRelationName(relation)))); break; } @@ -383,7 +383,7 @@ CommentAttribute(List *qualname, char *comment) if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", attrname, RelationGetRelationName(relation)))); /* Create the comment using the relation's oid */ @@ -569,7 +569,7 @@ CommentRule(List *qualname, char *comment) ForwardScanDirection))) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("there are multiple rules \"%s\"", rulename), + errmsg("there are multiple rules named \"%s\"", rulename), errhint("Specify a relation name as well as a rule name."))); heap_endscan(scanDesc); @@ -812,7 +812,7 @@ CommentTrigger(List *qualname, char *comment) if (!HeapTupleIsValid(triggertuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", trigname, RelationGetRelationName(relation)))); oid = HeapTupleGetOid(triggertuple); @@ -891,7 +891,7 @@ CommentConstraint(List *qualname, char *comment) if (OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("relation \"%s\" has multiple constraints named \"%s\"", + errmsg("table \"%s\" has multiple constraints named \"%s\"", RelationGetRelationName(relation), conName))); conOid = HeapTupleGetOid(tuple); } @@ -903,7 +903,7 @@ CommentConstraint(List *qualname, char *comment) if (!OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("constraint \"%s\" for relation \"%s\" does not exist", + errmsg("constraint \"%s\" for table \"%s\" does not exist", conName, RelationGetRelationName(relation)))); /* Create the comment with the pg_constraint oid */ diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index aa50e1dec55..faf982167bb 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.210 2003/08/28 13:52:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.211 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -282,7 +282,7 @@ CopySendData(void *databuf, int datasize) if (ferror(copy_file)) ereport(ERROR, (errcode_for_file_access(), - errmsg("failed to write COPY file: %m"))); + errmsg("could not write to COPY file: %m"))); break; case COPY_OLD_FE: if (pq_putbytes((char *) databuf, datasize)) @@ -2064,7 +2064,7 @@ CopyGetAttnums(Relation rel, List *attnamelist) if (intMember(attnum, attnums)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" specified more than once", + errmsg("column \"%s\" specified more than once", name))); attnums = lappendi(attnums, attnum); } diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 3227e300d28..4710cec67a9 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.122 2003/09/10 20:24:09 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.123 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -228,7 +228,7 @@ createdb(const CreatedbStmt *stmt) src_dbpath)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_DATABASE), - errmsg("template \"%s\" does not exist", dbtemplate))); + errmsg("template database \"%s\" does not exist", dbtemplate))); /* * Permission check: to copy a DB that's not marked datistemplate, you @@ -271,7 +271,7 @@ createdb(const CreatedbStmt *stmt) if (!PG_VALID_BE_ENCODING(encoding)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("invalid backend encoding %d", encoding))); + errmsg("invalid server encoding %d", encoding))); /* * Preassign OID for pg_database tuple, so that we can compute db @@ -339,7 +339,7 @@ createdb(const CreatedbStmt *stmt) if (rmdir(target_dir) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not remove temp directory \"%s\": %m", + errmsg("could not remove temporary directory \"%s\": %m", target_dir))); /* Make the symlink, if needed */ @@ -350,7 +350,7 @@ createdb(const CreatedbStmt *stmt) #endif ereport(ERROR, (errcode_for_file_access(), - errmsg("could not link \"%s\" to \"%s\": %m", + errmsg("could not link file \"%s\" to \"%s\": %m", nominal_loc, alt_loc))); } @@ -911,7 +911,7 @@ resolve_alt_dbpath(const char *dbpath, Oid dboid) if (len >= MAXPGPATH - 100) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("alternate path is too long"))); + errmsg("alternative path is too long"))); ret = palloc(len); snprintf(ret, len, "%s/base/%u", prefix, dboid); @@ -942,7 +942,7 @@ remove_dbdirs(const char *nominal_loc, const char *alt_loc) { ereport(WARNING, (errcode_for_file_access(), - errmsg("could not remove \"%s\": %m", nominal_loc))); + errmsg("could not remove file \"%s\": %m", nominal_loc))); success = false; } } diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 328643c171e..58431835124 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.35 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.36 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -450,7 +450,7 @@ CreateFunction(CreateFunctionStmt *stmt) 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)); + errhint("You need to use \"createlang\" to load the language into the database.") : 0)); languageOid = HeapTupleGetOid(languageTuple); languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c8ccab8d4e1..8ded744b674 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.109 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.110 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -89,11 +89,11 @@ DefineIndex(RangeVar *heapRelation, if (numberOfAttributes <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("must specify at least one attribute"))); + errmsg("must specify at least one column"))); if (numberOfAttributes > INDEX_MAX_KEYS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_COLUMNS), - errmsg("cannot use more than %d attributes in an index", + errmsg("cannot use more than %d columns in an index", INDEX_MAX_KEYS))); /* @@ -149,12 +149,12 @@ DefineIndex(RangeVar *heapRelation, if (unique && !accessMethodForm->amcanunique) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support UNIQUE indexes", + errmsg("access method \"%s\" does not support unique indexes", accessMethodName))); if (numberOfAttributes > 1 && !accessMethodForm->amcanmulticol) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support multi-column indexes", + errmsg("access method \"%s\" does not support multicolumn indexes", accessMethodName))); ReleaseSysCache(tuple); @@ -288,7 +288,7 @@ CheckPredicate(List *predList) if (contain_subplans((Node *) predList)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in index predicate"))); + errmsg("cannot use subquery in index predicate"))); if (contain_agg_clause((Node *) predList)) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), @@ -334,7 +334,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo, if (!HeapTupleIsValid(atttuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" does not exist", + errmsg("column \"%s\" does not exist", attribute->name))); attform = (Form_pg_attribute) GETSTRUCT(atttuple); indexInfo->ii_KeyAttrNumbers[attn] = attform->attnum; @@ -366,11 +366,11 @@ ComputeIndexAttrs(IndexInfo *indexInfo, if (contain_subplans(attribute->expr)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in index expression"))); + errmsg("cannot use subquery in index expression"))); if (contain_agg_clause(attribute->expr)) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in index expression"))); + errmsg("cannot use aggregate function in index expression"))); /* * A expression using mutable functions is probably wrong, @@ -572,7 +572,7 @@ RemoveIndex(RangeVar *relation, DropBehavior behavior) if (relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", relation->relname))); object.classId = RelOid_pg_class; @@ -602,7 +602,7 @@ ReindexIndex(RangeVar *indexRelation, bool force /* currently unused */ ) if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", indexRelation->relname))); /* Check permissions */ diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 8d38df1fbd0..abccad1078f 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.19 2003/09/11 02:40:13 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.20 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -238,7 +238,7 @@ DefineOpClass(CreateOpClassStmt *stmt) if (amoid != GIST_AM_OID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("storage type may not be different from datatype for access method \"%s\"", + errmsg("storage type may not be different from data type for access method \"%s\"", stmt->amname))); } } diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 772c10473ad..475a76c78b1 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.49 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.50 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -93,14 +93,14 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) { ereport(NOTICE, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("changing return type of function %s() from OPAQUE to LANGUAGE_HANDLER", + errmsg("changing return type of function %s from \"opaque\" to \"language_handler\"", NameListToString(stmt->plhandler)))); SetFunctionReturnType(procOid, LANGUAGE_HANDLEROID); } else ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("function %s() must return LANGUAGE_HANDLER", + errmsg("function %s must return type \"language_handler\"", NameListToString(stmt->plhandler)))); } diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index c62f4a71c56..6bc59ca9fb1 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.102 2003/08/08 21:41:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.103 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -495,7 +495,7 @@ nextval(PG_FUNCTION_ARGS) snprintf(buf, sizeof(buf), INT64_FORMAT, maxv); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.nextval: reached MAXVALUE (%s)", + errmsg("nextval: reached maximum value of sequence \"%s\" (%s)", sequence->relname, buf))); } next = minv; @@ -518,7 +518,7 @@ nextval(PG_FUNCTION_ARGS) snprintf(buf, sizeof(buf), INT64_FORMAT, minv); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.nextval: reached MINVALUE (%s)", + errmsg("nextval: reached minimum value of sequence \"%s\" (%s)", sequence->relname, buf))); } next = maxv; @@ -616,7 +616,7 @@ currval(PG_FUNCTION_ARGS) if (elm->increment == 0) /* nextval/read_info were not called */ ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.currval is not yet defined in this session", + errmsg("currval of sequence \"%s\" is not yet defined in this session", sequence->relname))); result = elm->last; @@ -670,8 +670,8 @@ do_setval(RangeVar *sequence, int64 next, bool iscalled) snprintf(bufx, sizeof(bufx), INT64_FORMAT, seq->max_value); ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s.setval: value %s is out of bounds (%s..%s)", - sequence->relname, bufv, bufm, bufx))); + errmsg("setval: value %s is out of bounds for sequence \"%s\" (%s..%s)", + bufv, sequence->relname, bufm, bufx))); } /* save info in local cache */ @@ -955,7 +955,7 @@ init_params(List *options, Form_pg_sequence new) if (new->increment_by == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot increment by zero"))); + errmsg("INCREMENT must not be zero"))); } /* MAXVALUE */ diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index fc8a87123fe..d223a5ba3e8 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.82 2003/09/19 21:04:20 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.83 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -147,7 +147,7 @@ DefineRelation(CreateStmt *stmt, char relkind) if (stmt->oncommit != ONCOMMIT_NOOP && !stmt->relation->istemp) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("ON COMMIT can only be used on TEMP tables"))); + errmsg("ON COMMIT can only be used on temporary tables"))); /* * Look up the namespace in which we are supposed to create the @@ -207,7 +207,7 @@ DefineRelation(CreateStmt *stmt, char relkind) if (strcmp(check[i].ccname, cdef->name) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("duplicate CHECK constraint name \"%s\"", + errmsg("duplicate check constraint name \"%s\"", cdef->name))); } check[ncheck].ccname = cdef->name; @@ -394,7 +394,7 @@ TruncateRelation(const RangeVar *relation) if (isOtherTempNamespace(RelationGetNamespace(rel))) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot truncate temp tables of other processes"))); + errmsg("cannot truncate temporary tables of other sessions"))); /* * Don't allow truncate on tables which are referenced by foreign keys @@ -506,7 +506,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, if (strcmp(coldef->colname, restdef->colname) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" duplicated", + errmsg("column \"%s\" duplicated", coldef->colname))); } } @@ -608,14 +608,14 @@ MergeAttributes(List *schema, List *supers, bool istemp, * have the same type and typmod. */ ereport(NOTICE, - (errmsg("merging multiple inherited definitions of attribute \"%s\"", + (errmsg("merging multiple inherited definitions of column \"%s\"", attributeName))); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (typenameTypeId(def->typename) != attribute->atttypid || def->typename->typmod != attribute->atttypmod) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("inherited attribute \"%s\" has a type conflict", + errmsg("inherited column \"%s\" has a type conflict", attributeName), errdetail("%s versus %s", TypeNameToString(def->typename), @@ -763,14 +763,14 @@ MergeAttributes(List *schema, List *supers, bool istemp, * have the same type and typmod. */ ereport(NOTICE, - (errmsg("merging attribute \"%s\" with inherited definition", + (errmsg("merging column \"%s\" with inherited definition", attributeName))); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (typenameTypeId(def->typename) != typenameTypeId(newdef->typename) || def->typename->typmod != newdef->typename->typmod) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("attribute \"%s\" has a type conflict", + errmsg("column \"%s\" has a type conflict", attributeName), errdetail("%s versus %s", TypeNameToString(def->typename), @@ -811,7 +811,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, if (def->cooked_default == bogus_marker) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_DEFINITION), - errmsg("attribute \"%s\" inherits conflicting default values", + errmsg("column \"%s\" inherits conflicting default values", def->colname), errhint("To resolve the conflict, specify a default explicitly."))); } @@ -1158,7 +1158,7 @@ renameatt(Oid myrelid, find_inheritance_children(myrelid) != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("inherited attribute \"%s\" must be renamed in child tables too", + errmsg("inherited column \"%s\" must be renamed in child tables too", oldattname))); } @@ -1168,7 +1168,7 @@ renameatt(Oid myrelid, if (!HeapTupleIsValid(atttup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" does not exist", + errmsg("column \"%s\" does not exist", oldattname))); attform = (Form_pg_attribute) GETSTRUCT(atttup); @@ -1176,7 +1176,7 @@ renameatt(Oid myrelid, if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot rename system attribute \"%s\"", + errmsg("cannot rename system column \"%s\"", oldattname))); /* @@ -1186,7 +1186,7 @@ renameatt(Oid myrelid, if (attform->attinhcount > 0 && !recursing) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot rename inherited attribute \"%s\"", + errmsg("cannot rename inherited column \"%s\"", oldattname))); /* should not already exist */ @@ -1197,7 +1197,7 @@ renameatt(Oid myrelid, 0, 0)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" already exists", + errmsg("column \"%s\" of relation \"%s\" already exists", newattname, RelationGetRelationName(targetrelation)))); namestrcpy(&(attform->attname), newattname); @@ -1751,7 +1751,7 @@ AlterTableAddColumn(Oid myrelid, if (find_inheritance_children(myrelid) != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute must be added to child tables too"))); + errmsg("column must be added to child tables too"))); } /* @@ -1798,7 +1798,7 @@ AlterTableAddColumn(Oid myrelid, 0, 0)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" already exists", + errmsg("column \"%s\" of relation \"%s\" already exists", colDef->colname, RelationGetRelationName(rel)))); minattnum = ((Form_pg_class) GETSTRUCT(reltup))->relnatts; @@ -1983,14 +1983,14 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2026,7 +2026,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse, if (indexStruct->indkey[i] == attnum) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute \"%s\" is in a primary key", + errmsg("column \"%s\" is in a primary key", colName))); } } @@ -2127,14 +2127,14 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2155,7 +2155,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse, if (isnull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("attribute \"%s\" contains NULL values", + errmsg("column \"%s\" contains null values", colName))); } @@ -2255,14 +2255,14 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2419,14 +2419,14 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse, if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); attrtuple = (Form_pg_attribute) GETSTRUCT(tuple); if (attrtuple->attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse, else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("column datatype %s can only have storage \"plain\"", + errmsg("column data type %s can only have storage PLAIN", format_type_be(attrtuple->atttypid)))); } @@ -2624,7 +2624,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Can't drop a system attribute */ @@ -2632,7 +2632,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot drop system attribute \"%s\"", + errmsg("cannot drop system column \"%s\"", colName))); /* Don't drop inherited columns */ @@ -2640,7 +2640,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (tupleDesc->attrs[attnum - 1]->attinhcount > 0 && !recursing) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot drop inherited attribute \"%s\"", + errmsg("cannot drop inherited column \"%s\"", colName))); /* @@ -2967,7 +2967,7 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (length(pstate->p_rtable) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("CHECK constraint may only reference relation \"%s\"", + errmsg("check constraint may only reference relation \"%s\"", RelationGetRelationName(rel)))); /* @@ -2976,11 +2976,11 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in CHECK constraint"))); + errmsg("cannot use subquery in check constraint"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in CHECK constraint"))); + errmsg("cannot use aggregate function in check constraint"))); /* * Might as well try to reduce any constant expressions, so as to @@ -3031,8 +3031,8 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (!successful) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("CHECK constraint \"%s\" is violated at some row(s)", - constr->name))); + errmsg("check constraint \"%s\" is violated by some row", + constr->name))); /* * Call AddRelationRawConstraints to do the real adding -- It @@ -3165,7 +3165,7 @@ AlterTableAddForeignKeyConstraint(Relation rel, FkConstraint *fkconstraint) if (numfks != numpks) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("number of referencing and referenced attributes for foreign key disagree"))); + errmsg("number of referencing and referenced columns for foreign key disagree"))); for (i = 0; i < numpks; i++) { @@ -3315,7 +3315,7 @@ transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, if (indexStruct == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("there is no PRIMARY KEY for referenced table \"%s\"", + errmsg("there is no primary key for referenced table \"%s\"", RelationGetRelationName(pkrel)))); /* @@ -3429,7 +3429,7 @@ transformFkeyCheckAttrs(Relation pkrel, if (!found) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("there is no UNIQUE constraint matching given keys for referenced table \"%s\"", + errmsg("there is no unique constraint matching given keys for referenced table \"%s\"", RelationGetRelationName(pkrel)))); freeList(indexoidlist); @@ -3594,7 +3594,7 @@ createForeignKeyTriggers(Relation rel, FkConstraint *fkconstraint, if (length(fk_attr) != length(pk_attr)) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("number of referencing and referenced attributes for foreign key disagree"))); + errmsg("number of referencing and referenced columns for foreign key disagree"))); while (fk_attr != NIL) { @@ -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("relation \"%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("relation \"%s\" does not need a TOAST table", RelationGetRelationName(rel)))); } diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 3e49f5add36..d6868818656 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.156 2003/08/08 21:41:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.157 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -219,21 +219,21 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) if (TRIGGER_FOR_INSERT(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double INSERT event specified"))); + errmsg("multiple INSERT events specified"))); TRIGGER_SETT_INSERT(tgtype); break; case 'd': if (TRIGGER_FOR_DELETE(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double DELETE event specified"))); + errmsg("multiple DELETE events specified"))); TRIGGER_SETT_DELETE(tgtype); break; case 'u': if (TRIGGER_FOR_UPDATE(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double UPDATE event specified"))); + errmsg("multiple UPDATE events specified"))); TRIGGER_SETT_UPDATE(tgtype); break; default: @@ -287,14 +287,14 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) if (funcrettype == OPAQUEOID) { ereport(NOTICE, - (errmsg("changing return type of function %s() from OPAQUE to TRIGGER", + (errmsg("changing return type of function %s from \"opaque\" to \"trigger\"", NameListToString(stmt->funcname)))); SetFunctionReturnType(funcoid, TRIGGEROID); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("function %s() must return TRIGGER", + errmsg("function %s must return type \"trigger\"", NameListToString(stmt->funcname)))); } @@ -481,7 +481,7 @@ DropTrigger(Oid relid, const char *trigname, DropBehavior behavior) if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", trigname, get_rel_name(relid)))); if (!pg_class_ownercheck(relid, GetUserId())) @@ -694,7 +694,7 @@ renametrig(Oid relid, { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", oldname, RelationGetRelationName(targetrel)))); } @@ -1158,7 +1158,7 @@ ExecCallTriggerFunc(TriggerData *trigdata, if (fcinfo.isnull) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("trigger function %u returned NULL", + errmsg("trigger function %u returned null value", fcinfo.flinfo->fn_oid))); return (HeapTuple) DatumGetPointer(result); diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index deb24a779cd..2c49ad3620a 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.45 2003/09/15 00:26:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.46 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -272,14 +272,14 @@ DefineType(List *names, List *parameters) { /* backwards-compatibility hack */ ereport(NOTICE, - (errmsg("changing return type of function %s from OPAQUE to %s", + (errmsg("changing return type of function %s from \"opaque\" to %s", NameListToString(inputName), typeName))); SetFunctionReturnType(inputOid, typoid); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type input function %s must return %s", + errmsg("type input function %s must return type %s", NameListToString(inputName), typeName))); } resulttype = get_func_rettype(outputOid); @@ -289,14 +289,14 @@ DefineType(List *names, List *parameters) { /* backwards-compatibility hack */ ereport(NOTICE, - (errmsg("changing return type of function %s from OPAQUE to CSTRING", + (errmsg("changing return type of function %s from \"opaque\" to \"cstring\"", NameListToString(outputName)))); SetFunctionReturnType(outputOid, CSTRINGOID); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type output function %s must return cstring", + errmsg("type output function %s must return type \"cstring\"", NameListToString(outputName)))); } if (receiveOid) @@ -305,7 +305,7 @@ DefineType(List *names, List *parameters) if (resulttype != typoid) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type receive function %s must return %s", + errmsg("type receive function %s must return type %s", NameListToString(receiveName), typeName))); } if (sendOid) @@ -314,7 +314,7 @@ DefineType(List *names, List *parameters) if (resulttype != BYTEAOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type send function %s must return bytea", + errmsg("type send function %s must return type \"bytea\"", NameListToString(sendName)))); } @@ -615,7 +615,7 @@ DefineDomain(CreateDomainStmt *stmt) if (defaultExpr) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("multiple DEFAULT expressions"))); + errmsg("multiple default expressions"))); /* Create a dummy ParseState for transformExpr */ pstate = make_parsestate(NULL); @@ -875,7 +875,7 @@ findTypeInputFunction(List *procname, Oid typeOid) { /* Found, but must complain and fix the pg_proc entry */ ereport(NOTICE, - (errmsg("changing argument type of function %s from OPAQUE to CSTRING", + (errmsg("changing argument type of function %s from \"opaque\" to \"cstring\"", NameListToString(procname)))); SetFunctionArgType(procOid, 0, CSTRINGOID); @@ -945,7 +945,7 @@ findTypeOutputFunction(List *procname, Oid typeOid) { /* Found, but must complain and fix the pg_proc entry */ ereport(NOTICE, - (errmsg("changing argument type of function %s from OPAQUE to %s", + (errmsg("changing argument type of function %s from \"opaque\" to %s", NameListToString(procname), format_type_be(typeOid)))); SetFunctionArgType(procOid, 0, typeOid); @@ -1287,9 +1287,9 @@ AlterDomainNotNull(List *names, bool notNull) if (isNull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("relation \"%s\" attribute \"%s\" contains NULL values", - RelationGetRelationName(testrel), - NameStr(tupdesc->attrs[attnum - 1]->attname)))); + errmsg("column \"%s\" of table \"%s\" contains null values", + NameStr(tupdesc->attrs[attnum - 1]->attname), + RelationGetRelationName(testrel)))); } } heap_endscan(scan); @@ -1554,7 +1554,7 @@ AlterDomainAddConstraint(List *names, Node *newConstraint) if (!isNull && !DatumGetBool(conResult)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("relation \"%s\" attribute \"%s\" contains values that violate the new constraint", + errmsg("relation \"%s\" column \"%s\" contains values that violate the new constraint", RelationGetRelationName(testrel), NameStr(tupdesc->attrs[attnum - 1]->attname)))); } @@ -1791,7 +1791,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (length(pstate->p_rtable) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use table references in domain CHECK constraint"))); + errmsg("cannot use table references in domain check constraint"))); /* * Domains don't allow var clauses (this should be redundant with the @@ -1800,7 +1800,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (contain_var_clause(expr)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use table references in domain CHECK constraint"))); + errmsg("cannot use table references in domain check constraint"))); /* * No subplans or aggregates, either... @@ -1808,11 +1808,11 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in CHECK constraint"))); + errmsg("cannot use subquery in check constraint"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in CHECK constraint"))); + errmsg("cannot use aggregate in check constraint"))); /* * Convert to string form for storage. diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index de6555e2c1d..61351043609 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.125 2003/09/15 00:26:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.126 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -146,7 +146,7 @@ write_group_file(Relation grel) if (fp == NULL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); /* * Read pg_group and write the file. Note we use SnapshotSelf to @@ -175,7 +175,7 @@ write_group_file(Relation grel) groname = NameStr(*DatumGetName(datum)); /* - * Check for illegal characters in the group name. + * Check for invalid characters in the group name. */ i = strcspn(groname, "\n"); if (groname[i] != '\0') @@ -245,7 +245,7 @@ write_group_file(Relation grel) if (ferror(fp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); FreeFile(fp); /* @@ -255,7 +255,7 @@ write_group_file(Relation grel) if (rename(tempname, filename)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rename \"%s\" to \"%s\": %m", + errmsg("could not rename file \"%s\" to \"%s\": %m", tempname, filename))); pfree((void *) tempname); @@ -294,7 +294,7 @@ write_user_file(Relation urel) if (fp == NULL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); /* * Read pg_shadow and write the file. Note we use SnapshotSelf to @@ -376,7 +376,7 @@ write_user_file(Relation urel) if (ferror(fp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); FreeFile(fp); /* @@ -386,7 +386,7 @@ write_user_file(Relation urel) if (rename(tempname, filename)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rename \"%s\" to \"%s\": %m", + errmsg("could not rename file \"%s\" to \"%s\": %m", tempname, filename))); pfree((void *) tempname); @@ -584,7 +584,7 @@ CreateUser(CreateUserStmt *stmt) if (sysid <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("user id must be positive"))); + errmsg("user ID must be positive"))); havesysid = true; } if (dvalidUntil) @@ -1230,7 +1230,7 @@ CheckPgUserAclNotNull(void) errmsg("before using passwords you must revoke permissions on %s", ShadowRelationName), errdetail("This restriction is to prevent unprivileged users from reading the passwords."), - errhint("Try 'REVOKE ALL ON \"%s\" FROM PUBLIC'.", + errhint("Try REVOKE ALL ON \"%s\" FROM PUBLIC.", ShadowRelationName))); ReleaseSysCache(htup); @@ -1294,7 +1294,7 @@ CreateGroup(CreateGroupStmt *stmt) if (sysid <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("group id must be positive"))); + errmsg("group ID must be positive"))); havesysid = true; } diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index e626848f12b..b9ca4dfbf90 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.260 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.261 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -463,7 +463,7 @@ vacuum_set_xid_limits(VacuumStmt *vacstmt, bool sharedRel, if (TransactionIdFollows(limit, *oldestXmin)) { ereport(WARNING, - (errmsg("oldest Xmin is far in the past"), + (errmsg("oldest xmin is far in the past"), errhint("Close open transactions soon to avoid wraparound problems."))); limit = *oldestXmin; } @@ -782,7 +782,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, char expected_relkind) (pg_database_ownercheck(MyDatabaseId, GetUserId()) && !onerel->rd_rel->relisshared))) { ereport(WARNING, - (errmsg("skipping \"%s\" --- only table or database owner can VACUUM it", + (errmsg("skipping \"%s\" --- only table or database owner can vacuum it", RelationGetRelationName(onerel)))); relation_close(onerel, lmode); CommitTransactionCommand(); @@ -796,7 +796,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, char expected_relkind) if (onerel->rd_rel->relkind != expected_relkind) { ereport(WARNING, - (errmsg("skipping \"%s\" --- cannot VACUUM indexes, views or special system tables", + (errmsg("skipping \"%s\" --- cannot vacuum indexes, views, or special system tables", RelationGetRelationName(onerel)))); relation_close(onerel, lmode); CommitTransactionCommand(); @@ -1354,13 +1354,13 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, } ereport(elevel, - (errmsg("\"%s\": found %.0f removable, %.0f nonremovable tuples in %u pages", + (errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u pages", RelationGetRelationName(onerel), tups_vacuumed, num_tuples, nblocks), - errdetail("%.0f dead tuples cannot be removed yet.\n" - "Nonremovable tuples range from %lu to %lu bytes long.\n" + errdetail("%.0f dead row versions cannot be removed yet.\n" + "Nonremovable row versions range from %lu to %lu bytes long.\n" "There were %.0f unused item pointers.\n" - "Total free space (including removable tuples) is %.0f bytes.\n" + "Total free space (including removable row versions) is %.0f bytes.\n" "%u pages are or will become empty, including %u at the end of the table.\n" "%u pages containing %.0f free bytes are potential move destinations.\n" "%s", @@ -2360,7 +2360,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel, * processing that occurs below. */ ereport(elevel, - (errmsg("\"%s\": moved %u tuples, truncated %u to %u pages", + (errmsg("\"%s\": moved %u row versions, truncated %u to %u pages", RelationGetRelationName(onerel), num_moved, nblocks, blkno), errdetail("%s", @@ -2639,7 +2639,7 @@ scan_index(Relation indrel, double num_tuples) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), @@ -2657,7 +2657,7 @@ scan_index(Relation indrel, double num_tuples) if (stats->num_index_tuples > num_tuples || !vac_is_partial_index(indrel)) ereport(WARNING, - (errmsg("index \"%s\" contains %.0f tuples, 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), errhint("Rebuild the index with REINDEX."))); @@ -2706,11 +2706,11 @@ vacuum_index(VacPageList vacpagelist, Relation indrel, false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), - errdetail("%.0f index tuples were removed.\n" + errdetail("%.0f index row versions were removed.\n" "%u index pages have been deleted, %u are currently reusable.\n" "%s", stats->tuples_removed, @@ -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 tuples, but table contains %.0f tuples", + (errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f tuples", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples + keep_tuples), errhint("Rebuild the index with REINDEX."))); diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 9ac831a8677..cc1852f65a1 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -31,7 +31,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.31 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.32 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -425,10 +425,10 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } ereport(elevel, - (errmsg("\"%s\": found %.0f removable, %.0f nonremovable tuples in %u pages", + (errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u pages", RelationGetRelationName(onerel), tups_vacuumed, num_tuples, nblocks), - errdetail("%.0f dead tuples cannot be removed yet.\n" + errdetail("%.0f dead row versions cannot be removed yet.\n" "There were %.0f unused item pointers.\n" "%u pages are entirely empty.\n" "%s", @@ -483,7 +483,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats) } ereport(elevel, - (errmsg("\"%s\": removed %d tuples in %d pages", + (errmsg("\"%s\": removed %d row versions in %d pages", RelationGetRelationName(onerel), tupindex, npages), errdetail("%s", @@ -594,7 +594,7 @@ lazy_scan_index(Relation indrel, LVRelStats *vacrelstats) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), @@ -654,11 +654,11 @@ lazy_vacuum_index(Relation indrel, LVRelStats *vacrelstats) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), - errdetail("%.0f index tuples were removed.\n" + errdetail("%.0f index row versions were removed.\n" "%u index pages have been deleted, %u are currently reusable.\n" "%s", stats->tuples_removed, diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index ad39ccc4670..7c862a5b3ac 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.87 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.88 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -72,7 +72,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid list syntax for datestyle"))); + errmsg("invalid list syntax for parameter \"datestyle\""))); return NULL; } @@ -158,7 +158,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized datestyle keyword: \"%s\"", + errmsg("unrecognized \"datestyle\" key word: \"%s\"", tok))); ok = false; break; @@ -176,7 +176,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("conflicting datestyle specifications"))); + errmsg("conflicting \"datestyle\" specifications"))); return NULL; } @@ -447,7 +447,7 @@ assign_timezone(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid INTERVAL for time zone: month not allowed"))); + errmsg("invalid interval value for time zone: month not allowed"))); pfree(interval); return NULL; } @@ -554,7 +554,7 @@ assign_timezone(const char *value, bool doit, bool interactive) { ereport(interactive ? ERROR : LOG, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized timezone name: \"%s\"", + errmsg("unrecognized time zone name: \"%s\"", value))); return NULL; } @@ -562,9 +562,9 @@ assign_timezone(const char *value, bool doit, bool interactive) { ereport(interactive ? ERROR : LOG, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timezone \"%s\" appears to use leap seconds", + errmsg("time zone \"%s\" appears to use leap seconds", value), - errdetail("PostgreSQL does not support leap seconds"))); + errdetail("PostgreSQL does not support leap seconds."))); return NULL; } } diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 4d0877dbcf0..550ec0cf1f0 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.77 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.78 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -86,7 +86,7 @@ DefineVirtualRelation(const RangeVar *relation, List *tlist, bool replace) if (attrList == NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("view must have at least one attribute"))); + errmsg("view must have at least one column"))); /* * Check to see if we want to replace an existing view. @@ -190,7 +190,7 @@ checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc) newattr->atttypmod != oldattr->atttypmod) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot change datatype of view column \"%s\"", + errmsg("cannot change data type of view column \"%s\"", NameStr(oldattr->attname)))); /* We can ignore the remaining attributes of an attribute... */ } |