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

From Roman Kononov
Subject BUG #5257: wrong results of SUBSTRING with SQL regular expressions
Date
Msg-id 201001021930.o02JUjcO094014@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions  (Roman Kononov <kononov@ftml.net>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5257
Logged by:          Roman Kononov
Email address:      kononov@ftml.net
PostgreSQL version: 8.4.2
Operating system:   GNU/Linux x86_64
Description:        wrong results of SUBSTRING with SQL regular expressions
Details:

test=# select substring('34' from '(2|3)#"4#"' for '#');
 substring
-----------
 3
(1 row)

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

(1 row)

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

(1 row)

These look wrong according to the PG documentation.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error in exclusion constraint error message (8.5)?
Next
From: Tom Lane
Date:
Subject: Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions