Re: about cursors

From: Ottavio Campana <ottavio(at)campana(dot)vi(dot)it>
To: Ottavio Campana <ottavio(at)campana(dot)vi(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: about cursors
Date: 2007-06-17 01:58:28
Message-ID: 46749544.2050009@campana.vi.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
> cursor dies with it...
>
> Have a nice day,

another question:

since they live in a transaction, how can they be used in web apps?
Suppose you want to display only a subset of records a time in a page,
each time you load a page you have to start a new transaction and
therefore you need a new cursor, or not?

--
Non c'e' piu' forza nella normalita', c'e' solo monotonia.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message marcelo Cortez 2007-06-17 04:04:19 help with libpq program
Previous Message Andrej Ricnik-Bay 2007-06-17 00:01:22 Re: PHP sucks!! - was: persistent db connections in PHP