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 mmonc...@gmail.com wrote: On Thu, Mar 10, 2011 at 3:21 PM, Reece Hart re...@harts.net wrote: On Wed, Mar 9, 2011 at 9:16 AM, Merlin Moncure mmonc...@gmail.com wrote: create type validation_flags as (  cluster bool,  freq bool ); Wow. That

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

2011-03-11 Thread Dmitriy Igrishin
2011/3/11 Merlin Moncure mmonc...@gmail.com On Thu, Mar 10, 2011 at 4:13 PM, Dmitriy Igrishin dmit...@gmail.com wrote: 2011/3/9 John R Pierce pie...@hogranch.com On 03/08/11 5:06 PM, Reece Hart wrote: I'm considering porting a MySQL database to PostgreSQL. That database uses MySQL's

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 mmonc...@gmail.com 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-10 Thread Merlin Moncure
On Thu, Mar 10, 2011 at 3:21 PM, Reece Hart re...@harts.net wrote: On Wed, Mar 9, 2011 at 9:16 AM, Merlin Moncure mmonc...@gmail.com 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

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

2011-03-10 Thread Dmitriy Igrishin
2011/3/9 John R Pierce pie...@hogranch.com 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

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 dmit...@gmail.com wrote: 2011/3/9 John R Pierce pie...@hogranch.com 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

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 pie...@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

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 pie...@hogranch.com 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.

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 re...@harts.net wrote: On Tue, Mar 8, 2011 at 9:41 PM, John R Pierce pie...@hogranch.com 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

[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,

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` (

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

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 dar...@darrenduncan.netwrote: 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

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 st...@blighty.com 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,

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 dar...@darrenduncan.netwrote: 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'); ...

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)