Re: PL/Perl returning multiple rows
| От | Joe Conway |
|---|---|
| Тема | Re: PL/Perl returning multiple rows |
| Дата | |
| Msg-id | 3FB07F7B.3070700@joeconway.com обсуждение исходный текст |
| Ответ на | Re: PL/Perl returning multiple rows (Christopher Murtagh <christopher.murtagh@mcgill.ca>) |
| Ответы |
Re: PL/Perl returning multiple rows
|
| Список | pgsql-general |
Christopher Murtagh wrote:
> On Tue, 2003-11-11 at 00:07, Joe Conway wrote:
>>Write a Pl/Perl function that just does the syscall, and call it from
>>PL/pgSQL. Similarly for complex string parsing, etc.
>
> That would work if I could get the Pl/Perl function to return an array
> or set of results, but this brings me back to the original problem
> (unless I'm missing something obvious).
Sorry, I guess I didn't sufficiently understand the issue. I don't
really use PL/Perl myself, but I would think there was some way to
return an array. In the docs, I see:
"Conversely, the return command will accept any string that is
acceptable input format for the function's declared return type. So, the
PL/Perl programmer can manipulate data values as if they were just text."
So if you declare the PL/Perl function to return text[], and return a
properly formatted array, e.g. something like
"{\"blah blah\",\"foo bar\",\"etc etc\"}"
it ought to work.
Joe
В списке pgsql-general по дате отправления: