| От | Richard Huxton |
|---|---|
| Тема | Re: select refcursor into a variable |
| Дата | |
| Msg-id | 200212040946.41082.dev@archonet.com обсуждение исходный текст |
| Ответ на | select refcursor into a variable ("Madhavi" <madhavi@zoniac.com>) |
| Список | pgsql-general |
On Wednesday 04 Dec 2002 6:48 am, Madhavi wrote: > Hi all, > I'm executing dynamic queries in postgres7.2.3. Is there a way I can > execute a refcursor and then select it into a variable and then return that > variable? My query returns the sum of values. So its only one single > value...that I want to select into a variable. How do I do this. 'cos I > don't wnat to return a refcursor. Not sure that you need a refcursor at all for what you're describing. Define the function as returning int4 (or whatever numeric type is desired) and either SELECT INTO, or use a LOOP on the refcursor if that's what you need. -- Richard Huxton
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера