From: Michael Fuhr <mike@fuhr.org>
To: pgsql-hackers@postgresql.org
Subject: ECPG and escape strings
Date: Wed, 3 Aug 2005 08:31:25 -0600
Message-ID: <20050803143124.GA28095@winnie.fuhr.org> (raw)
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/
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: mike@fuhr.org, pgsql-hackers@postgresql.org
Subject: Re: ECPG and escape strings
In-Reply-To: <20050803143124.GA28095@winnie.fuhr.org>
* 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