Обсуждение: BUG #5172: ecpg - cursor with regexp containing '.*/' fails to compile with gcc
The following bug has been logged online: Bug reference: 5172 Logged by: Viisard Email address: viisard@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.
Re: BUG #5172: ecpg - cursor with regexp containing '.*/' fails to compile with gcc
От
Michael Meskes
Дата:
On Sat, Nov 07, 2009 at 06:56:36PM +0000, Viisard wrote: > Description: ecpg - cursor with regexp containing '.*/' fails to Fixed in HEAD and 8.4. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes@jabber.org VfL Borussia! Forca Barca! Go SF 49ers! Use: Debian GNU/Linux, PostgreSQL