table value function help - Mailing list pgsql-general

From Glenn Schultz
Subject table value function help
Date
Msg-id CAE-4=KGD4fH=A0YMqYht3V6cOr4Wyd1eoH=hOtZ7TS8YCvX89g@mail.gmail.com
Whole thread Raw
Responses Re: table value function help
Re: table value function help
List pgsql-general
Hello,

I have a table value function and would like the first and second input to take multiple arguments (array or list) I suppose.  Like the below:


create or replace function myfunction(sector, agency, term)
returns table (cusip char(9), sector char(12))
language sql
stable
as $function$

select foo
from
atable
where
sector in (myfunction.sector)

usage

sectorselect('sector_1 sector_2', 'agent_1 agent_2, 120)

pgsql-general by date:

Previous
From: Josef Šimánek
Date:
Subject: Re: a bug jsonb?
Next
From: Tom Lane
Date:
Subject: Re: Compile postgresql libraries with VS17