mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
A visit from the message-style police ...
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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))));
|
||||
|
||||
|
||||
@@ -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))));
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user