Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

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?



pgsql-sql by date

Next:From: Josh BerkusDate: 2004-12-11 05:11:28
Subject: Re: Cast NULL into Timestamp?
Previous:From: Michael FuhrDate: 2004-12-11 04:11:52
Subject: Re: Create Calendar

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group