Search Postgresql Archives

Re: cursor already in use error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 02, 2005 at 11:15:52AM +0200, Sim Zacks wrote:

> select name,testcursor(testid) from test; --doesn't work
> select name,testcursor(testid) from test where testid=1; -- works (as does
> testid=2 or 3)

If I add "close crs;" before the function returns, I get this:

SELECT name, testcursor(testid) FROM test;
 name |           testcursor           
------+--------------------------------
 Bob  | -Comment 1-Comment 2-Comment 3
 Mark | -Comment 1
 Tom  | 
(3 rows)

Is that what you're after?  If so, then the problem might simply
be that you're not closing the cursor when you're done with it.
Will closing it work in the real code?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux