BUG #2391: "Similar to" pattern matching does not operate as documented

Поиск
Список
Период
Сортировка
От Eric Noriega
Тема BUG #2391: "Similar to" pattern matching does not operate as documented
Дата
Msg-id 200604122349.k3CNnX8N025091@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2391: "Similar to" pattern matching does not operate as documented  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2391
Logged by:          Eric Noriega
Email address:      noriega@gwu.edu
PostgreSQL version: 7.0.5
Operating system:   Linux Fedora core 4
Description:        "Similar to" pattern matching does not operate as
documented
Details:

As far as I can tell, this may be a bug in how the pattern matches.

db=# select 'tab' similar to '(a|b)';
 ?column?
----------
 f

db=# select 'tab' similar to 'a|b';
 ?column?
----------
 t

The doc says:  Like LIKE, the SIMILAR TO  operator succeeds only if its
pattern matches the entire string; this is unlike common regular expression
practice, wherein the pattern may match any part of the string.

If the second case is invalid as an expression (not clear in the
docs:Parentheses may be used to group items into a single logical item),
then the statement should fail, or return false, not return true.

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

Предыдущее
От: "Andreas Kretschmer"
Дата:
Сообщение: BUG #2390: check constraint
Следующее
От: "Patrick Headley"
Дата:
Сообщение: Re: BUG #2386: pg_restore doesn't restore large objects