Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions
Date
Msg-id 10279.1262462464@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5257: wrong results of SUBSTRING with SQL regular expressions  ("Roman Kononov" <kononov@ftml.net>)
List pgsql-bugs
"Roman Kononov" <kononov@ftml.net> writes:
> test=# select substring('34' from '(2|3)#"4#"' for '#');
>  substring
> -----------
>  3
> (1 row)

Hmm.  I guess we need to translate ( and ) to non-capturing parens.

> test=# select substring('^' from '#"^#"' for '#');
>  substring
> -----------
>
> (1 row)

> test=# select substring('$' from '#"$#"' for '#');
>  substring
> -----------
>
> (1 row)

These cases are already fixed in HEAD.
http://archives.postgresql.org/pgsql-committers/2009-10/msg00048.php

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Roman Kononov"
Date:
Subject: BUG #5257: wrong results of SUBSTRING with SQL regular expressions
Next
From: Tomas Studva
Date:
Subject: test message