Received: from pc63.rp-plus.de (meskes@ppp06725.01019freenet.de [212.81.154.69]) by hub.org (8.9.3/8.9.1) with ESMTP id HAA50973 for ; Wed, 21 Apr 1999 07:48:28 -0400 (EDT) (envelope-from Michael.Meskes@gmx.net) Received: (from meskes@localhost) by pc63.rp-plus.de (8.9.3/8.9.3/Debian/GNU) id NAA00660; Wed, 21 Apr 1999 13:52:04 +0200 Date: Wed, 21 Apr 1999 13:52:04 +0200 From: Michael Meskes To: Pavel PaJaSoft Janousek Cc: PgSQL Interfaces Subject: Re: [INTERFACES] Error in ECPG and #if... Message-ID: <19990421135204.B343@gmx.net> Mail-Followup-To: Pavel PaJaSoft Janousek , PgSQL Interfaces References: <000401be8b46$bd6d96c0$0200a8c0@server.fonet2.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <000401be8b46$bd6d96c0$0200a8c0@server.fonet2.cz>; from Pavel PaJaSoft Janousek on Tue, Apr 20, 1999 at 05:59:13PM +0200 On Tue, Apr 20, 1999 at 05:59:13PM +0200, Pavel PaJaSoft Janousek wrote: > I use ECPG distributed with PostgreSQL 6.4.2. and I found next > error..:-( Not really. > ECPG don't know C/C++ preprocessing directives such as #if, #ifdef > etc... That's correct. ECPG only parses stuff between EXEC SQL and ';'. > 15. #if 0 > 16. exec sql select count (*) from > 17. exec sql commit; > 18. #endif This is not C code. > In this ECPG say: parse error on line 16. Yes, because ECPG parses all embedded SQL code. It does not know about cpp code. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!