Re: "ERROR: operator is not unique" with Custom Data Type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: "ERROR: operator is not unique" with Custom Data Type
Дата
Msg-id 20080605182811.GE16690@svana.org
обсуждение исходный текст
Ответ на "ERROR: operator is not unique" with Custom Data Type  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: "ERROR: operator is not unique" with Custom Data Type  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
On Thu, Jun 05, 2008 at 11:18:26AM -0700, David E. Wheeler wrote:
> I'm working on a custom data type based on TEXT that does case-
> insensitive, locale-aware comparisons, essentially by calling LOWER()
> to compare values.

What makes this different from the citext project?

> However, thanks to the implicit cast PostgreSQL finds more than one
> candidate operator when I compare properly casted values:
>
> try=# select 'a'::lctext =  'a'::text;
> ERROR:  operator is not unique: lctext = text
> LINE 1: select 'a'::lctext =  'a'::text;
>                            ^

What would you want postgresql to choose in this case. Whichever way
you want it, make that direction implicit and the other direction
assignment. Having A->B and B->A both as implicit just leads to
ambiguity.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: "ERROR: operator is not unique" with Custom Data Type
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: "ERROR: operator is not unique" with Custom Data Type