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

From Tom Lane
Subject Re: BUG #4580: select substring ('a' from '(b)?(a)') returns null
Date
Msg-id 26142.1229348402@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4580: select substring ('a' from '(b)?(a)') returns null  ("substring and regular expresssion" <m.mamin@intershop.de>)
List pgsql-bugs
"substring and regular expresssion" <m.mamin@intershop.de> writes:
> 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

No, the old behavior was a bug.  Using your example pattern,
substring ('ba' from '(b)?(a)') would return 'b' not 'ba',
so I can hardly see how you failed to notice that it wasn't
behaving consistently.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "substring and regular expresssion"
Date:
Subject: BUG #4580: select substring ('a' from '(b)?(a)') returns null
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #4568: sporadic error doing COUNT(*) on empty table