summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2007-08-11 14:26:34 +0000
committerMarko Kreen2007-08-11 14:26:34 +0000
commit87ca23a3395d750db62d3cdec28f6e313031aa0c (patch)
treebb5cf5e21673aad70d3008d5f2216b40324cb429
parent3c0c7eea7c2d7b80689868205be76c000579aedc (diff)
pgq: 8.3 throws error if varname == funcname
-rw-r--r--sql/pgq/functions/pgq.next_batch.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/pgq/functions/pgq.next_batch.sql b/sql/pgq/functions/pgq.next_batch.sql
index 408ba01a..88a40e4d 100644
--- a/sql/pgq/functions/pgq.next_batch.sql
+++ b/sql/pgq/functions/pgq.next_batch.sql
@@ -17,7 +17,7 @@ returns bigint as $$
-- ----------------------------------------------------------------------
declare
next_tick bigint;
- next_batch bigint;
+ batch_id bigint;
errmsg text;
sub record;
begin
@@ -53,14 +53,14 @@ begin
end if;
-- get next batch
- next_batch := nextval('pgq.batch_id_seq');
+ batch_id := nextval('pgq.batch_id_seq');
update pgq.subscription
- set sub_batch = next_batch,
+ set sub_batch = batch_id,
sub_next_tick = next_tick,
sub_active = now()
where sub_queue = sub.sub_queue
and sub_consumer = sub.sub_consumer;
- return next_batch;
+ return batch_id;
end;
$$ language plpgsql security definer;