Re: Domains and supporting functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Domains and supporting functions
Дата
Msg-id 7986.1140330391@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Domains and supporting functions  (elein <elein@varlena.com>)
Ответы Re: Domains and supporting functions  (elein <elein@varlena.com>)
Список pgsql-hackers
elein <elein@varlena.com> writes:
> I've got a domain based on a text type.
> I've overridden the equal operator with
> lower(text) = lower(text).

This won't work, you need to make a type instead.

> If this is the way domains really are, I would strongly suggest
> expanding create domain to merge with create type (under) and
> allow us to list the basic functions. 

IMHO, the exact difference between a domain and a type is you get to
choose your own definitions of the basic operations on a type.  There's
no free lunch: as soon as you start substituting operations the
complexity involved goes up by an order of magnitude.
        regards, tom lane


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Updated email signature
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Updated email signature