Re: Domains as Subtypes

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Domains as Subtypes
Дата
Msg-id 200603242033.52023.peter_e@gmx.net
обсуждение исходный текст
Ответ на Domains as Subtypes  (elein <elein@varlena.com>)
Ответы Re: Domains as Subtypes  (elein <elein@varlena.com>)
Список pgsql-hackers
elein wrote:
> Domains lay the groundwork for inherited basetypes
> or subtypes.

Semantically, a domain and a subtype are completely different things.  A 
domain restricts the possible values of a type but behaves exactly like 
that type in all other respects.  (The fact that PostgreSQL allows you 
to define functions that take domains as arguments undermines that 
concept but if you apply it carefully it can still work.)  Subtypes or 
inherited types on the other hand are defined exactly for the purpose 
of overriding some of their methods (while keeping others unchanged, 
hence the inheritance).  Mixing the two concepts might be convenient 
from an implementation point of view but makes no sense in the data 
model.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Role incompatibilities
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Role incompatibilities