Re: Migrating a MySQL schema with an enum
От | Martín Marqués |
---|---|
Тема | Re: Migrating a MySQL schema with an enum |
Дата | |
Msg-id | 20020321113145.E84DBFA1D@bugs.unl.edu.ar обсуждение исходный текст |
Ответ на | Migrating a MySQL schema with an enum (Keith Gray <keith@heart.com.au>) |
Ответы |
Re: Migrating a MySQL schema with an enum
|
Список | pgsql-sql |
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 -----------------------------------------------------------------
В списке pgsql-sql по дате отправления: