ECPG scoping
От | Stergios Zissakis |
---|---|
Тема | ECPG scoping |
Дата | |
Msg-id | NGBBJHBHDKPNOODGDMMAKENFCHAA.szis@intranet.gr обсуждение исходный текст |
Ответы |
Re: ECPG scoping
|
Список | 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
В списке pgsql-interfaces по дате отправления: