The following bug has been logged online: Bug reference: 5172 Logged by: Viisard Email address: viis...@hotmail.com PostgreSQL version: 8.4.1 Operating system: Fedora 11 (Linux 2.6.30.9-96.fc11.i686.PAE) Description: ecpg - cursor with regexp containing '.*/' fails to compile with gcc Details:
I'm using ecpg (PostgreSQL 8.4.1) 4.5.0. It fails to generate valid c file, when a cursor with a regular expression (in probably could be any string) containing '*/'. The line in foo.cpg: ... EXEC SQL DECLARE foo CURSOR FOR SELECT SUBSTRING('/foo/bar','.*/'); ... is translated into: foo.c: /* declare foo cursor for select substring ( '/foo/bar' , '.*/' ) */ #line 9 "foo.cpg" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare foo cursor for select substring ( '/foo/bar' , '.*/' )", ECPGt_EOIT, ECPGt_EORT);} There is a simple workaround for this by using '.*[/]' as the regexp. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs