Re: Domains and subtypes, a brief proposal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Domains and subtypes, a brief proposal
Дата
Msg-id 22711.1157744843@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Domains and subtypes, a brief proposal  (elein <elein@varlena.com>)
Ответы Re: Domains and subtypes, a brief proposal  (elein <elein@varlena.com>)
Список pgsql-hackers
elein <elein@varlena.com> writes:
> a) if subtypes/domains can have constraints then the model should
>    not be different for domains only but for all types.  Constraint 
>    checking would only
>    occur at check constraint points--and there for any type.  You
>    already check for the existance of a domain.  Change that test
>    to the existence of a constraint only and eliminate domain specific
>    code.

Au contraire, the test whether a constraint actually exists occurs at
runtime, not at the time we check for domain-ness.  Your proposal would
force such checks to be introduced into every single expression
evaluation.  It's not feasible at all without plan invalidation, and
even with that I foresee fairly enormous added overhead.  Our experience
with domains so far is that looking up those constraints is *expensive*.
        regards, tom lane


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

Предыдущее
От: elein
Дата:
Сообщение: Re: Domains and subtypes, a brief proposal
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCHES] Fix linking of OpenLDAP libraries