>> Thanks for the reply, but that did not seem to help.
> I tried to replicate this as follows:
> --- CUT ---
> create table request(objectid text, productid int, data jsonb); create index
> on request(objectid, productid);
> CREATE OR REPLACE FUNCTION public.steve1(param_requestid text[],
>
"Dirschel, Steve" writes:
>> I think you would have better luck if the planner were "inlining"
>> this function, which we can see it's not since you get a Function Scan on
>> steve1 rather than the contained query.
>> I think the only thing stopping that from happening is that the function is
>>
> > Here is the function I'm having difficulties with:
> > CREATE OR REPLACE FUNCTION public.steve1(param_requestid text[],
> > param_productid integer DEFAULT 1) RETURNS TABLE(objectid text, n
> > text, v text, vt integer) LANGUAGE sql AS $function$
> > SELECT objectid::text
> >
"Dirschel, Steve" writes:
> Here is the function I'm having difficulties with:
> CREATE OR REPLACE FUNCTION public.steve1(param_requestid text[],
> param_productid integer DEFAULT 1)
> RETURNS TABLE(objectid text, n text, v text, vt integer)
> LANGUAGE sql
> AS $function$
> SELECT objectid