On lau, 2007-06-16 at 18:58 -0700, Ottavio Campana wrote:
> Martijn van Oosterhout wrote:
> >
> > Cursors are attached to the transactio and session, if either ends, the
> > cursor dies with it...
> >
> > Have a nice day,
>
> another question:
>
> since they live in a transaction, how can they
Martijn van Oosterhout wrote:
>> One last question: what happens to unclosed cursors? I mean, suppose an
>> application opens a cursor and crashes. What happens to that cursor? Is
>> there a way to close idle cursors?
>
> Cursors are attached to the transactio and session, if either ends, the
> cu
On Sat, Jun 16, 2007 at 09:58:27AM -0700, Ottavio Campana wrote:
> At this point I'm not able to understand any more if cursor are useful
> to reduce computational needs compared to running the same query each
> time with limit and offset.
A cursor is generally much cheaper because you only execut
Ottavio Campana <[EMAIL PROTECTED]> writes:
> Postgresql doc says "a cursor that encapsulates the query, and then read
> the query result a few rows at a time." So, when I open a cursor, is all
> the query executed
No, just enough to give you the rows you ask for. Otherwise the query
state is hel