From: | Vivek Khera <khera(at)kciLink(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: DB porting questions... |
Date: | 2001-04-17 15:45:08 |
Message-ID: | x7k84j7cor.fsf@onceler.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>>>>> "JD" == Jeffrey Diehl <jdiehl(at)sandia(dot)gov> writes:
JD> I'm in the final stages of migrating from mysql to postgres and have a few
JD> more questions...
I'm just starting, but I've got two questions. I've found some
scripts out there that claim to do the conversion of the SQL create
commands, but none does the right thing it seems.
I've now found out how to handle the timestamp for insert times and
how to do auto-increment fields.
My unsderstanding of MySQL's enum type is to use something like this
in postgres:
owner_status varchar(9) check
(owner_status in ('pending','active','suspended'))
NOT NULL default 'pending',
But how does one handle the "set" dataype? The archive for the
mailing lists is not helping me find out how to deal with that.
Basically, I have a field with a bunch of flags defining the
attributes of a user, and storing that in a bit-field makes sense.
Currently in MySQL I have this:
owner_features set('premium','haveccinfo') default NULL,
for example. Some other fiels may have about 20 such values, and
MySQL lets me keep these in 3 bytes as a bit-field behind the scenes.
From what I see, my choice in Postgres is to store this as a
comma-separated string and let my application work as before.
Does anyone have a script that actually handles properly doing auto
increments with the SERIAL type, and does the set/enum conversions?
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
From | Date | Subject | |
---|---|---|---|
Next Message | Brook Milligan | 2001-04-17 16:07:24 | Re: Re: Using Random Sequence as Key |
Previous Message | Rini Dutta | 2001-04-17 15:40:57 | Another qs Re: drastic reduction in speed of inserts as the table grows |