Re: [GENERAL] equivalent of mysql's SET type?

2011-03-16 Thread Merlin Moncure
On Thu, Mar 10, 2011 at 3:54 PM, Merlin Moncure wrote: > On Thu, Mar 10, 2011 at 3:21 PM, Reece Hart wrote: >> On Wed, Mar 9, 2011 at 9:16 AM, Merlin Moncure wrote: >>> >>> create type validation_flags as >>> ( >>>  cluster bool, >>>  freq bool >>> ); >> >> Wow. That solution is nearly sexy, and

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-11 Thread Dmitriy Igrishin
2011/3/11 Merlin Moncure > On Thu, Mar 10, 2011 at 4:13 PM, Dmitriy Igrishin > wrote: > > 2011/3/9 John R Pierce > >> > >> 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 advic

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-10 Thread Merlin Moncure
On Thu, Mar 10, 2011 at 4:13 PM, Dmitriy Igrishin wrote: > 2011/3/9 John R Pierce >> >> 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 Postg

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-10 Thread Dmitriy Igrishin
2011/3/9 John R Pierce > 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_variatio

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-10 Thread Merlin Moncure
On Thu, Mar 10, 2011 at 3:21 PM, Reece Hart wrote: > On Wed, Mar 9, 2011 at 9:16 AM, Merlin Moncure wrote: >> >> create type validation_flags as >> ( >>  cluster bool, >>  freq bool >> ); > > Wow. That solution is nearly sexy, and far and away better than any solution > that I would have come up

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-10 Thread Reece Hart
On Wed, Mar 9, 2011 at 9:16 AM, Merlin Moncure wrote: > create type validation_flags as > ( > cluster bool, > freq bool > ); > Wow. That solution is nearly sexy, and far and away better than any solution that I would have come up with. Thanks, Merlin! -Reece

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-09 Thread Merlin Moncure
On Wed, Mar 9, 2011 at 10:59 AM, Reece Hart wrote: > On Tue, Mar 8, 2011 at 9:41 PM, John R Pierce wrote: >> >> why not just have a set of booleans in the table for these individual >> on/off attributes?   wouldn't that be simplest? > > I like that approach, but I think it's unlikely to fly in th

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-09 Thread Reece Hart
On Tue, Mar 8, 2011 at 9:41 PM, John R Pierce wrote: > why not just have a set of booleans in the table for these individual > on/off attributes? wouldn't that be simplest? I like that approach, but I think it's unlikely to fly in this specific case for a couple reasons. First, there are act

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-09 Thread Merlin Moncure
On Tue, Mar 8, 2011 at 11:41 PM, John R Pierce 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: >> CR

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread John R Pierce
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) u

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Darren Duncan
Reece Hart wrote: On Tue, Mar 8, 2011 at 5:52 PM, Darren Duncan 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 usi

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Reece Hart
On Tue, Mar 8, 2011 at 5:51 PM, Steve Atkins wrote: > tsvector or intarray might be other options, depending on how you're going > to query it and whether those are really strings or more enum-ish. > > The more SQLy way of doing it would be to have that stored in a separate > table, with a foreig

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Reece Hart
On Tue, Mar 8, 2011 at 5:52 PM, Darren Duncan 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

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Darren Duncan
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_I

Re: [GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Steve Atkins
On Mar 8, 2011, at 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_va

[GENERAL] equivalent of mysql's SET type?

2011-03-08 Thread Reece Hart
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, `transcr