I think pipelined functions are code you can pretend is a database table.
For example you can do it like this in Oracle:
select * from PLSQL_FUNCTION;
You can achieve something similar in PostgreSQL using RETURN SETOF functions
CREATE OR REPLACE FUNCTION test_pipe (int)
RETURNS SETOF RECORD AS
FOR temp_rec IN (SELECT col FROM table where col > 10)
RETURN NEXT v_rec;
$$ LANGUAGE plpgsql;
This function can be called like this:
SELECT * FROM test_pipe(10) AS tbl (col int);
Hope this helps...
On 9/20/06, Milen Kulev <makulev(at)gmx(dot)net> wrote:
> Hello Lister,
> I am curios whether I can emulate the Oracle pipelined functions
> functionality in PG too (using RETURN NEXT ). For more
> information and examples about Oracle pipelined functions see:
> I have used pipeline functions in DWH enviromnent with success and would
> To use similar concept in PG too.
> Any help, examples , links and shared experiences would be greately
> Best Regards.
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
In response to
pgsql-performance by date
|Next:||From: Talha Khan||Date: 2006-09-19 21:07:58|
|Subject: Re: Pipelined functions in Postgres|
|Previous:||From: Milen Kulev||Date: 2006-09-19 20:43:33|
|Subject: Pipelined functions in Postgres|