Re: Determining return type of polymorphic function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Determining return type of polymorphic function
Дата
Msg-id 29672.1123784250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Determining return type of polymorphic function  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Determining return type of polymorphic function  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> What I'm trying to do now is use fcinfo->flinfo->fn_oid to lookup
> pg_proc and get the return type from there, but something tells me
> there must be an easier way.

No, I think you're stuck.  The internal calls for type I/O routines
don't set up fn_expr (since there is no expression tree).

One possibility, depending on your time horizon for this, is to change
the getTypeIOParam rules so that ordinary types get their own OID as
second argument.
        regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: SELECT for UPDATE and outer join?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Determining return type of polymorphic function