From: Paul Tilles <Paul.Tilles@noaa.gov>
To: pgsql-sql@postgresql.org
Cc: Xiaobiao Fan <Xiaobiao.Fan@noaa.gov>
Cc: Paul Tilles <Paul.Tilles@noaa.gov>
Subject: ecpg - problem compiling prepare and declare statements
Date: Mon, 05 Jan 2004 13:14:37 -0500
Message-ID: <3FF9A98D.A98A150A@noaa.gov> (raw)
Using psql V7.4.1 and ecpg V3.1.0 on RH Linux 7.2, gcc compiler:
The following statement precompiles, compiles and links fine:
EXEC SQL declare state_cursor cursor for "select unique state from
location where post = 1";
I then change the above to
EXEC SQL BEGIN DECLARE SECTION;
const char *stmt="select unique state from location where post = 1";
EXEC SQL END DECLARE SECTION;
EXEC SQL declare state_cursor cursor for :stmt;
These statements generate the following warning from the gcc compiler:
warning: passing arg 3 of ECPGprepare discards qualifiers from pointer
target type
and the link fails.
What am I doing wrong?
TIA,
Paul Tilles
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-sql@postgresql.org
Cc: Paul.Tilles@noaa.gov, Xiaobiao.Fan@noaa.gov
Subject: Re: ecpg - problem compiling prepare and declare statements
In-Reply-To: <3FF9A98D.A98A150A@noaa.gov>
* 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