Re: WIP: extensible enums

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: WIP: extensible enums
Дата
Msg-id 20100823181307.GA3253@fetter.org
обсуждение исходный текст
Ответ на Re: WIP: extensible enums  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Mon, Aug 23, 2010 at 11:49:41AM -0400, Alvaro Herrera wrote:
> 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).

Making things easier for the users is a good thing all by itself :)

+1 for including both BEFORE and AFTER.  Would it be worth it to allow
something like FIRST and LAST?
   ALTER TYPE myenum ADD 'newlabel' FIRST;
   ALTER TYPE myenum ADD 'newlabel' LAST;

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: WIP: extensible enums
Следующее
От: David Fetter
Дата:
Сообщение: Re: WIP: extensible enums