Re: equivalent of mysql's SET type?

Поиск
Список
Период
Сортировка
От Reece Hart
Тема Re: equivalent of mysql's SET type?
Дата
Msg-id AANLkTinWeoBE+dnNxTWqqw0KA+ksRQo2P5hZ6PK7x43F@mail.gmail.com
обсуждение исходный текст
Ответ на Re: equivalent of mysql's SET type?  (Darren Duncan <darren@darrenduncan.net>)
Ответы Re: equivalent of mysql's SET type?
Список pgsql-general
On Tue, Mar 8, 2011 at 5:52 PM, Darren Duncan <darren@darrenduncan.net> wrote:
Try starting with an enum type to define the possible values:

 CREATE TYPE Consequence_Type
   AS ENUM ('ESSENTIAL_SPLICE_SITE','STOP_GAINED',
     'STOP_LOST','COMPLEX_INDEL','SPLICE_SITE');

... and then you could try using "ARRAY OF Consequence_Type" or some such.

Arrays occurred to me, but they don't give a set (i.e., a consequence type can appear more than once) unless I write the code to dedupe the array. However, if I were going to put that much effort into it, I might as well represent the set directly and obviate the dedupe. Or, am I missing something from your suggestion? 

-Reece

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

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: Using bytea field...
Следующее
От: Reece Hart
Дата:
Сообщение: Re: equivalent of mysql's SET type?