Date: Fri, 16 Oct 2015 13:09:34 -0500 Subject: Re: [BUGS] BUG #13676: C typedef code generated by ecpg with wrong syntax From: john.archie.mckown@gmail.com To: meskes@postgresql.org CC: pgsql-bugs@postgresql.org; glauciobb@hotmail.com
I did a "git pull" from the PostrgeSQL repository. then did a "make ecpg" in the src/interfaces/ecpg directory. I then used the new ecpg on the example code, followed by a gcc compile. The compile went fine. I made a slight change to the code, just because to be:
#include <stdio.h>
EXEC SQL TYPE t_char_10 IS char[10];
EXEC SQL TYPE t_char_10d IS struct { char data[10];};
> I trying to migrate my application developed using Pro*c to ECPG. But, when > I run the code below with "ecpg -c" command to generate c code, the syntax > for typedef generated appears to be wrong. Below is an sample code and the > steps to generate error return by C compiler due the wrong syntax for > typedef.
Thanks for spotting and reporting. The order of the arguments seems to be broken.
Already committed to HEAD. Will do backports later.
Thanks again. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at gmail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL