Re: equivalent of mysql's SET type?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: equivalent of mysql's SET type?
Дата
Msg-id AANLkTinhFHA+a+5bVY1vbP7yyvnZNYXOSaxCS0vYgrj3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: equivalent of mysql's SET type?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Tue, Mar 8, 2011 at 11:41 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 03/08/11 5:06 PM, Reece Hart wrote:
>>
>> I'm considering porting a MySQL database to PostgreSQL. That database uses
>> MySQL's SET type. Does anyone have advice about representing this type in
>> PostgreSQL?
>>
>> MySQL DDL excerpt:
>> CREATE TABLE `transcript_variation` (
>>  `transcript_variation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>>  `transcript_stable_id` varchar(128) NOT NULL,
>>   ...
>>  `consequence_type`
>> set('ESSENTIAL_SPLICE_SITE','STOP_GAINED','STOP_LOST','COMPLEX_INDEL','SPLICE_SITE')
>> ) ENGINE=MyISAM AUTO_INCREMENT=174923212 DEFAULT CHARSET=latin1;
>>
>>
>
> why not just have a set of booleans in the table for these individual on/off
> attributes?   wouldn't that be simplest?

+1

merlin

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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Copying data from one table to another - how to specify fields?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: FW: backup using pg_dump postgreSQL 8.3.8