From b690fbe239c1ea0342f93475a225a2415e4c08f6 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 4 Apr 2007 14:27:29 +0000 Subject: [PATCH] when no repositioning is needed, no need to panic --- sql/pgq/functions/pgq.register_consumer.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/pgq/functions/pgq.register_consumer.sql b/sql/pgq/functions/pgq.register_consumer.sql index 7d387dab..30d38792 100644 --- a/sql/pgq/functions/pgq.register_consumer.sql +++ b/sql/pgq/functions/pgq.register_consumer.sql @@ -82,10 +82,10 @@ begin where sub_consumer = x_consumer_id and sub_queue = x_queue_id; if found then - if sub.sub_batch is not null then - raise exception 'reposition while active not allowed'; - end if; if x_tick_pos is not null then + if sub.sub_batch is not null then + raise exception 'reposition while active not allowed'; + end if; -- update tick pos if requested update pgq.subscription set sub_last_tick = x_tick_pos -- 2.39.5