Hello 2012/10/21 Scott Ribe <scott_ribe@xxxxxxxxxxxxxxxx>: > 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; > create function getbatch (variadic ids int8[]) returns setof foobar as $$ begin return query select * from foobar where id = any (ids); end; $$ language plpgsql; note, for these single statement function, sql language is better regards Pavel Stehule > -- > Scott Ribe > scott_ribe@xxxxxxxxxxxxxxxx > http://www.elevated-dev.com/ > (303) 722-0567 voice > > > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general