pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
mysql set datatype
3+ messages / 2 participants
[nested] [flat]

* mysql set datatype
@ 2004-12-13 11:01  Kenneth Gonsalves <lawgon@thenilgiris.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Kenneth Gonsalves @ 2004-12-13 11:01 UTC (permalink / raw)
  To: pgsql-sql

hi,
how does one replicate the myql 'set' datatype in pg? i tried using 'check', 
but apparently there is much more to this

regards
kg



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: mysql set datatype
@ 2004-12-13 13:25  Richard Huxton <dev@archonet.com>
  parent: Kenneth Gonsalves <lawgon@thenilgiris.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Richard Huxton @ 2004-12-13 13:25 UTC (permalink / raw)
  To: Kenneth Gonsalves <lawgon@thenilgiris.com>; +Cc: pgsql-sql

Kenneth Gonsalves wrote:
> hi,
> how does one replicate the myql 'set' datatype in pg? i tried using 'check', 
> but apparently there is much more to this

You could use a bit-string if you are just tracking set membership, but 
that doesn't exactly duplicate the behaviour. It should be 
straightforward enough to write some support functions and just use a 
text type, but that'd use a lot more storage.

Of course, another table is the accepted way of doing this relationally. 
  Are there any particular features you need, or are you just porting an 
application from Mysql?

--
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: mysql set datatype
@ 2004-12-13 13:43  Kenneth Gonsalves <lawgon@thenilgiris.com>
  parent: Richard Huxton <dev@archonet.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Kenneth Gonsalves @ 2004-12-13 13:43 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-sql

On Monday 13 December 2004 06:55 pm, Richard Huxton wrote:
> Kenneth Gonsalves wrote:
> > hi,
> > how does one replicate the myql 'set' datatype in pg? i tried using
> > 'check', but apparently there is much more to this
>
> You could use a bit-string if you are just tracking set membership, but
> that doesn't exactly duplicate the behaviour. It should be
> straightforward enough to write some support functions and just use a
> text type, but that'd use a lot more storage.
>
> Of course, another table is the accepted way of doing this relationally.
>   Are there any particular features you need, or are you just porting an
> application from Mysql?

just porting

kg



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-12-13 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13 11:01 mysql set datatype Kenneth Gonsalves <lawgon@thenilgiris.com>
2004-12-13 13:25 ` Richard Huxton <dev@archonet.com>
2004-12-13 13:43   ` Kenneth Gonsalves <lawgon@thenilgiris.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox