]> granicus.if.org Git - postgresql/commitdiff
sepgsql: Improve error message when unsupported object type is labeled.
authorRobert Haas <rhaas@postgresql.org>
Wed, 11 Mar 2015 16:12:10 +0000 (12:12 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 11 Mar 2015 16:12:10 +0000 (12:12 -0400)
KaiGai Kohei, reviewed by Álvaro Herrera and myself

contrib/sepgsql/label.c

index 5e8705131c0b6a2f2f63dfa5d9827e166336d195..ef7661c82e85559352e887d9d79ba56b731472dd 100644 (file)
@@ -532,7 +532,10 @@ sepgsql_object_relabel(const ObjectAddress *object, const char *seclabel)
                        break;
 
                default:
-                       elog(ERROR, "unsupported object type: %u", object->classId);
+                       ereport(ERROR,
+                                       (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                                        errmsg("sepgsql provider does not support labels on %s",
+                                                       getObjectTypeDescription(object))));
                        break;
        }
 }