X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8798F52A21; Fri, 12 Aug 2005 23:22:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55919-04; Sat, 13 Aug 2005 02:22:15 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 96CE4528D7; Fri, 12 Aug 2005 23:22:12 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j7D2MIf29122; Fri, 12 Aug 2005 22:22:18 -0400 (EDT) From: Bruce Momjian Message-Id: <200508130222.j7D2MIf29122@candle.pha.pa.us> Subject: Re: [HACKERS] ECPG and escape strings In-Reply-To: <20050803143124.GA28095@winnie.fuhr.org> To: Michael Fuhr Date: Fri, 12 Aug 2005 22:22:18 -0400 (EDT) Cc: PostgreSQL-interfaces , PostgreSQL-patches X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=[AWL=0.010] X-Spam-Level: X-Archive-Number: 200508/22 X-Sequence-Number: 5693 Would someone on the interface list look for a fix to this? Thanks. --------------------------------------------------------------------------- Michael Fuhr wrote: > ECPG seems to be a little overzealous with the new escape string syntax: > > % cat foo.pgc > int > main(void) > { > putchar('\n'); > return 0; > } > > % ecpg foo.pgc > > % gcc -I`pg_config --includedir` -c foo.c > foo.pgc: In function `main': > foo.pgc:4: `E' undeclared (first use in this function) > foo.pgc:4: (Each undeclared identifier is reported only once > foo.pgc:4: for each function it appears in.) > foo.pgc:4: syntax error before character constant > > % cat foo.c > /* Processed by ecpg (4.1.1) */ > /* These include files are added by the preprocessor */ > #include > #include > #include > #include > /* End of automatic include section */ > #line 1 "foo.pgc" > int > main(void) > { > putchar(E'\n'); > return 0; > } > > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073