Re: variadic function, query "in", help with syntax/function
От | Pavel Stehule |
---|---|
Тема | Re: variadic function, query "in", help with syntax/function |
Дата | |
Msg-id | CAFj8pRDH56gCMUbdoGGg+KE_p-W74+FsCmoM8EmEfJxEBuxdSQ@mail.gmail.com обсуждение исходный текст |
Ответ на | variadic function, query "in", help with syntax/function (Scott Ribe <scott_ribe@elevated-dev.com>) |
Ответы |
Re: variadic function, query "in", help with syntax/function
|
Список | pgsql-general |
Hello 2012/10/21 Scott Ribe <scott_ribe@elevated-dev.com>: > 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@elevated-dev.com > http://www.elevated-dev.com/ > (303) 722-0567 voice > > > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: