pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedtesting in ESQL/C if a CUSROR "foo" is open?
2+ messages / 1 participants
[nested] [flat]
* testing in ESQL/C if a CUSROR "foo" is open?
@ 2019-12-27 05:55 Matthias Apitz <guru@unixarea.de>
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Apitz @ 2019-12-27 05:55 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
Is there any way (without looking up the name in table 'pg_cursors') to see if a
cursor "foo" is still open?
Thanks
matthias
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: testing in ESQL/C if a CUSROR "foo" is open?
@ 2019-12-30 07:04 Matthias Apitz <guru@unixarea.de>
parent: Matthias Apitz <guru@unixarea.de>
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Apitz @ 2019-12-30 07:04 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
El día viernes, diciembre 27, 2019 a las 06:55:22a. m. +0100, Matthias Apitz escribió:
>
> Hello,
>
> Is there any way (without looking up the name in table 'pg_cursors') to see if a
> cursor "foo" is still open?
>
I found this hint about 'pg_cursors' in stackoverflow:
https://stackoverflow.com/questions/51146931/postgres-finding-an-open-cursor-and-closing-it
But did no see how to code this in ESQL/C, something like:
EXEC SQL IF EXISTS(SELECT * FROM pg_cursors WHERE name = :cur) THEN CLOSE :cur;
Which does not work. And, what concerns me as well is how expensive such
test is before closing any cursor.
matthias
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-12-30 07:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 05:55 testing in ESQL/C if a CUSROR "foo" is open? Matthias Apitz <guru@unixarea.de>
2019-12-30 07:04 ` Matthias Apitz <guru@unixarea.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox