Re: equivalent of mysql's SET type? - Mailing list pgsql-general

From John R Pierce
Subject Re: equivalent of mysql's SET type?
Date
Msg-id 4D77130B.9030108@hogranch.com
Whole thread Raw
In response to equivalent of mysql's SET type?  (Reece Hart <reece@harts.net>)
Responses Re: equivalent of mysql's SET type?
Re: equivalent of mysql's SET type?
Re: equivalent of mysql's SET type?
List pgsql-general
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?





pgsql-general by date:

Previous
From: abcdef
Date:
Subject: procedure in db
Next
From: Pavel Stehule
Date:
Subject: Re: procedure in db