citext operator precedence fix

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема citext operator precedence fix
Дата
Msg-id 4E7A78C3.1010403@agliodbs.com
обсуждение исходный текст
Ответы Re: citext operator precedence fix
Список pgsql-hackers
All,

I just tripped over this:

select 'josh'::varchar(32) = 'Josh'::citext;?column?
----------f

While it's clear why it's that way, it's not how people would expect
citext to behave.  Users expect case-insensitive text to be
case-insensitive for *all* comparisons, not just for comparisons with
the same data type.  I would also think that folks migrating from SQL
Server and MySQL would get bitten by this.

I'd like to patch the citext contrib module for 9.2 to fix this by
creating four new = operators to establish the comparison function for
text and varchar.

Before I clean up my ad-hoc fix code for submission, are there strong
objections to this idea?  Or are there other data types I'd need to cover?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Double sorting split patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: citext operator precedence fix