Re: Foreign Database Connectivity - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Foreign Database Connectivity
Date
Msg-id 3EB3DD8A.4090505@joeconway.com
Whole thread Raw
In response to Re: Foreign Database Connectivity  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> With Joe's recent additions for polymorphic functions, it's even
> possible for the function to discover what it's supposed to return
> at runtime.  (Hey Joe, did we make that work for functions called
> from the FROM clause?  If not, seems like something to fix up.)

I'm just getting back into the polymorphic-functions/array-expression 
changes this weekend. To follow up on the question above, I checked and 
found that get_fn_expr_rettype() works fine in FROM clause functions.

Of course, as I mentioned earlier, fcinfo->resultinfo->expectedDesc is 
also available in FROM clause functions, and is probably more convenient 
to use for return type discovery.

However, get_fn_expr_argtype() is your only real option as far as 
discovering run time argument types. I'm sure it also works in FROM 
clause functions (because I'm actively using it in plr)

Joe



pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: Re: Should we SetQuerySnapshot() between actions of a rule?
Next
From: "Jenny -"
Date:
Subject: startup of Postgresql Postmaster