Re: BUG #4580: select substring ('a' from '(b)?(a)') returns null

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "substring and regular expresssion" <m(dot)mamin(at)intershop(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4580: select substring ('a' from '(b)?(a)') returns null
Date: 2008-12-15 13:40:02
Message-ID: 26142.1229348402@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"substring and regular expresssion" <m(dot)mamin(at)intershop(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2008-12-15 14:01:23 Re: BUG #4568: sporadic error doing COUNT(*) on empty table
Previous Message substring and regular expresssion 2008-12-15 12:56:47 BUG #4580: select substring ('a' from '(b)?(a)') returns null