sepgsql: Improve error message when unsupported object type is labeled.

KaiGai Kohei, reviewed by Álvaro Herrera and myself
This commit is contained in:
Robert Haas 2015-03-11 12:12:10 -04:00
parent e529cd4ffa
commit e96b7c6b9f
1 changed files with 4 additions and 1 deletions

View 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;
}
}