You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grant usage on schema ${QUEUES_SCHEMA} to postgres, anon, authenticated, service_role;
21
21
22
-
create or replace function ${QUEUES_SCHEMA}.queue_pop(
22
+
create or replace function ${QUEUES_SCHEMA}.pop(
23
23
queue_name text
24
24
)
25
25
returns setof pgmq.message_record
@@ -35,10 +35,10 @@ begin
35
35
end;
36
36
$$;
37
37
38
-
comment on function ${QUEUES_SCHEMA}.queue_pop(queue_name text) is 'Retrieves and locks the next message from the specified queue.';
38
+
comment on function ${QUEUES_SCHEMA}.pop(queue_name text) is 'Retrieves and locks the next message from the specified queue.';
39
39
40
40
41
-
create or replace function ${QUEUES_SCHEMA}.queue_send(
41
+
create or replace function ${QUEUES_SCHEMA}.send(
42
42
queue_name text,
43
43
message jsonb,
44
44
sleep_seconds integer default 0 -- renamed from 'delay'
@@ -58,10 +58,10 @@ begin
58
58
end;
59
59
$$;
60
60
61
-
comment on function ${QUEUES_SCHEMA}.queue_send(queue_name text, message jsonb, sleep_seconds integer) is 'Sends a message to the specified queue, optionally delaying its availability by a number of seconds.';
61
+
comment on function ${QUEUES_SCHEMA}.send(queue_name text, message jsonb, sleep_seconds integer) is 'Sends a message to the specified queue, optionally delaying its availability by a number of seconds.';
62
62
63
63
64
-
create or replace function ${QUEUES_SCHEMA}.queue_send_batch(
64
+
create or replace function ${QUEUES_SCHEMA}.send_batch(
65
65
queue_name text,
66
66
messages jsonb[],
67
67
sleep_seconds integer default 0 -- renamed from 'delay'
@@ -81,10 +81,10 @@ begin
81
81
end;
82
82
$$;
83
83
84
-
comment on function ${QUEUES_SCHEMA}.queue_send_batch(queue_name text, messages jsonb[], sleep_seconds integer) is 'Sends a batch of messages to the specified queue, optionally delaying their availability by a number of seconds.';
84
+
comment on function ${QUEUES_SCHEMA}.send_batch(queue_name text, messages jsonb[], sleep_seconds integer) is 'Sends a batch of messages to the specified queue, optionally delaying their availability by a number of seconds.';
85
85
86
86
87
-
create or replace function ${QUEUES_SCHEMA}.queue_archive(
87
+
create or replace function ${QUEUES_SCHEMA}.archive(
88
88
queue_name text,
89
89
message_id bigint
90
90
)
@@ -101,10 +101,10 @@ begin
101
101
end;
102
102
$$;
103
103
104
-
comment on function ${QUEUES_SCHEMA}.queue_archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
104
+
comment on function ${QUEUES_SCHEMA}.archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
105
105
106
106
107
-
create or replace function ${QUEUES_SCHEMA}.queue_archive(
107
+
create or replace function ${QUEUES_SCHEMA}.archive(
108
108
queue_name text,
109
109
message_id bigint
110
110
)
@@ -121,10 +121,10 @@ begin
121
121
end;
122
122
$$;
123
123
124
-
comment on function ${QUEUES_SCHEMA}.queue_archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
124
+
comment on function ${QUEUES_SCHEMA}.archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
125
125
126
126
127
-
create or replace function ${QUEUES_SCHEMA}.queue_delete(
127
+
create or replace function ${QUEUES_SCHEMA}.delete(
128
128
queue_name text,
129
129
message_id bigint
130
130
)
@@ -141,9 +141,9 @@ begin
141
141
end;
142
142
$$;
143
143
144
-
comment on function ${QUEUES_SCHEMA}.queue_delete(queue_name text, message_id bigint) is 'Permanently deletes a message from the specified queue.';
144
+
comment on function ${QUEUES_SCHEMA}.delete(queue_name text, message_id bigint) is 'Permanently deletes a message from the specified queue.';
145
145
146
-
create or replace function ${QUEUES_SCHEMA}.queue_read(
146
+
create or replace function ${QUEUES_SCHEMA}.read(
147
147
queue_name text,
148
148
sleep_seconds integer,
149
149
n integer
@@ -163,25 +163,25 @@ begin
163
163
end;
164
164
$$;
165
165
166
-
comment on function ${QUEUES_SCHEMA}.queue_read(queue_name text, sleep_seconds integer, n integer) is 'Reads up to "n" messages from the specified queue with an optional "sleep_seconds" (visibility timeout).';
166
+
comment on function ${QUEUES_SCHEMA}.read(queue_name text, sleep_seconds integer, n integer) is 'Reads up to "n" messages from the specified queue with an optional "sleep_seconds" (visibility timeout).';
167
167
168
168
-- Grant execute permissions on wrapper functions to roles
169
-
grant execute on function ${QUEUES_SCHEMA}.queue_pop(text) to postgres, service_role, anon, authenticated;
169
+
grant execute on function ${QUEUES_SCHEMA}.pop(text) to postgres, service_role, anon, authenticated;
170
170
grant execute on function pgmq.pop(text) to postgres, service_role, anon, authenticated;
171
171
172
-
grant execute on function ${QUEUES_SCHEMA}.queue_send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
172
+
grant execute on function ${QUEUES_SCHEMA}.send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
173
173
grant execute on function pgmq.send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
174
174
175
-
grant execute on function ${QUEUES_SCHEMA}.queue_send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
175
+
grant execute on function ${QUEUES_SCHEMA}.send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
176
176
grant execute on function pgmq.send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
177
177
178
-
grant execute on function ${QUEUES_SCHEMA}.queue_archive(text, bigint) to postgres, service_role, anon, authenticated;
178
+
grant execute on function ${QUEUES_SCHEMA}.archive(text, bigint) to postgres, service_role, anon, authenticated;
179
179
grant execute on function pgmq.archive(text, bigint) to postgres, service_role, anon, authenticated;
180
180
181
-
grant execute on function ${QUEUES_SCHEMA}.queue_delete(text, bigint) to postgres, service_role, anon, authenticated;
181
+
grant execute on function ${QUEUES_SCHEMA}.delete(text, bigint) to postgres, service_role, anon, authenticated;
182
182
grant execute on function pgmq.delete(text, bigint) to postgres, service_role, anon, authenticated;
183
183
184
-
grant execute on function ${QUEUES_SCHEMA}.queue_read(text, integer, integer) to postgres, service_role, anon, authenticated;
184
+
grant execute on function ${QUEUES_SCHEMA}.read(text, integer, integer) to postgres, service_role, anon, authenticated;
185
185
grant execute on function pgmq.read(text, integer, integer) to postgres, service_role, anon, authenticated;
186
186
187
187
-- For the service role, we want full access
@@ -196,12 +196,12 @@ grant usage on schema pgmq to postgres, anon, authenticated, service_role;
0 commit comments