pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Michael Fuhr <mike@fuhr.org>
Cc: PostgreSQL-interfaces <pgsql-interfaces@postgresql.org>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: [HACKERS] ECPG and escape strings
Date: Fri, 12 Aug 2005 22:22:18 -0400 (EDT)
Message-ID: <200508130222.j7D2MIf29122@candle.pha.pa.us> (raw)
In-Reply-To: <20050803143124.GA28095@winnie.fuhr.org>


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@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



view thread (5+ messages)  latest in thread

Message-ID: <200508130222.j7D2MIf29122@candle.pha.pa.us>
Permalink:  ../200508130222.j7D2MIf29122@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200508130222.j7D2MIf29122@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pgman@candle.pha.pa.us, mike@fuhr.org, pgsql-patches@postgresql.org
  Subject: Re: [HACKERS] ECPG and escape strings
  In-Reply-To: <200508130222.j7D2MIf29122@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox