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
|
Список | 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 по дате отправления: