Re: equivalent of mysql's SET type?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: equivalent of mysql's SET type?
Date: 2011-03-09 05:41:31
Message-ID: 4D77130B.9030108@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2011-03-09 07:46:48 Re: procedure in db
Previous Message Darren Duncan 2011-03-09 05:27:50 Re: equivalent of mysql's SET type?