Checking cursor's state in plpgsql

Started by Sibte Abbasabout 21 years ago3 messagesgeneral
Jump to latest
#1Sibte Abbas
sibtay@gmail.com

Hello all

Can we check whether a cursor is OPEN or not in plpgsql.
Like in oracle you can check a CURSOR'S state with <CURSOR_VAR>%ISOPEN

After navigating the documentation i was not able to find an
equivalent in plpgsql.

Do we have an alternative to this in plpgsql?

Thankz

#2Bruce Momjian
bruce@momjian.us
In reply to: Sibte Abbas (#1)
Re: Checking cursor's state in plpgsql

Sibtay Abbas wrote:

Hello all

Can we check whether a cursor is OPEN or not in plpgsql.
Like in oracle you can check a CURSOR'S state with <CURSOR_VAR>%ISOPEN

No, but we do have a TODO item:

o Allow pooled connections to list all open WITH HOLD cursors

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Sibte Abbas
sibtay@gmail.com
In reply to: Bruce Momjian (#2)
Re: Checking cursor's state in plpgsql

thankz :-)

Show quoted text

On 4/10/05, Bruce Momjian <pgman@candle.pha.pa.us> wrote:

Sibtay Abbas wrote:

Hello all

Can we check whether a cursor is OPEN or not in plpgsql.
Like in oracle you can check a CURSOR'S state with <CURSOR_VAR>%ISOPEN

No, but we do have a TODO item:

o Allow pooled connections to list all open WITH HOLD cursors

--
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 359-1001
+  If your life is a hard drive,     |  13 Roberts Road
+  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073