Re: Determining return type of polymorphic function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Determining return type of polymorphic function
Date: 2005-08-11 18:17:30
Message-ID: 29672.1123784250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-08-11 18:40:34 Re: Determining return type of polymorphic function
Previous Message Josh Berkus 2005-08-11 15:43:12 SELECT for UPDATE and outer join?