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

Re: ECPG and CURSOR declaration

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Frost, Mr(dot) Michael (contractor)" <frost(at)nrlmry(dot)navy(dot)mil>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG and CURSOR declaration
Date: 2005-01-15 19:21:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Wed, Jan 12, 2005 at 08:04:24AM -0800, Frost, Mr. Michael (contractor) wrote:

> Hi All.  The following code compiles and works fine on 7.3.  However,
> with 7.4 it doesn't make it through the compiler.  With 7.4 it seems to
> want the cursor declare to be in the same subroutine as the fetch.

The exact error message might tell us more than "seems to want."
I wrote a test program similar to yours and got the following error
when I ran ecpg:

curstest.pgc:23: ERROR: trying to access an undeclared cursor testcurs

I moved the function that declares the cursor to earlier in the
file so it came before the function that used the cursor.  The
program then compiled and ran fine using 8.0.0rc5.

Michael Fuhr

In response to

pgsql-interfaces by date

Next:From: ElippaDate: 2005-01-15 22:03:08
Subject: unsubscribe
Previous:From: Magnus HaganderDate: 2005-01-15 17:41:39
Subject: Re: PGXML

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