Re: Mysql -> PgSQL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ray Hunter <rhunter(at)venticon(dot)com>
Cc: PGSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Mysql -> PgSQL
Date: 2002-08-21 18:18:21
Message-ID: 200208211818.g7LIILn01857@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ray Hunter wrote:
> I am trying to convert a data type in mysql to postgresql and was wondering
> which one i would use in pgsql.
>
> the type is "set" (example):
>
> name set( 'val1', 'val2', 'val3' ) NOT NULL DEFAULT 'val2'
>
> How can i do that in pgsql?

Sure:

x CHAR(4) NOT NULL DEFAULT 'val2' CHECK (x = 'val1' OR x = 'val2' ...)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johnson, Shaunn 2002-08-21 20:43:40 password security
Previous Message Ray Hunter 2002-08-21 18:11:14 Mysql -> PgSQL