variadic function, query "in", help with syntax/function

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: variadic function, query "in", help with syntax/function
Date: 2012-10-21 16:51:40
Message-ID: 17E66E9E-602C-44D3-A13F-2F1784458B07@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Briefly, what would it take to make the following work?

create function getbatch (variadic ids int8[]) returns setof foobar as $$
begin
return query
select * from foobar where id in (ids);
end;
$$ language plpgsql;

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2012-10-21 17:01:05 Re: variadic function, query "in", help with syntax/function
Previous Message Chris Travers 2012-10-21 13:14:10 Re: Strategies/Best Practises Handling Large Tables