Re: generic builtin functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: generic builtin functions
Дата
Msg-id 10549.1131646507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: generic builtin functions  (Martijn van Oosterhout <kleptog@svana.org>)
Re: generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> What I want to have is some builtin functions that can be used as the 
> input/output/cast/etc functions for each enum type.

The hard part of that is going to be figuring out how to get the
information to the functions about which enum type they're being invoked
for.  Output functions in particular are handed little except the data
value itself.

Possibly the internal representation of an enum could be 8 bytes: 4
bytes for type OID and 4 more for value.  No doubt the mysql guys would
rag on us for using too much disk space :-(.  But if you did that then
the generics would just be anyenum and done.

> I guess we could invent an anyenum pseudotype without actually exposing 
> it via the grammar.

Why do you think you need to hide it?
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: generic builtin functions
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Comments from a Firebird user via Borland