PL/Perl returning multiple rows - Mailing list pgsql-general

From Christopher Murtagh
Subject PL/Perl returning multiple rows
Date
Msg-id 1068497992.348.41.camel@brahma.wcg.mcgill.ca
Whole thread Raw
Responses Re: PL/Perl returning multiple rows  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Greetings,

 I'm trying to write a pl/perl function that will return multiple rows.
I've looked all over the web and only found vague references as to how
to do this (some said it was possible, and some said it wasn't but it
was for older versions of Postgres).

 Basically I would *love* to be able to do something like this:

 SELECT some_id
 FROM some_table
 WHERE ....
 INTERSECT
 SELECT perlfunc(someparameter);

 Is this possible, or do I need to insert results into a temporary table
and intersect with that?

 SELECT some_id
 FROM some_table
 WHERE ....
 INTERSECT
 SELECT some_id
 FROM temp_result
 WHERE temp_id = perlfunc(someparameter);

Any pointers would be much appreciated.

Thanks in advance.

Cheers,

Chris

--
Christopher Murtagh
Enterprise Systems Administrator
ISR / Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax:  (514) 398-2017

pgsql-general by date:

Previous
From: Boris Popov
Date:
Subject: Re: Temp rows - is it possible?
Next
From: Dave Smith
Date:
Subject: ERROR: out of free buffers: time to abort!