1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Fix wording in amvalidate error messages

Remove some gratuituous message differences by making the AM name
previously embedded in each message be a %s instead.  While at it, get
rid of terminology that's unclear and unnecessary in one message.

Discussion: https://postgr.es/m/20170523001557.bq2hbq7hxyvyw62q@alvherre.pgsql
This commit is contained in:
Alvaro Herrera 2017-05-30 15:45:42 -04:00
parent 34782a348d
commit 1849b72169
6 changed files with 106 additions and 106 deletions

View File

@ -112,8 +112,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "brin",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -128,8 +128,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "brin",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -150,8 +150,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "brin",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -179,8 +179,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" contains invalid ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
opfamilyname, "brin",
format_operator(oprform->amopopr))));
result = false;
}
@ -192,8 +192,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "brin",
format_operator(oprform->amopopr))));
result = false;
}
@ -230,8 +230,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" is missing operator(s) for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
opfamilyname, "brin",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -240,8 +240,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator family \"%s\" is missing support function(s) for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing support function(s) for types %s and %s",
opfamilyname, "brin",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -253,8 +253,8 @@ brinvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator class \"%s\" is missing operator(s)",
opclassname)));
errmsg("operator class \"%s\" of access method %s is missing operator(s)",
opclassname, "brin")));
result = false;
}
for (i = 1; i <= BRIN_MANDATORY_NPROCS; i++)
@ -264,8 +264,8 @@ brinvalidate(Oid opclassoid)
continue; /* got it */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("operator class \"%s\" of access method %s is missing support function %d",
opclassname, "brin", i)));
result = false;
}

View File

@ -89,8 +89,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains support procedure %s with cross-type registration",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
opfamilyname, "gin",
format_procedure(procform->amproc))));
result = false;
}
@ -145,8 +145,8 @@ ginvalidate(Oid opclassoid)
default:
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "gin",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -157,8 +157,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "gin",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -176,8 +176,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "gin",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -189,8 +189,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains invalid ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
opfamilyname, "gin",
format_operator(oprform->amopopr))));
result = false;
}
@ -202,8 +202,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "gin",
format_operator(oprform->amopopr))));
result = false;
}
@ -243,8 +243,8 @@ ginvalidate(Oid opclassoid)
continue; /* don't need both, see check below loop */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("operator class \"%s\" of access method %s is missing support function %d",
opclassname, "gin", i)));
result = false;
}
if (!opclassgroup ||
@ -253,8 +253,8 @@ ginvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator class \"%s\" is missing support function %d or %d",
opclassname,
errmsg("operator class \"%s\" of access method %s is missing support function %d or %d",
opclassname, "gin",
GIN_CONSISTENT_PROC, GIN_TRICONSISTENT_PROC)));
result = false;
}

View File

@ -89,8 +89,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains support procedure %s with cross-type registration",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
opfamilyname, "gist",
format_procedure(procform->amproc))));
result = false;
}
@ -142,8 +142,8 @@ gistvalidate(Oid opclassoid)
default:
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "gist",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -154,8 +154,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "gist",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -174,8 +174,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "gist",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -192,8 +192,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains unsupported ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains unsupported ORDER BY specification for operator %s",
opfamilyname, "gist",
format_operator(oprform->amopopr))));
result = false;
}
@ -203,8 +203,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains incorrect ORDER BY opfamily specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains incorrect ORDER BY opfamily specification for operator %s",
opfamilyname, "gist",
format_operator(oprform->amopopr))));
result = false;
}
@ -222,8 +222,8 @@ gistvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "gist",
format_operator(oprform->amopopr))));
result = false;
}
@ -261,8 +261,8 @@ gistvalidate(Oid opclassoid)
continue; /* optional methods */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("operator class \"%s\" of access method %s is missing support function %d",
opclassname, "gist", i)));
result = false;
}

View File

