Re: Pulling data from a constraint def

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pulling data from a constraint def
Date: 2010-05-14 04:32:12
Message-ID: 14366.1273811532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Josh Kupershmidt <schmiddy(at)gmail(dot)com> writes:
> On Thu, May 13, 2010 at 8:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2010-05-14 04:36:44 Re: Documentation availability as a single page of text
Previous Message Josh Kupershmidt 2010-05-14 04:00:57 Re: Pulling data from a constraint def