Reuse of REF Cursor - Mailing list pgsql-general

From Abraham, Danny
Subject Reuse of REF Cursor
Date
Msg-id PH0PR02MB74461F234A7AD20FA8FB70588E719@PH0PR02MB7446.namprd02.prod.outlook.com
Whole thread Raw
Responses Re: Reuse of REF Cursor  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Reuse of REF Cursor  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Has anybody faced a problem with reusing a ref cursor?

C1 refcursor;
....
   stmt := 'select1 ' ;
   open C1 for execute  stmt;
   fetch C1 into rc1;
   close C1;

   stmt := 'select2 ...' ;
   open C1 for execute  stmt;
   fetch C1 into rc2;
   close C1;

???

I am getting inconsistent errors:   IDTCONTEXT:  PL/pgSQL function ...... ) line 42 at FETCH

PG Version 9.5.5 on Linux.

Thanks

Danny



pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: The Amazon CloudFront distribution is configured to block access from your country.
Next
From: Vincent Veyron
Date:
Subject: Re: Who altered the database?