dbTalk Databases Forums  

[BUGS] BUG #6436: ecpg processed wrong variable name for host value ofstruct at EXEC SQL INSERT

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #6436: ecpg processed wrong variable name for host value ofstruct at EXEC SQL INSERT in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
a.tanaka77@gmail.com
 
Posts: n/a

Default [BUGS] BUG #6436: ecpg processed wrong variable name for host value ofstruct at EXEC SQL INSERT - 02-06-2012 , 07:58 PM






The following bug has been logged on the website:

Bug reference: 6436
Logged by: Atsushi Tanaka
Email address: a.tanaka77 (AT) gmail (DOT) 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),
----------



--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.