public inbox for [email protected]
help / color / mirror / Atom feedFrom: Wei Shan <[email protected]>
To: Dmitry Igrishin <[email protected]>
Cc: [email protected]
Subject: Re: Questions on Cursors in PostgreSQL
Date: Tue, 4 Jul 2017 09:53:08 +0100
Message-ID: <CAFe9ZTo-wOVKjD0bgkEE=CS3N=qDpk60OE7VuLOng9-GmaMS1Q@mail.gmail.com> (raw)
In-Reply-To: <CAAfz9KOYXULgqb-YChRYCY6c+i6V+MUE1xSoNzBiJhNO6KmaJg@mail.gmail.com>
References: <CAFe9ZTov6QotwvyAmd_ibyXi=KYQpvLNgcCCV-0ZaLeZUjaqPw@mail.gmail.com>
<CAAfz9KOYXULgqb-YChRYCY6c+i6V+MUE1xSoNzBiJhNO6KmaJg@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-interfaces>
Thanks a lot!
On 27 Jun 2017 18:53, "Dmitry Igrishin" <[email protected]> wrote:
2017-06-27 20:07 GMT+03:00 Wei Shan <[email protected]>:
> Hi all,
>
> I have some questions on PostgreSQL cursors (not PL/pgSQL but the libpq
> implementation):
>
>
> 1. What happens when my cursor hit the end of the table? Does it close
> automatically? I suppose if I declare it as a SCROLLABLE cursor, it should
> not close at all.
>
> The lifetime of cursors created by the DECLARE ... SQL command longs until
the end of the session, or until it explicitly closed by either CLOSE ...
or DISCARD SQL commands.
>
> 1. If I have declared a cursor and the session got disconnected, can I
> reattach back to the cursor if I know the cursor name? I believe this is
> not possible but I'm not very sure.
>
> When session ends all cursors are deallocated automatically. You should
open the new cursor on reconnect.
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Questions on Cursors in PostgreSQL
In-Reply-To: <CAFe9ZTo-wOVKjD0bgkEE=CS3N=qDpk60OE7VuLOng9-GmaMS1Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox