Re: ENUM like data type

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: ENUM like data type
Дата
Msg-id 200506292320.32726.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: ENUM like data type  (Rod Taylor <pg@rbt.ca>)
Ответы Re: ENUM like data type
Список pgsql-sql
Rod Taylor wrote:
> Indeed. A CHECK constraint on a DOMAIN is an ENUM plus some.

Not really.  A domain doesn't create a new type.  If you base your enum 
domains on the text type, as would usually be the case, then nothing 
stops you from using, say, text concatenation operators and the like.  
I suppose in practice this won't matter too much, but it can't be 
called a clean design.  What you'd really need is a way to create a 
distinct type.  SQL has a feature for that, but PostgreSQL hasn't 
implemented it.

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


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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: ORDER records based on parameters in IN clause
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ENUM like data type