Bug(?) with cursors using aggregate functions.

From: Benjamin Scherrey <scherrey(at)proteus-tech(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Bug(?) with cursors using aggregate functions.
Date: 2003-04-28 23:32:24
Message-ID: 8LMI1XA7YYWPLHE641V32B7SRYH.3eadba08@bonzoii
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've been developing a web-based selection browser using cursors and discovered a
very frustrating little feature as I try to MOVE FORWARD/BACKWARD through my selection. If, for
a normal select statement (select this, that from table) I have no worries trying to tell my cursor to
move forwards or backwards any number of positions, even beyond the beginning or end - in which
case, it just will stay put as one might expect. However, if I pass in a select statement that uses an
aggregate function (select sum(this), that from table) then as soon as I try to scroll off the end or
prior to the beginning my cursor is busted and no longer fetchable. I have not tried to find out what
other functions or options (like grouping) have similar effects yet so the list isn't exhaustive. This is
all under Postgres 7.3 and 7.3.2 under linux and cygwin respectively.

Is this a known bug? Any ability for me to ask my cursor what its present absolute offset is
(so I don't ask it to scroll past the end accidently)? Any other workarounds? This is making it quite
difficult for me to implement my browser cleanly.

thanx & later,

Ben Scherrey

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-04-28 23:38:04 Re: Solaris
Previous Message Alvaro Herrera Munoz 2003-04-28 23:26:24 Re: adding times togeather