Re: add label to enum syntax

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: add label to enum syntax
Дата
Msg-id AANLkTin5i2ektVn1BjOV84agNJ9PSOmfxQsjR0ENg98Z@mail.gmail.com
обсуждение исходный текст
Ответ на Re: add label to enum syntax  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: add label to enum syntax  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
On Tue, Oct 26, 2010 at 9:54 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 10/26/2010 03:02 AM, Dean Rasheed wrote:
>>
>> In mathematics (and I think also computer science), the term
>> conventionally used the refer to the things in an enumeration is
>> "element", so how about ADD ELEMENT?
>
> Unlike the other suggestions, ELEMENT is not currently a keyword. That
> doesn't rule it out entirely, but it's a factor worth consideration.
>
>> The label is just one of the ways of identifying the element, and the
>> value is element's OID. The thing you're adding is an element, with
>> both a label and a value.
>>
>
> No, I think that's the wrong way of thinking about it entirely. The label
> *is* the value and the OID is simply an implementation detail, which for the
> most part we keep completely hidden from the user. We could have implemented
> enums in ways that did not involve OIDs at all, with identical semantics.
>
> Notwithstanding the above, I don't think ELEMENT would be a very bad choice.

I still think we should just go for LABEL and be done with it.  But
y'all can ignore me if you want...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Steve Singer
Дата:
Сообщение: Rollback sequence reset on TRUNCATE rollback patch
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Extensions, this time with a patch