Passing result of multirow subquery to C function
| От | 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 по дате отправления: