summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2017-11-26 09:50:15 -0800
committerJoe Conway <mail@joeconway.com>2017-11-26 09:50:15 -0800
commit997015ef231ac4b5aac6a2437e5fa8eaac253fbb (patch)
tree81a68e8f782ffc12f60ec9683ecf38d98987fbaf
parentcd3bde814612ffebe11a754116a70010ae195784 (diff)
Make has_sequence_privilege support WITH GRANT OPTION
The various has_*_privilege() functions all support an optional WITH GRANT OPTION added to the supported privilege types to test whether the privilege is held with grant option. That is, all except has_sequence_privilege() variations. Fix that. Back-patch to all supported branches. Discussion: https://postgr.es/m/005147f6-8280-42e9-5a03-dd2c1e4397ef@joeconway.com
-rw-r--r--src/backend/utils/adt/acl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 061d71edf8e..be70cc0409a 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -2244,8 +2244,11 @@ convert_sequence_priv_string(text *priv_type_text)
{
static const priv_map sequence_priv_map[] = {
{"USAGE", ACL_USAGE},
+ {"USAGE WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_USAGE)},
{"SELECT", ACL_SELECT},
+ {"SELECT WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_SELECT)},
{"UPDATE", ACL_UPDATE},
+ {"UPDATE WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_UPDATE)},
{NULL, 0}
};