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