Re: Determining return type of polymorphic function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Determining return type of polymorphic function
Date
Msg-id 29672.1123784250@sss.pgh.pa.us
Whole thread Raw
In response to Determining return type of polymorphic function  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Determining return type of polymorphic function  (Martijn van Oosterhout <kleptog@svana.org>)
List 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 by date:

Previous
From: Josh Berkus
Date:
Subject: SELECT for UPDATE and outer join?
Next
From: Tom Lane
Date:
Subject: Re: Determining return type of polymorphic function