| От | Magnus Persson |
|---|---|
| Тема | Passing result of multirow subquery to C function |
| Дата | |
| Msg-id | 52C2ED53.202@gmail.com обсуждение |
| Ответы |
Re: Passing result of multirow subquery to C function
Re: Passing result of multirow subquery to C function |
| Список | pgsql-novice |
During the holidays I've taken on to looking at writing a postgres C extension/function. What I've done so far is more or less the article series by Ron Peterson (http://linuxgazette.net/142/peterson.html). What I'm having issues figuring out is how to pass the results of a subquery to a function (if at all possible?): SELECT hello((SELECT name FROM names)); Where name is of type TEXT. And results from calling the function is: hello ------------ Hello, Benny Hello, Kenny And what the function does is to only prepend "Hello, " to the string. My naive attempt errors with: ERROR: more than one row returned by a subquery used as an expression What should I be looking at?
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера