Re: Enums again

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Enums again
Дата
Msg-id 20051108140126.GB26953@surnet.cl
обсуждение исходный текст
Ответ на Re: Enums again  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Enums again  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan wrote:

> In the catalog, pg_type would 
> get a new column of type text[] that would hold the list of values, and 
> typtype would have a new possible value of 'e' for enumeration. There 
> might be other consequential changes too, but I think that would be most 
> of it.

Huh, why not have the actual values in a separate catalog like
pg_enumvalues or some such?

> The only functions that actually need to have any knowledge of 
> the enumeration strings are the input/output functions and the to/from 
> text casts. These would get the relevant info from fcinfo.flinfo ... and 
> then looking up the type cache - not sure yet if an extra cache 
> operation is needed.

It'd be interesting to measure the difference of having the cache vs.
not having it.

Thinking on how to pg_dump the whole thing is important too.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Enums again
Следующее
От: Robert Creager
Дата:
Сообщение: Re: SIGSEGV taken on 8.1 during dump/reload