BUG #4580: select substring ('a' from '(b)?(a)') returns null - Mailing list pgsql-bugs

From substring and regular expresssion
Subject BUG #4580: select substring ('a' from '(b)?(a)') returns null
Date
Msg-id 200812151256.mBFCulva092412@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4580: select substring ('a' from '(b)?(a)') returns null  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4580
Logged by:          substring and regular expresssion
Email address:      m.mamin@intershop.de
PostgreSQL version: 8.3.5
Operating system:   Linux
Description:        select substring ('a' from '(b)?(a)') returns null
Details:

Hello,

substring ('a' from '(b)?(a)') returns 'a' in version 8.2.x,
but null with 8.3.5.  Comparing this to the bug entry
http://archives.postgresql.org/pgsql-bugs/2008-11/msg00112.php I guess this
is not considered as a bug and can be fixed while surrounding the regexp
with parenthensis:
substring ('a' from '((b)?(a))')

What I really miss, is the possibility to use the regex_flavor configuration
to get the old behaviour back.
I'm currently preparing an upgrade from 8.2.4 to 8.3.5 and this issue will
probably require a very large code review for us.


Cheers,

Marc Mamin

pgsql-bugs by date:

Previous
From: "Sameer Mahajan"
Date:
Subject: Re: BUG #4568: sporadic error doing COUNT(*) on empty table
Next
From: Tom Lane
Date:
Subject: Re: BUG #4580: select substring ('a' from '(b)?(a)') returns null