@ -95,8 +95,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains support procedure %s with cross-type registration",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
opfamilyname, "hash",
format_procedure(procform->amproc))));
result = false;
}
@ -110,8 +110,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "hash",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -127,8 +127,8 @@ hashvalidate(Oid opclassoid)
default:
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "hash",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -148,8 +148,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "hash",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -161,8 +161,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains invalid ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
opfamilyname, "hash",
format_operator(oprform->amopopr))));
result = false;
}
@ -174,8 +174,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "hash",
format_operator(oprform->amopopr))));
result = false;
}
@ -186,8 +186,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" lacks support function for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s lacks support function for operator %s",
opfamilyname, "hash",
format_operator(oprform->amopopr))));
result = false;
}
@ -214,8 +214,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" is missing operator(s) for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
opfamilyname, "hash",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -228,8 +228,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator class \"%s\" is missing operator(s)",
opclassname)));
errmsg("operator class \"%s\" of access method %s is missing operator(s)",
opclassname, "hash")));
result = false;
}
@ -244,8 +244,8 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" is missing cross-type operator(s)",
opfamilyname)));
errmsg("operator family \"%s\" of access method %s is missing cross-type operator(s)",
opfamilyname, "hash")));
result = false;
}

View File

@ -97,8 +97,8 @@ btvalidate(Oid opclassoid)
default:
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "btree",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -109,8 +109,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "btree",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -129,8 +129,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "btree",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -142,8 +142,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" contains invalid ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
opfamilyname, "btree",
format_operator(oprform->amopopr))));
result = false;
}
@ -155,8 +155,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "btree",
format_operator(oprform->amopopr))));
result = false;
}
@ -197,8 +197,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" is missing operator(s) for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
opfamilyname, "btree",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -207,8 +207,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" is missing support function for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing support function for types %s and %s",
opfamilyname, "btree",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -221,8 +221,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator class \"%s\" is missing operator(s)",
opclassname)));
errmsg("operator class \"%s\" of access method %s is missing operator(s)",
opclassname, "btree")));
result = false;
}
@ -238,8 +238,8 @@ btvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("btree operator family \"%s\" is missing cross-type operator(s)",
opfamilyname)));
errmsg("operator family \"%s\" of access method %s is missing cross-type operator(s)",
opfamilyname, "btree")));
result = false;
}

View File

@ -89,8 +89,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains support procedure %s with cross-type registration",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
opfamilyname, "spgist",
format_procedure(procform->amproc))));
result = false;
}
@ -112,8 +112,8 @@ spgvalidate(Oid opclassoid)
default:
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains function %s with invalid support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
opfamilyname, "spgist",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -124,8 +124,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains function %s with wrong signature for support number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
opfamilyname, "spgist",
format_procedure(procform->amproc),
procform->amprocnum)));
result = false;
@ -143,8 +143,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains operator %s with invalid strategy number %d",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
opfamilyname, "spgist",
format_operator(oprform->amopopr),
oprform->amopstrategy)));
result = false;
@ -156,8 +156,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains invalid ORDER BY specification for operator %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
opfamilyname, "spgist",
format_operator(oprform->amopopr))));
result = false;
}
@ -169,8 +169,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" contains operator %s with wrong signature",
opfamilyname,
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
opfamilyname, "spgist",
format_operator(oprform->amopopr))));
result = false;
}
@ -197,8 +197,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" is missing operator(s) for types %s and %s",
opfamilyname,
errmsg("operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
opfamilyname, "spgist",
format_type_be(thisgroup->lefttype),
format_type_be(thisgroup->righttype))));
result = false;
@ -217,8 +217,8 @@ spgvalidate(Oid opclassoid)
continue; /* got it */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator family \"%s\" is missing support function %d for type %s",
opfamilyname, i,
errmsg("operator family \"%s\" of access method %s is missing support function %d for type %s",
opfamilyname, "spgist", i,
format_type_be(thisgroup->lefttype))));
result = false;
}
@ -230,8 +230,8 @@ spgvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("spgist operator class \"%s\" is missing operator(s)",
opclassname)));
errmsg("operator class \"%s\" of access method %s is missing operator(s)",
opclassname, "spgist")));
result = false;
}