Re: Cursor Not Found - Mailing list pgsql-general

From Tom Lane
Subject Re: Cursor Not Found
Date
Msg-id 22144.1073281838@sss.pgh.pa.us
Whole thread Raw
In response to Cursor Not Found  (Lynn.Tilby@asu.edu)
List pgsql-general
Lynn.Tilby@asu.edu writes:
> I have an embedded sql program with a while loop. I declare
> and open a cursor before the while. The fetch forward next
> is inside the while.  The first time through the while
> the cursor works perfectly the second time I get the error:

> sql error PerformPortalFetch: portal "foo_crsr" not found

Sounds like you need to hold a transaction open (BEGIN/END block)
around your use of the cursor.

            regards, tom lane

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Is my MySQL Gaining ?
Next
From: Tom Lane
Date:
Subject: Re: why the need for is null?