From: Michael Fuhr <mike@fuhr.org>
To: Frost, Mr. Michael (contractor) <frost@nrlmry.navy.mil>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: ECPG and CURSOR declaration
Date: Sat, 15 Jan 2005 12:21:15 -0700
Message-ID: <20050115192115.GA10081@winnie.fuhr.org> (raw)
In-Reply-To: <5188F15076BC7A4DBB705747602058C11AA6D1@mailhost>
References: <5188F15076BC7A4DBB705747602058C11AA6D1@mailhost>
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
http://www.fuhr.org/~mfuhr/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: mike@fuhr.org, frost@nrlmry.navy.mil
Subject: Re: ECPG and CURSOR declaration
In-Reply-To: <20050115192115.GA10081@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox