From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | elein <elein(at)varlena(dot)com> |
Subject: | Re: Domains as Subtypes |
Date: | 2006-03-24 19:33:51 |
Message-ID: | 200603242033.52023.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2006-03-24 19:56:06 | Re: Role incompatibilities |
Previous Message | Peter Eisentraut | 2006-03-24 19:27:49 | Re: Role incompatibilities |