mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
More message editing, some suggested by Alvaro Herrera
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.123 2003/09/25 06:57:58 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.124 2003/09/29 00:05:24 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -200,7 +200,7 @@ createdb(const CreatedbStmt *stmt)
|
||||
if (dbpath != NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot use an alternate location on this platform")));
|
||||
errmsg("cannot use an alternative location on this platform")));
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.36 2003/09/25 06:57:58 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.37 2003/09/29 00:05:24 petere Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* These routines take the parse tree and pick out the
|
||||
@@ -441,13 +441,8 @@ CreateFunction(CreateFunctionStmt *stmt)
|
||||
errmsg("language \"%s\" does not exist", languageName),
|
||||
(strcmp(languageName, "plperl") == 0 ||
|
||||
strcmp(languageName, "plperlu") == 0 ||
|
||||
strcmp(languageName, "plphp") == 0 ||
|
||||
strcmp(languageName, "plpgsql") == 0 ||
|
||||
strcmp(languageName, "plpython") == 0 ||
|
||||
strcmp(languageName, "plpythonu") == 0 ||
|
||||
strcmp(languageName, "plr") == 0 ||
|
||||
strcmp(languageName, "plruby") == 0 ||
|
||||
strcmp(languageName, "plsh") == 0 ||
|
||||
strcmp(languageName, "pltcl") == 0 ||
|
||||
strcmp(languageName, "pltclu") == 0) ?
|
||||
errhint("You need to use \"createlang\" to load the language into the database.") : 0));
|
||||
@@ -948,7 +943,7 @@ CreateCast(CreateCastStmt *stmt)
|
||||
typ1align != typ2align)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("source and target datatypes are not physically compatible")));
|
||||
errmsg("source and target data types are not physically compatible")));
|
||||
}
|
||||
|
||||
/* convert CoercionContext enum to char value for castcontext */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.111 2003/09/26 15:27:31 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.112 2003/09/29 00:05:24 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -648,7 +648,7 @@ ReindexTable(RangeVar *relation, bool force /* currently unused */ )
|
||||
if (((Form_pg_class) GETSTRUCT(tuple))->relisshared && IsUnderPostmaster)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("shared table \"%s\" can only be reindexed in standalone mode",
|
||||
errmsg("shared table \"%s\" can only be reindexed in stand-alone mode",
|
||||
relation->relname)));
|
||||
|
||||
ReleaseSysCache(tuple);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.83 2003/09/25 06:57:58 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.84 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4075,7 +4075,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent)
|
||||
if (shared_relation && IsUnderPostmaster)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("shared relations cannot be toasted after initdb")));
|
||||
errmsg("shared tables cannot be toasted after initdb")));
|
||||
|
||||
/*
|
||||
* Is it already toasted?
|
||||
@@ -4090,7 +4090,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent)
|
||||
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("relation \"%s\" already has a TOAST table",
|
||||
errmsg("tables \"%s\" already has a TOAST table",
|
||||
RelationGetRelationName(rel))));
|
||||
}
|
||||
|
||||
@@ -4107,7 +4107,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent)
|
||||
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("relation \"%s\" does not need a TOAST table",
|
||||
errmsg("table \"%s\" does not need a TOAST table",
|
||||
RelationGetRelationName(rel))));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.46 2003/09/25 06:57:58 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.47 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@@ -1554,9 +1554,9 @@ AlterDomainAddConstraint(List *names, Node *newConstraint)
|
||||
if (!isNull && !DatumGetBool(conResult))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_CHECK_VIOLATION),
|
||||
errmsg("relation \"%s\" column \"%s\" contains values that violate the new constraint",
|
||||
RelationGetRelationName(testrel),
|
||||
NameStr(tupdesc->attrs[attnum - 1]->attname))));
|
||||
errmsg("column \"%s\" of table \"%s\" contains values that violate the new constraint",
|
||||
NameStr(tupdesc->attrs[attnum - 1]->attname),
|
||||
RelationGetRelationName(testrel))));
|
||||
}
|
||||
|
||||
ResetExprContext(econtext);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.126 2003/09/25 06:57:59 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.127 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1227,7 +1227,7 @@ CheckPgUserAclNotNull(void)
|
||||
if (heap_attisnull(htup, Anum_pg_class_relacl))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("before using passwords you must revoke permissions on %s",
|
||||
errmsg("before using passwords you must revoke privileges on %s",
|
||||
ShadowRelationName),
|
||||
errdetail("This restriction is to prevent unprivileged users from reading the passwords."),
|
||||
errhint("Try REVOKE ALL ON \"%s\" FROM PUBLIC.",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.261 2003/09/25 06:57:59 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.262 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2726,7 +2726,7 @@ vacuum_index(VacPageList vacpagelist, Relation indrel,
|
||||
if (stats->num_index_tuples > num_tuples + keep_tuples ||
|
||||
!vac_is_partial_index(indrel))
|
||||
ereport(WARNING,
|
||||
(errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f tuples",
|
||||
(errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f row versions",
|
||||
RelationGetRelationName(indrel),
|
||||
stats->num_index_tuples, num_tuples + keep_tuples),
|
||||
errhint("Rebuild the index with REINDEX.")));
|
||||
|
||||
Reference in New Issue
Block a user