Re: plpgsql does not close cursors when a block ends

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Marcel Gsteiger <Marcel(dot)Gsteiger(at)milprog(dot)ch>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plpgsql does not close cursors when a block ends
Date: 2003-11-13 15:16:39
Message-ID: 200311131516.hADFGd915980@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Marcel Gsteiger wrote:
> I created a plpgsql function declaring and then using a cursor.
> After opening and using this cursor, I forgot to close it. Now
> when the function terminates, this cursor remains open. Then,
> when I call the function again with other parameters, the OPEN
> CURSOR complains about the cursor declared within the function
> already being open.

The system is working as designed.

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-11-13 15:43:07 Re:
Previous Message Marcel Gsteiger 2003-11-13 08:47:40 plpgsql does not close cursors when a block ends