BUG #11478: regexp_matches regression in 9.2

Поиск
Список
Период
Сортировка
От myon@debian.org
Тема BUG #11478: regexp_matches regression in 9.2
Дата
Msg-id 20140923204118.17175.66823@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #11478: regexp_matches regression in 9.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11478
Logged by:          Christoph Berg
Email address:      myon@debian.org
PostgreSQL version: 9.2.9
Operating system:   any
Description:

The following was reported in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760564 :

select regexp_matches('foo/bar/baz',
'^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$', '');

Correct 9.1 result:

 regexp_matches
----------------
 {foo,bar,baz}

Bad 9.2 and later result:

 regexp_matches
----------------
(0 rows)

Removing the last or second-last ? brings the match back.

Perl also thinks the regexp should match:

$ perl -wle 'print "$1 $2 $3" if "foo/bar/baz" =~
m!^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$!'
foo bar baz

(There should probably be much less ? in the regexp in the first place, but
a regression/bug is a bug.)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: piuschan
Дата:
Сообщение: Re: automatic vacuum on pg_statistic pg_toast area blocks all queries in hot standby
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11478: regexp_matches regression in 9.2