Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group