Re: WIP: extensible enums

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: extensible enums
Date: 2010-08-23 15:49:41
Message-ID: 1282578489-sup-9412@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Andrew Dunstan's message of lun ago 23 05:35:09 -0400 2010:

> To add a label at the end of the list, do:
>
> ALTER TYPE myenum ADD 'newlabel';
>
> To add a label somewhere else, do:
>
> ALTER TYPE myenum ADD 'newlabel' BEFORE 'existinglabel';
>
> or
>
> ALTER TYPE myenum ADD 'newlabel' AFTER 'existinglabel';

What do you need AFTER for? Seems to me that BEFORE should be enough.
(You already have the unadorned syntax for adding an item after the last
one, which is the corner case that BEFORE alone doesn't cover).

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-08-23 16:14:52 Re: Return of the Solaris vacuum polling problem -- anyone remember this?
Previous Message Tom Lane 2010-08-23 15:37:04 Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session