Re: Pulling data from a constraint def - Mailing list pgsql-general

From Tom Lane
Subject Re: Pulling data from a constraint def
Date
Msg-id 14366.1273811532@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pulling data from a constraint def  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: Pulling data from a constraint def  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-general
Josh Kupershmidt <schmiddy@gmail.com> writes:
> On Thu, May 13, 2010 at 8:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Well, the inability to change the list of values is certainly an
>> unpleasant limitation, but is it so fatal that we should hide the
>> feature from people who could possibly use it? �I think not.

> I happened upon this article relevant to the subject after googling a bit:
> http://www.justatheory.com/computers/databases/postgresql/enforce-set-of-values.html

> One of the comments suggests adding an entry to pg_enum to expand the
> legal values of an existing ENUM type. How safe is this idea?

The trick is for the OID of the added entry to sort in the position you
want it relative to the existing entries.  If you don't care about that,
it's fine.

            regards, tom lane

pgsql-general by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: Pulling data from a constraint def
Next
From: Alvaro Herrera
Date:
Subject: Re: Documentation availability as a single page of text