replacing mysql enum

From: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: replacing mysql enum
Date: 2004-12-11 05:00:55
Message-ID: 04121110305520.21547@thenilgiris.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hi,

from mysql:

field enum('a','b','c') default null,

i translated this as:

field varchar(2) check (field in (null,'a','b','c')),

is it necessary to put the 'null' in the check condition? if not will pg
permit you to enter a null value in the field?

regards
kg

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2004-12-11 05:11:28 Re: Cast NULL into Timestamp?
Previous Message Michael Fuhr 2004-12-11 04:11:52 Re: Create Calendar