ECPG and escape strings

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ECPG and escape strings
Date: 2005-08-03 14:31:25
Message-ID: 20050803143124.GA28095@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces pgsql-patches

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/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2005-08-03 14:32:56 Re: #escape_string_warning = off
Previous Message April Lorenzen 2005-08-03 14:31:18 pg_resetxlog says file system is read only?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Fuhr 2005-08-03 15:32:23 ECPG ignores SAVEPOINT if first statement of a transaction
Previous Message Jeff Eckermann 2005-08-03 00:25:40 Re: about postgres performance issue

Browse pgsql-patches by date

  From Date Subject
Next Message Petr Jelinek 2005-08-03 15:15:36 Re: per user/database connections limit again
Previous Message Tom Lane 2005-08-03 14:03:06 Re: per user/database connections limit again