Re: Custom type where not all elements are comparable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Custom type where not all elements are comparable
Дата
Msg-id 1924.1089045132@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Custom type where not all elements are comparable  (Markus Bertheau <twanger@bluetwanger.de>)
Список pgsql-sql
Markus Bertheau <twanger@bluetwanger.de> writes:
> Is it possible to define or implement a type in PostgreSQL not all
> values of which are comparable to each other?

Certainly, as long as you don't expect to be able to btree-index it,
sort it, or DISTINCT it.  (In theory we could probably handle DISTINCT
using hash aggregation, as long as equality behaves sanely; but that's
not implemented now.)

Probably it'd be reasonable for the comparison operators to return
NULL for a noncomparable pair of inputs.
        regards, tom lane


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

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: Custom type where not all elements are comparable
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Custom type where not all elements are comparable