mysql set datatype

Поиск
Список
Период
Сортировка
Искать

mysql set datatype

От:
Kenneth Gonsalves <lawgon@thenilgiris.com>
Дата:
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

Re: mysql set datatype

От:
Richard Huxton <dev@archonet.com>
Дата:
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

Re: mysql set datatype

От:
Kenneth Gonsalves <lawgon@thenilgiris.com>
Дата:
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

FAQ