projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5320949
)
pgq.get_batch_cursor: no need to calculate row count
author
Marko Kreen
<markokr@gmail.com>
Wed, 28 Apr 2010 09:49:56 +0000
(12:49 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 28 Apr 2010 09:49:56 +0000
(12:49 +0300)
sql/pgq/functions/pgq.get_batch_cursor.sql
patch
|
blob
|
blame
|
history
diff --git
a/sql/pgq/functions/pgq.get_batch_cursor.sql
b/sql/pgq/functions/pgq.get_batch_cursor.sql
index ec60b6b7bf40e4d3f81bb8d2e7cb804b957c41ad..b1bb513e4f45181755f0a7ce1aa2f3c01eb90baa 100644
(file)
--- a/
sql/pgq/functions/pgq.get_batch_cursor.sql
+++ b/
sql/pgq/functions/pgq.get_batch_cursor.sql
@@
-30,7
+30,6
@@
returns setof record as $$
-- ----------------------------------------------------------------------
declare
_cname text;
- _rcnt int4;
begin
_cname := quote_ident(i_cursor_name);
@@
-45,12
+44,10
@@
begin
end if;
-- return first block of events
- _rcnt := 0;
for ev_id, ev_time, ev_txid, ev_retry, ev_type, ev_data,
ev_extra1, ev_extra2, ev_extra3, ev_extra4
in execute 'fetch ' || i_quick_limit || ' from ' || _cname
loop
- _rcnt := _rcnt + 1;
return next;
end loop;