Re: generic builtin functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: generic builtin functions
Дата
Msg-id 11634.1131655001@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Re: generic builtin functions  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> My idea was to have the functions that need access to the text values 
> look up fcinfo->flinfo->fn_oid and then use that to look up the type 
> info. But that would mean we would need pg_proc entries for these 
> functions for each enum, even if it's the same function underneath, 
> wouldn't it?

Yeah, and you still have to have a pg_proc entry for the original
underlying function, else it doesn't get into the builtins list.

It's worth pointing out also that while aliasing a builtin function
after-the-fact like that is possible, lookup for it is substantially
slower than a normal builtin (because we can't do a binary search on
OID for it).  That's on top of the function-to-type-oid lookup you'll
have to do within the function.

I'm not convinced that using bigint-equivalent space for an enum is a
mortal sin...
        regards, tom lane


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: 8.0 -> 8.1 dump duplicate key problem?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: generic builtin functions