Re: Boolean operators without commutators vs. ALL/ANY

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Boolean operators without commutators vs. ALL/ANY
Дата
Msg-id 1308590278-sup-512@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Boolean operators without commutators vs. ALL/ANY  (Florian Pflug <fgp@phlo.org>)
Ответы Re: Boolean operators without commutators vs. ALL/ANY  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
Excerpts from Florian Pflug's message of lun jun 20 06:55:42 -0400 2011:

> The latter (i.e. regexp literals enclosed by /../) probably isn't
> desirably for postgres, but the former definitely is (i.e. distinguishing
> regexp's and text in the type system). Please see the thread
> "Adding a distinct pattern type to resolve the ~ commutator stalemate"
> for the details of the proposal. 

'your text' ~ regexp 'your.*foo'    column ~ regexp 'your.*foo'

So you could do

regexp 'foo.*bar' ~ 'your text'

and it's immediately clear what's up.

The question is what to do wrt implicit casting of text to regexp.
If we don't, there's a backwards compatibility hit.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal: a validator for configuration files
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: possible connection leak in dblink?