Re: Named Cursors WITH HOLD

From: Federico Di Gregorio <federico(dot)digregorio(at)dndg(dot)it>
To: psycopg(at)postgresql(dot)org
Subject: Re: Named Cursors WITH HOLD
Date: 2011-07-05 07:26:59
Message-ID: 4E12BCC3.30700@dndg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 05/07/11 09:07, deavid wrote:
> Hi, i'm using psycopg and i'm noticing that Named Cursors are being
> deleted by PostgreSQL whenever i do a commit. This is the default
> behaviour specified in [1], but there is a parameter when creating a
> cursor called "WITH HOLD" that allows a cursor outside any
> transaction.
>
> But i can't see any way in the psycopg API to do this. Maybe a cursor
> factory, but I've no idea on how to do it.

WITH HOLD cursors aren't natively supported by psycopg. You can do your
own cursor management, wait for someone to add this feature or add the
feature yourself (it should be quite easy to add an "hold" option).

federico

--
Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
Studio Associato Di Nunzio e Di Gregorio http://dndg.it
In some countries (e.g., Germany) even many brands of toilet paper have
format A6. [http://www.cl.cam.ac.uk/~mgk25/iso-paper.html]

In response to

Browse psycopg by date

  From Date Subject
Next Message Federico Di Gregorio 2011-07-05 08:29:58 Re: Named Cursors WITH HOLD
Previous Message deavid 2011-07-05 07:07:47 Named Cursors WITH HOLD