Обсуждение: pg7.0.2 doesnt yield match on regexps w/ many "|"

Поиск
Список
Период
Сортировка

pg7.0.2 doesnt yield match on regexps w/ many "|"

От
pgsql-bugs@postgresql.org
Дата:
Emils Klotins (emils@grafton.lv) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg7.0.2 doesnt yield match on regexps w/ many "|"

Long Description
Adding more than a very limited number of complexness to a regexp query will yield 0 rows without any error message.

The example code below shows a very small table and a regexp with multiple choices: '(word|word|word)'

as soon as another word is addded '(word|word|word|word)', OR the query changed to, for example, '(word|word|word) *',
itreturns 0 rows, although it should return the same (8 rows). 

My environment: RedHat Linux 6.2 on Alpha DS10, gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)


Sample Code
CREATE TABLE "test" (
        "title" text
);
COPY "test" FROM stdin;
Serious Sam ceïâ pie pircçjiem
Black & White gaidîðanas svçtki
Lorgaine: The Black Standard - íeltu varoòeposs
Lorgaine: The Black Standard beta versija
Black&White tomçr neesot spiegu programma
Black & White FAQ
Black & White "ïaunais" FAQ
Black & White - pârdotâkâ spçle ASV
\.

SELECT title  FROM test WHERE title ~* '(BLACK|WHITE|SERIOUS|SAM)' ;
....
(8 rows)


SELECT title  FROM test WHERE title ~* '(BLACK|WHITE|SERIOUS|blah|SAM)' ;
 title
-------
(0 rows)



No file was uploaded with this report