summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorJoe Conway2015-07-07 02:16:53 +0000
committerJoe Conway2015-07-07 02:16:53 +0000
commit02eac01f91923592f93abf8d325ab806b058f948 (patch)
treef1887950facb0431fd688fe73768202e9f8886fb /src/backend/commands
parent6c534fd68568452adcc9ccecb557eff74f6f0f4d (diff)
Make RLS related error messages more consistent and compliant.
Also updated regression expected output to match. Noted and patch by Daniele Varrazzo.
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/policy.c6
-rw-r--r--src/backend/commands/user.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c
index 6e95ba28b9d..11efc9f30f1 100644
--- a/src/backend/commands/policy.c
+++ b/src/backend/commands/policy.c
@@ -563,7 +563,7 @@ CreatePolicy(CreatePolicyStmt *stmt)
if (HeapTupleIsValid(policy_tuple))
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_OBJECT),
- errmsg("policy \"%s\" for relation \"%s\" already exists",
+ errmsg("policy \"%s\" for table \"%s\" already exists",
stmt->policy_name, RelationGetRelationName(target_table))));
values[Anum_pg_policy_polrelid - 1] = ObjectIdGetDatum(table_id);
@@ -735,7 +735,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
if (!HeapTupleIsValid(policy_tuple))
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("policy \"%s\" on table \"%s\" does not exist",
+ errmsg("policy \"%s\" for table \"%s\" does not exist",
stmt->policy_name,
RelationGetRelationName(target_table))));
@@ -977,7 +977,7 @@ get_relation_policy_oid(Oid relid, const char *policy_name, bool missing_ok)
if (!missing_ok)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("policy \"%s\" for table \"%s\" does not exist",
+ errmsg("policy \"%s\" for table \"%s\" does not exist",
policy_name, get_rel_name(relid))));
policy_oid = InvalidOid;
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 3b381c58353..5b20994028d 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -301,7 +301,7 @@ CreateRole(CreateRoleStmt *stmt)
if (!superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser to change bypassrls attribute.")));
+ errmsg("must be superuser to change bypassrls attribute")));
}
else
{