Re: Setof RangeType returns - Mailing list pgsql-hackers

From Patrick Handja
Subject Re: Setof RangeType returns
Date
Msg-id CAOKRWVCoP7RHE+XCDDfMQnzj6VAOsRAd7Vsi4nL1eYTR6UvEwQ@mail.gmail.com
Whole thread Raw
In response to Re: Setof RangeType returns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,

After some days, I finally found what I was looking for.
Actually this worked:

> Oid rngtypid = get_fn_expr_rettype(fcinfo->flinfo);
....
> typcache = range_get_typcache(fcinfo, rngtypid);

Thanks for the help.

Andjasubu Bungama, Patrick 



Le mar. 1 déc. 2020 à 17:39, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
Patrick Handja <patrick.bungama@gmail.com> writes:
> In my case, I do not have a range as an argument, I am receiving 2 int,
> which I am using to create a range. How can I initialize typcache in this
> case?

You should be passing down the pointer from the outer function, which
does have it at hand, no?

                        regards, tom lane

pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: Get memory contexts of an arbitrary backend process
Next
From: Zhihong Yu
Date:
Subject: Re: Parallel Inserts in CREATE TABLE AS