Re: Working with PostgreSQL enums in C code

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Working with PostgreSQL enums in C code
Дата
Msg-id 4C0D9063.9070609@dunslane.net
обсуждение исходный текст
Ответ на Re: Working with PostgreSQL enums in C code  (Joseph Adams <joeyadams3.14159@gmail.com>)
Список pgsql-hackers

Joseph Adams wrote:
>
> By the way, just curious: why can't the internal representation of an
> enum just be an INT starting from 0 by default, like in C?  That would
> make a heck of a lot more sense, in my opinion.  It might also allow
> users to do things like this in the future:
>
>
>   

Please review the debates over the internal representation from several 
years ago when enums were implemented. Essentially the difficulty is 
that the output function needs to get nothing more than the value 
itself, and that means the representation needs to carry with it some 
information about *which* enum set it is in.

cheers

andrew


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

Предыдущее
От: Takahiro Itagaki
Дата:
Сообщение: Re: pgstatindex still throws ERROR: value "3220078592" is out of range for type integer
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Fix leaky VIEWs for RLS