From: a.tanaka77@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6436: ecpg processed wrong variable name for host value of struct at EXEC SQL INSERT
Date: Tue, 07 Feb 2012 01:58:59 +0000
Message-ID: <E1RuaKh-0006bj-G8@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6436
Logged by: Atsushi Tanaka
Email address: a.tanaka77@gmail.com
PostgreSQL version: 9.1.2
Operating system: CentOS 6.2
Description:
I tried preprocess my program source by ecpg.
Then, ecpg processed wrong variable name for host value of struct.
variable definition:
----------
EXEC SQL BEGIN DECLARE SECTION;
struct _save_data {
varchar vstring[256];
int idx;
} save_data;
EXEC SQL END DECLARE SECTION;
----------
call EXEC SQL:
----------
EXEC SQL INSERT INTO test_tbl ( title ) VALUES ( :save_data.vstring );
----------
wrong preprocessed line:
----------
ECPGt_varchar,&(save_data.vstring),(long)256,(long)1,sizeof(struct
varchar_save_data.vstring_1),
----------
correct:
----------
ECPGt_varchar,&(save_data.vstring),(long)256,(long)1,sizeof(struct
varchar_vstring_1),
----------
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: a.tanaka77@gmail.com
Subject: Re: BUG #6436: ecpg processed wrong variable name for host value of struct at EXEC SQL INSERT
In-Reply-To: <E1RuaKh-0006bj-G8@wrigleys.postgresql.org>
References: <E1RuaKh-0006bj-G8@wrigleys.postgresql.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