pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedECPG scoping
2+ messages / 2 participants
[nested] [flat]
* ECPG scoping
@ 2004-05-12 08:56 Stergios Zissakis <szis@intranet.gr>
0 siblings, 1 reply; 2+ messages in thread
From: Stergios Zissakis @ 2004-05-12 08:56 UTC (permalink / raw)
To: pgsql-interfaces
Dear all,
Consider the following two functions:
void function1(...)
{
EXEC SQL BEGIN DECLARE SECTION;
typedef struct
{
varchar temp[100];
...
} my_strct;
EXEC SQL END DECLARE SECTION;
...
}
void function2(...)
{
EXEC SQL BEGIN DECLARE SECTION;
typedef struct
{
varchar temp[100];
...
} my_strct;
EXEC SQL END DECLARE SECTION;
...
}
When this goes through the pre-compiler, I get an error message stating:
Type my_struct already defined.
Does ECPG recongise scopes or it parses everything as global space?
One work around is to rename the struct in each function but this is not
really handy as the application I'm porting (from Oracle) uses the same
stucts in a lot of methods.
Any suggestions?
Thanks in advance.
Regards,
Stergios Zissakis
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ECPG scoping
@ 2004-06-27 12:33 Michael Meskes <meskes@postgresql.org>
parent: Stergios Zissakis <szis@intranet.gr>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meskes @ 2004-06-27 12:33 UTC (permalink / raw)
To: Stergios Zissakis <szis@intranet.gr>; +Cc: pgsql-interfaces
On Wed, May 12, 2004 at 11:56:41AM +0300, Stergios Zissakis wrote:
> Dear all,
>
> Consider the following two functions:
> ...
I just committed a patch to HEAD and 7.4.
Thanks for the report.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-06-27 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-12 08:56 ECPG scoping Stergios Zissakis <szis@intranet.gr>
2004-06-27 12:33 ` Michael Meskes <meskes@postgresql.org>
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