Fix wording in amvalidate error messages
authorAlvaro Herrera
Tue, 30 May 2017 19:45:42 +0000 (15:45 -0400)
committerAlvaro Herrera
Tue, 30 May 2017 19:45:42 +0000 (15:45 -0400)
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[email protected]

src/backend/access/brin/brin_validate.c
src/backend/access/gin/ginvalidate.c
src/backend/access/gist/gistvalidate.c
src/backend/access/hash/hashvalidate.c
src/backend/access/nbtree/nbtvalidate.c
src/backend/access/spgist/spgvalidate.c

index 1f1011e0acfc609bd3d52db0b828f16353243424..083fcbebedc449f52fb2f8bb648e0cc0004a8be2 100644 (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;
    }
 
index 032508387d1ac3083f89a49f9ee7ae8917eb169a..3451809ac281dd50dcee3f10ef896707686b134c 100644 (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;
    }
index ffd7fd631b8d40195d309ba82ae6d37a1613206a..a8b49cd4ba5c44be4e3c2d61adb705c2f21faaf3 100644 (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;
    }
 
index d8c5ed4d98e3b3d06f751ba585d9865c2f282483..e05284befd88c0065d72af32c95c54a1e68ae34e 100644 (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;
    }
 
index 7d0bdabc1d3a68b8d367c05a9776c66eac3812f3..5c7192fbbd41fcfb0e4bb7844c09d6d431186769 100644 (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;
    }
 
index 6297111a7ccce03a9ad286f2cb9ea37f81d2e613..9cee2f27c99a0dfac4e135b68c755e1b36b3dfc4 100644 (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;
    }