Re: Domains versus polymorphic functions, redux

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Domains versus polymorphic functions, redux
Дата
Msg-id BANLkTinCH7V1=ATPhGm6TUCD=FjSVFWvZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Domains versus polymorphic functions, redux  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: Domains versus polymorphic functions, redux
Re: Domains versus polymorphic functions, redux
Список pgsql-hackers
On Fri, Jun 3, 2011 at 1:00 PM, David E. Wheeler <david@kineticode.com> wrote:
> On Jun 3, 2011, at 8:22 AM, Robert Haas wrote:
>
>> Well, as Bill Clinton once said, "it depends on what the meaning of
>> the word 'is' is".  I think of array types in PostgreSQL as meaning
>> "the types whose monikers end in a pair of square brackets".
>
> Man, range types are going to fuck with your brainz.

They may, but probably not for this reason.  Domain types have this
weird property that we want all of the base type operations to still
work on them, except when we don't want that.  Range types won't have
that property, or at least I don't think so.  Someone might expect
1::foo + 2::foo to work when foo is a domain over int, but they
probably won't expect '[1,2]'::intrange + '[2,3)'::intrange to work.
The real crux of the issue here is: under what circumstances should we
look through the domain wrapper around an underlying type, and under
what circumstances should we refrain from doing so?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SIREAD lock versus ACCESS EXCLUSIVE lock
Следующее
От: Noah Misch
Дата:
Сообщение: Re: reducing the overhead of frequent table locks - now, with WIP patch