X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7A04CD1BB2E for ; Wed, 12 May 2004 05:59:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85237-10 for ; Wed, 12 May 2004 05:59:05 -0300 (ADT) Received: from mailserv.intranet.gr (mailserv.intranet.GR [146.124.14.106]) by svr1.postgresql.org (Postfix) with ESMTP id 9CC73D1BAC5 for ; Wed, 12 May 2004 05:59:01 -0300 (ADT) Received: from mailserv.intranet.gr (localhost [127.0.0.1]) by mailserv.intranet.gr (8.11.7/8.11.3) with ESMTP id i4C94Cc27694 for ; Wed, 12 May 2004 12:04:12 +0300 (EEST) Received: from dadia.intranet.gr (dadia.intranet.GR [146.124.175.10]) by mailserv.intranet.gr (8.11.7/8.11.3) with ESMTP id i4C949G27667 for ; Wed, 12 May 2004 12:04:09 +0300 (EEST) Received: from pcszis (pcszis [146.124.175.98]) by dadia.intranet.gr (8.11.7p1+Sun/8.11.7) with SMTP id i4C8mpT25364 for ; Wed, 12 May 2004 11:48:52 +0300 (EET DST) From: "Stergios Zissakis" To: "Interfaces" Subject: ECPG scoping Date: Wed, 12 May 2004 11:56:41 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/20 X-Sequence-Number: 4912 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