Questions on Cursors in PostgreSQL

From: Wei Shan <weishan(dot)ang(at)gmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Questions on Cursors in PostgreSQL
Date: 2017-06-27 17:07:57
Message-ID: CAFe9ZTov6QotwvyAmd_ibyXi=KYQpvLNgcCCV-0ZaLeZUjaqPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dmitry Igrishin 2017-06-27 17:53:08 Re: Questions on Cursors in PostgreSQL
Previous Message Tom Lane 2017-05-04 04:12:49 Re: PostgreSQL, and ODBC statement handles