Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (Postfix) with ESMTP id 61C674758DD for ; Thu, 21 Mar 2002 06:30:49 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id D2F7FFDD3 for ; Thu, 21 Mar 2002 08:31:46 -0300 (GMT) Received: from there (bugs [168.96.132.208]) by bugs.unl.edu.ar (Postfix) with SMTP id E84DBFA1D for ; Thu, 21 Mar 2002 08:31:45 -0300 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= To: SQL Subject: Re: Migrating a MySQL schema with an enum Date: Thu, 21 Mar 2002 08:31:44 -0300 X-Mailer: KMail [version 1.3.2] References: <3C991E29.C90559F4@heart.com.au> In-Reply-To: <3C991E29.C90559F4@heart.com.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020321113145.E84DBFA1D@bugs.unl.edu.ar> X-Virus-Scanned: by AMaViS snapshot-20011031 X-Archive-Number: 200203/274 X-Sequence-Number: 7153 On Mié 20 Mar 2002 20:41, you wrote: > SQL gurus, > > Migrating a MySQL schema with an enum to PostgreSQL, > is there an equivalent type or do I have to declare > another table for "enum" values. I had to migrate a DB from MySQL to PostgreSQL that had some enum as field data type (I can't believe that something like that exists), and because it was something like: enum('s','n') I changed it for: col1 CHAR CHECK (col1 IN ('s','n')) Which is SQL. :-) If what is enumerated are numbres, just use INT instead of CHAR. Saludos... :-) -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------