Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3I0Asu75938 for ; Tue, 17 Apr 2001 20:10:54 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3HFtdu61724 for ; Tue, 17 Apr 2001 11:55:39 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f3HFjFc40218 for pgsql-sql@postgresql.org; Tue, 17 Apr 2001 11:45:15 -0400 (EDT) (envelope-from news) From: Vivek Khera X-Newsgroups: comp.databases.postgresql.sql Subject: Re: DB porting questions... Date: 17 Apr 2001 11:45:08 -0400 Organization: Khera Communications, Inc., Rockville, MD Lines: 42 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: scrappy@hub.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) To: pgsql-sql@postgresql.org X-Archive-Number: 200104/290 X-Sequence-Number: 2645 >>>>> "JD" == Jeffrey Diehl 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.