Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] ECPG and escape strings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] ECPG and escape strings
Date: 2005-08-13 02:22:18
Message-ID: 200508130222.j7D2MIf29122@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfacespgsql-patches
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 <ecpgtype.h>
> #include <ecpglib.h>
> #include <ecpgerrno.h>
> #include <sqlca.h>
> /* 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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-08-13 02:22:32
Subject: Re: [HACKERS] ECPG ignores SAVEPOINT if first statement of a transaction
Previous:From: Bruce MomjianDate: 2005-08-13 01:53:59
Subject: Re: [COMMITTERS] pgsql: Basic documentation for ROLEs.

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-08-13 02:22:32
Subject: Re: [HACKERS] ECPG ignores SAVEPOINT if first statement of a transaction
Previous:From: Bruce MomjianDate: 2005-08-13 02:06:21
Subject: Re: [patch 0/7] more patches for pgcrypto

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2005-08-13 02:22:32
Subject: Re: [HACKERS] ECPG ignores SAVEPOINT if first statement of a transaction
Previous:From: Johan C. de KoningDate: 2005-08-11 14:08:31
Subject: Re: Getting oid with libpq

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group