| От | Raymond O'Donnell |
|---|---|
| Тема | Re: Understanding setof |
| Дата | |
| Msg-id | 533F0E11.9030204@iol.ie обсуждение исходный текст |
| Ответ на | Understanding setof (Robert James <srobertjames@gmail.com>) |
| Список | pgsql-general |
On 04/04/2014 20:42, Robert James wrote: > I'm having trouble with setof returning functions > > Let's say I have function x() returning setof integers. I want to do > SELECT x(), but only keep the values which meet a criteria. Something > like: SELECT x() as xval WHERE xval = 10. > > How can I do that? > > In general, is there a way to "unroll" a setof into a regular query? if you mean that you want just a normal set of rows from the function, I think you just do this: select * from x() s(t) where t = 10; Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера