Questions on Cursors in PostgreSQL

Wei Shan <[email protected]> Tue, 27 Jun 2017 18:07:57 +0100
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <CAFe9ZTov6QotwvyAmd_ibyXi=KYQpvLNgcCCV-0ZaLeZUjaqPw@mail.gmail.com>
--001a11442c2af8f4f90552f41b24
Content-Type: text/plain; charset="UTF-8"

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.
   2. 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.

Thanks!

-- 
Regards,
Ang Wei Shan

--001a11442c2af8f4f90552f41b24
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi all,<div><br></div><div>I have some questions on Postgr=
eSQL cursors (not PL/pgSQL but the libpq implementation):=C2=A0</div><div><=
br></div><div><ol><li>What happens when my cursor hit the end of the table?=
 Does it close automatically? I suppose if I declare it as a SCROLLABLE cur=
sor, it should not close at all.</li><li>If I have declared a cursor and th=
e session got disconnected, can I reattach back to the cursor if I know the=
 cursor name? I believe this is not possible but I&#39;m not very sure.</li=
></ol></div><div><div>Thanks!</div><div><br></div>-- <br><div class=3D"gmai=
l_signature">Regards,<br>Ang Wei Shan</div>
</div></div>

--001a11442c2af8f4f90552f41b24--