summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2013-08-18 15:27:33 +0000
committerMarko Kreen2013-08-18 15:27:33 +0000
commit1efc56f82431261ca350a927d55ab261f8c057b4 (patch)
treed93c353eeffa6b3d4f6d9cc99ab90457a387f337
parentb757934182c85ece36ce76d91fde22e8ccf60987 (diff)
sql/pgq: fix retry-queue vs. newgrants
-rw-r--r--sql/pgq/functions/pgq.grant_perms.sql3
-rw-r--r--sql/pgq/structure/grants.ini2
2 files changed, 3 insertions, 2 deletions
diff --git a/sql/pgq/functions/pgq.grant_perms.sql b/sql/pgq/functions/pgq.grant_perms.sql
index 97412367..a64e9fc6 100644
--- a/sql/pgq/functions/pgq.grant_perms.sql
+++ b/sql/pgq/functions/pgq.grant_perms.sql
@@ -42,7 +42,8 @@ begin
-- event seq
execute 'grant select on ' || pgq.quote_fqname(q.queue_event_seq) || ' to public';
-
+ execute 'grant usage on ' || pgq.quote_fqname(q.queue_event_seq) || ' to pgq_admin';
+
-- set grants on parent table
perform pgq._grant_perms_from('pgq', 'event_template', dst_schema, dst_table);
diff --git a/sql/pgq/structure/grants.ini b/sql/pgq/structure/grants.ini
index b83d27c5..96b59c3f 100644
--- a/sql/pgq/structure/grants.ini
+++ b/sql/pgq/structure/grants.ini
@@ -31,7 +31,7 @@ public = select
[5.event.tables]
on.tables = pgq.event_template
pgq_reader = select
-pgq_admin = select, truncate
+pgq_admin = select, insert, truncate
# drop public access to events
public =