summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-28 00:09:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-28 00:09:16 +0000
commit81b5c8a1364e7d287fb0aaac848f7f84e64b86d3 (patch)
tree6ce59b7bf5b0cd674a2b0e906adecdc98a231ddf /src/backend/commands
parentb556e8200e55261cf41de7ce8be4b38b0a062c2b (diff)
downloadpostgresql-81b5c8a1364e7d287fb0aaac848f7f84e64b86d3.tar.gz
A visit from the message-style police ...
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/dbcommands.c6
-rw-r--r--src/backend/commands/functioncmds.c10
-rw-r--r--src/backend/commands/opclasscmds.c6
-rw-r--r--src/backend/commands/portalcmds.c4
-rw-r--r--src/backend/commands/prepare.c6
-rw-r--r--src/backend/commands/schemacmds.c8
-rw-r--r--src/backend/commands/sequence.c8
-rw-r--r--src/backend/commands/trigger.c12
-rw-r--r--src/backend/commands/user.c10
-rw-r--r--src/backend/commands/variable.c8
10 files changed, 39 insertions, 39 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 24ad0bf41a..93701c2a59 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.117 2003/07/18 23:20:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.118 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -334,12 +334,12 @@ createdb(const CreatedbStmt *stmt)
if (mkdir(target_dir, S_IRWXU) != 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to create database directory \"%s\": %m",
+ errmsg("could not create database directory \"%s\": %m",
target_dir)));
if (rmdir(target_dir) != 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to remove temp directory \"%s\": %m",
+ errmsg("could not remove temp directory \"%s\": %m",
target_dir)));
/* Make the symlink, if needed */
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index f351b0f2dc..9f17eff84f 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.29 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.30 2003/07/28 00:09:14 tgl Exp $
*
* DESCRIPTION
* These routines take the parse tree and pick out the
@@ -106,12 +106,12 @@ compute_return_type(TypeName *returnType, Oid languageOid,
languageOid != ClanguageId)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("type %s does not exist", typnam)));
+ errmsg("type \"%s\" does not exist", typnam)));
/* Otherwise, go ahead and make a shell type */
ereport(NOTICE,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("type %s is not yet defined", typnam),
+ errmsg("type \"%s\" is not yet defined", typnam),
errdetail("Creating a shell type definition.")));
namespaceId = QualifiedNameGetCreationNamespace(returnType->names,
&typname);
@@ -862,7 +862,7 @@ CreateCast(CreateCastStmt *stmt)
if (procstruct->pronargs != 1)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("cast function must take 1 argument")));
+ errmsg("cast function must take one argument")));
if (procstruct->proargtypes[0] != sourcetypeid)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
@@ -962,7 +962,7 @@ CreateCast(CreateCastStmt *stmt)
if (HeapTupleIsValid(tuple))
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_OBJECT),
- errmsg("cast from data type %s to data type %s already exists",
+ errmsg("cast from type %s to type %s already exists",
TypeNameToString(stmt->sourcetype),
TypeNameToString(stmt->targettype))));
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 28807790d9..ca2d929894 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.13 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.14 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -278,10 +278,10 @@ DefineOpClass(CreateOpClassStmt *stmt)
if (opclass->opcintype == typeoid && opclass->opcdefault)
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_OBJECT),
- errmsg("cannot make class \"%s\" be default for type %s",
+ errmsg("could not make class \"%s\" be default for type %s",
opcname,
TypeNameToString(stmt->datatype)),
- errdetail("class \"%s\" already is the default",
+ errdetail("Class \"%s\" already is the default.",
NameStr(opclass->opcname))));
}
diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c
index df82a4b26f..978f05ef92 100644
--- a/src/backend/commands/portalcmds.c
+++ b/src/backend/commands/portalcmds.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.17 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.18 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -365,7 +365,7 @@ PersistHoldablePortal(Portal portal)
if (portal->posOverflow) /* oops, cannot trust portalPos */
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("unable to reposition held cursor")));
+ errmsg("could not reposition held cursor")));
tuplestore_rescan(portal->holdStore);
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index ae6c45019a..cd58d7fc7b 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -10,7 +10,7 @@
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.20 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.21 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -264,7 +264,7 @@ InitQueryHashTable(void)
HASH_ELEM);
if (!prepared_queries)
- elog(ERROR, "unable to create hash table");
+ elog(ERROR, "could not create hash table");
}
/*
@@ -336,7 +336,7 @@ StorePreparedStatement(const char *stmt_name,
/* Shouldn't get a failure, nor a duplicate entry */
if (!entry || found)
- elog(ERROR, "unable to store prepared statement \"%s\"",
+ elog(ERROR, "could not store prepared statement \"%s\"",
stmt_name);
/* Fill in the hash table entry with copied data */
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index 8d50f0d69c..808401c48f 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.12 2003/07/18 23:20:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.13 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -97,7 +97,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
ereport(ERROR,
(errcode(ERRCODE_RESERVED_NAME),
errmsg("unacceptable schema name \"%s\"", schemaName),
- errdetail("The prefix pg_ is reserved for system schemas.")));
+ errdetail("The prefix \"pg_\" is reserved for system schemas.")));
/* Create the schema's namespace */
namespaceId = NamespaceCreate(schemaName, owner_userid);
@@ -214,7 +214,7 @@ RemoveSchemaById(Oid schemaOid)
ObjectIdGetDatum(schemaOid),
0, 0, 0);
if (!HeapTupleIsValid(tup)) /* should not happen */
- elog(ERROR, "cache lookup failed for schema %u", schemaOid);
+ elog(ERROR, "cache lookup failed for namespace %u", schemaOid);
simple_heap_delete(relation, &tup->t_self);
@@ -266,7 +266,7 @@ RenameSchema(const char *oldname, const char *newname)
ereport(ERROR,
(errcode(ERRCODE_RESERVED_NAME),
errmsg("unacceptable schema name \"%s\"", newname),
- errdetail("The prefix pg_ is reserved for system schemas.")));
+ errdetail("The prefix \"pg_\" is reserved for system schemas.")));
/* rename */
namestrcpy(&(((Form_pg_namespace) GETSTRUCT(tup))->nspname), newname);
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index fd30a33b88..cb2106a360 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.97 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.98 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -856,8 +856,8 @@ read_info(SeqTable elm, Relation rel, Buffer *buf)
sm = (sequence_magic *) PageGetSpecialPointer(page);
if (sm->magic != SEQ_MAGIC)
- elog(ERROR, "bad magic number (%08X) in sequence \"%s\"",
- sm->magic, RelationGetRelationName(rel));
+ elog(ERROR, "bad magic number in sequence \"%s\": %08X",
+ RelationGetRelationName(rel), sm->magic);
lp = PageGetItemId(page, FirstOffsetNumber);
Assert(ItemIdIsUsed(lp));
@@ -954,7 +954,7 @@ init_params(List *options, Form_pg_sequence new)
if (new->increment_by == 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("can't INCREMENT by zero")));
+ errmsg("cannot increment by zero")));
}
/* MAXVALUE */
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index ca594f6357..9cfa852aa8 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.151 2003/07/20 21:56:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.152 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -133,7 +133,7 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint)
if (needconstrrelid && constrrelid == InvalidOid)
ereport(NOTICE,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("unable to determine referenced table for constraint \"%s\"",
+ errmsg("could not determine referenced table for constraint \"%s\"",
stmt->trigname)));
}
@@ -233,7 +233,7 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint)
TRIGGER_SETT_UPDATE(tgtype);
break;
default:
- elog(ERROR, "unknown trigger event: %d",
+ elog(ERROR, "unrecognized trigger event: %d",
(int) stmt->actions[i]);
break;
}
@@ -477,7 +477,7 @@ DropTrigger(Oid relid, const char *trigname, DropBehavior behavior)
if (!HeapTupleIsValid(tup))
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("trigger \"%s\" on relation \"%s\" does not exist",
+ errmsg("trigger \"%s\" for relation \"%s\" does not exist",
trigname, get_rel_name(relid))));
if (!pg_class_ownercheck(relid, GetUserId()))
@@ -1574,7 +1574,7 @@ ltrmark:;
if (XactIsoLevel == XACT_SERIALIZABLE)
ereport(ERROR,
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
- errmsg("cannot serialize access due to concurrent update")));
+ errmsg("could not serialize access due to concurrent update")));
else if (!(ItemPointerEquals(&(tuple.t_self), tid)))
{
TupleTableSlot *epqslot = EvalPlanQual(estate,
@@ -1597,7 +1597,7 @@ ltrmark:;
default:
ReleaseBuffer(buffer);
- elog(ERROR, "unrecognized status %u from heap_mark4update",
+ elog(ERROR, "unrecognized heap_mark4update status: %u",
test);
return NULL; /* keep compiler quiet */
}
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index d23c218006..7f85f0581b 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.120 2003/07/20 21:56:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.121 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -146,7 +146,7 @@ write_group_file(Relation grel)
if (fp == NULL)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to write temp file \"%s\": %m", tempname)));
+ errmsg("could not write temp file \"%s\": %m", tempname)));
/*
* Read pg_group and write the file. Note we use SnapshotSelf to ensure
@@ -245,7 +245,7 @@ write_group_file(Relation grel)
if (ferror(fp))
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to write temp file \"%s\": %m", tempname)));
+ errmsg("could not write temp file \"%s\": %m", tempname)));
FreeFile(fp);
/*
@@ -294,7 +294,7 @@ write_user_file(Relation urel)
if (fp == NULL)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to write temp file \"%s\": %m", tempname)));
+ errmsg("could not write temp file \"%s\": %m", tempname)));
/*
* Read pg_shadow and write the file. Note we use SnapshotSelf to ensure
@@ -376,7 +376,7 @@ write_user_file(Relation urel)
if (ferror(fp))
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("unable to write temp file \"%s\": %m", tempname)));
+ errmsg("could not write temp file \"%s\": %m", tempname)));
FreeFile(fp);
/*
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 611c493c14..a9fc94adc3 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.83 2003/07/20 21:56:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.84 2003/07/28 00:09:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -242,7 +242,7 @@ set_tz(const char *tz)
strcpy(tzbuf, "TZ=");
strncpy(tzbuf + 3, tz, sizeof(tzbuf) - 4);
if (putenv(tzbuf) != 0) /* shouldn't happen? */
- elog(LOG, "unable to set TZ environment variable");
+ elog(LOG, "could not set TZ environment variable");
tzset();
}
@@ -268,7 +268,7 @@ clear_tz(void)
{
strcpy(tzbuf, "=");
if (putenv(tzbuf) != 0)
- elog(LOG, "unable to clear TZ environment variable");
+ elog(LOG, "could not clear TZ environment variable");
tzset();
}
}
@@ -695,7 +695,7 @@ assign_client_encoding(const char *value, bool doit, bool interactive)
if (interactive)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("conversion between \"%s\" and \"%s\" is not supported",
+ errmsg("conversion between %s and %s is not supported",
value, GetDatabaseEncodingName())));
return NULL;
}