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
Copy file name to clipboardExpand all lines: nix/tests/sql/pgmq_data_api_wrapper.sql
+33-33Lines changed: 33 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ alter role authenticated set statement_timeout = '8s';
67
67
createschemaif not exists queues_public;
68
68
grant usage on schema queues_public to postgres, anon, authenticated, service_role;
69
69
70
-
create or replacefunctionqueues_public.pop(
70
+
create or replacefunctionqueues_public.queue_pop(
71
71
queue_name text
72
72
)
73
73
returns setof pgmq.message_record
@@ -83,10 +83,10 @@ begin
83
83
end;
84
84
$$;
85
85
86
-
comment on function queues_public.pop(queue_name text) is 'Retrieves and locks the next message from the specified queue.';
86
+
comment on function queues_public.queue_pop(queue_name text) is 'Retrieves and locks the next message from the specified queue.';
87
87
88
88
89
-
create or replacefunctionqueues_public.send(
89
+
create or replacefunctionqueues_public.queue_send(
90
90
queue_name text,
91
91
message jsonb,
92
92
sleep_seconds integer default 0-- renamed from 'delay'
@@ -106,10 +106,10 @@ begin
106
106
end;
107
107
$$;
108
108
109
-
comment on function queues_public.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.';
109
+
comment on function queues_public.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.';
110
110
111
111
112
-
create or replacefunctionqueues_public.send_batch(
112
+
create or replacefunctionqueues_public.queue_send_batch(
113
113
queue_name text,
114
114
messages jsonb[],
115
115
sleep_seconds integer default 0-- renamed from 'delay'
@@ -129,10 +129,10 @@ begin
129
129
end;
130
130
$$;
131
131
132
-
comment on function queues_public.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.';
132
+
comment on function queues_public.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.';
133
133
134
134
135
-
create or replacefunctionqueues_public.archive(
135
+
create or replacefunctionqueues_public.queue_archive(
136
136
queue_name text,
137
137
message_id bigint
138
138
)
@@ -149,10 +149,10 @@ begin
149
149
end;
150
150
$$;
151
151
152
-
comment on function queues_public.archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
152
+
comment on function queues_public.queue_archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
153
153
154
154
155
-
create or replacefunctionqueues_public.archive(
155
+
create or replacefunctionqueues_public.queue_archive(
156
156
queue_name text,
157
157
message_id bigint
158
158
)
@@ -169,10 +169,10 @@ begin
169
169
end;
170
170
$$;
171
171
172
-
comment on function queues_public.archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
172
+
comment on function queues_public.queue_archive(queue_name text, message_id bigint) is 'Archives a message by moving it from the queue to a permanent archive.';
173
173
174
174
175
-
create or replacefunctionqueues_public.delete(
175
+
create or replacefunctionqueues_public.queue_delete(
176
176
queue_name text,
177
177
message_id bigint
178
178
)
@@ -189,9 +189,9 @@ begin
189
189
end;
190
190
$$;
191
191
192
-
comment on function queues_public.delete(queue_name text, message_id bigint) is 'Permanently deletes a message from the specified queue.';
192
+
comment on function queues_public.queue_delete(queue_name text, message_id bigint) is 'Permanently deletes a message from the specified queue.';
193
193
194
-
create or replacefunctionqueues_public.read(
194
+
create or replacefunctionqueues_public.queue_read(
195
195
queue_name text,
196
196
sleep_seconds integer,
197
197
n integer
@@ -211,26 +211,26 @@ begin
211
211
end;
212
212
$$;
213
213
214
-
comment on function queues_public.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).';
214
+
comment on function queues_public.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).';
215
215
216
216
-- Grant execute permissions on wrapper functions to roles
217
-
grant execute on function queues_public.pop(text) to postgres, service_role, anon, authenticated;
217
+
grant execute on function queues_public.queue_pop(text) to postgres, service_role, anon, authenticated;
218
218
grant execute on function pgmq.pop(text) to postgres, service_role, anon, authenticated;
219
219
220
220
221
-
grant execute on function queues_public.send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
221
+
grant execute on function queues_public.queue_send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
222
222
grant execute on function pgmq.send(text, jsonb, integer) to postgres, service_role, anon, authenticated;
223
223
224
-
grant execute on function queues_public.send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
224
+
grant execute on function queues_public.queue_send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
225
225
grant execute on function pgmq.send_batch(text, jsonb[], integer) to postgres, service_role, anon, authenticated;
226
226
227
-
grant execute on function queues_public.archive(text, bigint) to postgres, service_role, anon, authenticated;
227
+
grant execute on function queues_public.queue_archive(text, bigint) to postgres, service_role, anon, authenticated;
228
228
grant execute on function pgmq.archive(text, bigint) to postgres, service_role, anon, authenticated;
229
229
230
-
grant execute on function queues_public.delete(text, bigint) to postgres, service_role, anon, authenticated;
230
+
grant execute on function queues_public.queue_delete(text, bigint) to postgres, service_role, anon, authenticated;
231
231
grant execute on function pgmq.delete(text, bigint) to postgres, service_role, anon, authenticated;
232
232
233
-
grant execute on function queues_public.read(text, integer, integer) to postgres, service_role, anon, authenticated;
233
+
grant execute on function queues_public.queue_read(text, integer, integer) to postgres, service_role, anon, authenticated;
234
234
grant execute on function pgmq.read(text, integer, integer, jsonb) to postgres, service_role, anon, authenticated;
0 commit comments