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

Re: enum

From: "Adler, Stephen" <adler(at)bnl(dot)gov>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: enum
Date: 2002-11-30 17:48:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
In replying to my own post, I realize that a mysql enum is
equal to a varchar with a constraint on the value of the
string inserted into the column, (which is what I want to do,
make sure only 2 or 3 different strings can stored in
the varchar column.) But I'm having a hard time finding
the syntax for the column constraint entry in the create
table command. anyone can let me know where I can find info
on the constraint syntax? I've looked through the postgresql
manuals and haven't found anything.

Thanks again. Steve.

On Sat, 2002-11-30 at 12:13, Adler, Stephen wrote:
> As you guys can see, I'm in the process of migrating from mysql to
> postgres. My next question to you guys is how does one implement
> the mysql enum type. Also, when I issue the \dT command, I get
> this nice list of data types. Are all those data types standard
> SQL data types? or are some postgres "extensions"?
> Cheers. Steve.
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

  • enum at 2002-11-30 17:13:50 from Adler, Stephen


  • Re: enum at 2002-11-30 17:57:03 from Rod Kreisler

pgsql-novice by date

Next:From: Tom LaneDate: 2002-11-30 17:49:44
Subject: Re: switching databases
Previous:From: Adler, StephenDate: 2002-11-30 17:13:50
Subject: enum

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