Re: [HACKERS] Broken select on regular expression !!!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Broken select on regular expression !!!
Дата
Msg-id 29781.927124322@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Broken select on regular expression !!!  (Constantin Teodorescu <teo@flex.ro>)
Ответы Re: [HACKERS] Broken select on regular expression !!!  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Constantin Teodorescu <teo@flex.ro> writes:
> select * from regdemo where fld1 ~* '^41|^des';
> fld1
> ----
> (0 rows)

> ^^^^^^^^^^^^^^
> !?!?!?!

I see it too.  Even more interesting is that these variants are OK:

regression=> select * from regdemo where fld1 ~* '^des|^41';
fld1
-----------
410
destination
(2 rows)

regression=> select * from regdemo where fld1 ~* '(^41)|(^des)';
fld1
-----------
410
destination
(2 rows)

And if you want *really* disturbing:

regression=> select * from regdemo where fld1 ~* '^sou|^des';
fld1
-----------
source
destination
(2 rows)

regression=> select * from regdemo where fld1 ~ '^sou|^des';
fld1
----
(0 rows)

Something is rotten in the state of Denmark...
        regards, tom lane


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

Предыдущее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [HACKERS] PyGreSQL 2.4
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] PyGreSQL 2.4