Re: flinfo NULL in DirectFunctionCall callee?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: flinfo NULL in DirectFunctionCall callee?
Date: 2019-08-26 15:11:58
Message-ID: 31067.1566832318@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> writes:
> Is it expected for flinfo to be null when using DirectFunctionCall*?

Yes, per the comment on those functions:

* These are for invocation of a specifically named function with a
* directly-computed parameter list. Note that neither arguments nor result
* are allowed to be NULL. Also, the function cannot be one that needs to
* look at FmgrInfo, since there won't be any.

> Is there something else I should use instead? It looks like
> FunctionCall2 would let me pass my own flinfo, but I'm not sure how to
> set that up first.

Use fmgr_info() or a sibling to fill in the FmgrInfo.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Thomason 2019-08-26 16:00:14 import job not working
Previous Message Paul A Jungwirth 2019-08-26 14:51:27 flinfo NULL in DirectFunctionCall callee?