summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorStephen Frost2016-04-08 20:56:27 +0000
committerStephen Frost2016-04-08 20:56:27 +0000
commit293007898d3fa5a815c1c5814df53627553f114d (patch)
tree462f41b12ee37a4f0de5b6707bd49b734cb24668 /src/include/utils
parentfa6075e5515c6878b2c1fe1c6435dd7ed847857d (diff)
Reserve the "pg_" namespace for roles
This will prevent users from creating roles which begin with "pg_" and will check for those roles before allowing an upgrade using pg_upgrade. This will allow for default roles to be provided at initdb time. Reviews by José Luis Tallón and Robert Haas
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/acl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 4e15a14d65..d91437b234 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -231,6 +231,7 @@ extern void check_is_member_of_role(Oid member, Oid role);
extern Oid get_role_oid(const char *rolename, bool missing_ok);
extern Oid get_role_oid_or_public(const char *rolename);
extern Oid get_rolespec_oid(const Node *node, bool missing_ok);
+extern void check_rolespec_name(const Node *node, const char *detail_msg);
extern HeapTuple get_rolespec_tuple(const Node *node);
extern char *get_rolespec_name(const Node *node);