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

Re: How to modify ENUM datatypes?

From: Steve Atkins <steve(at)blighty(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to modify ENUM datatypes?
Date: 2008-04-25 15:29:44
Message-ID: 22D5F880-AECF-44AF-B56A-4C35F8D179B7@blighty.com (view raw or flat)
Thread:
Lists: pgsql-general
On Apr 25, 2008, at 8:19 AM, Ben Chobot wrote:

>
> On Apr 25, 2008, at 4:49 AM, Giorgio Valoti wrote:
>
>> And reorder them, too.
>
> Why would you want to reorder an enum? It seems to me the point of  
> them is to hold a small list of valid values.  The order the list is  
> described in surely should be irrelevant?

One of the main charms of using an enum for some things is that it has  
a natural ordering.

Critical > Urgent > Normal > Low > Marginal

It's not the only reason to use an enum, but for me it'd be the most  
compelling.

Cheers,
   Steve


In response to

pgsql-general by date

Next:From: Jimmy ChoiDate: 2008-04-25 15:40:53
Subject: Unnecessary scan on a partial index slows down query dramatically
Previous:From: andy petrellaDate: 2008-04-25 15:26:20
Subject: Full Text Search

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