Substring function incorrect when searching for '@.'

Поиск
Список
Период
Сортировка
От Mike G.
Тема Substring function incorrect when searching for '@.'
Дата
Msg-id 20041012223517.GA4549@localhost.localdomain
обсуждение исходный текст
Ответы Re: Substring function incorrect when searching for '@.'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
To reproduce:

create a table with  a data type of varchar (50) and name it email

insert into this table the following values:
test1@anyemail.com

Execute the following statement:
SELECT CASE WHEN count(substring(email FROM '@.')) > 0 THEN count(substring(email FROM '@.')) ELSE 0 END, email FROM
your_schema.your_tableGROUP BY email; 

Result with be equal to 1 / True.  It should be 0 / False.

If you execute the above but replace '@.' with '@a' it will also return 1 / True is correct.

The only time it fails for me is if the @ is immediately followed by a period.

7.3.4 using psql via pgadminIII under cygwin.

Mike

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fatal "make check" bug with 8.0 beta 3 under Mac OS 10.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Substring function incorrect when searching for '@.'