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 like this:
CREATE OR REPLACE FUNCTION test_pipe (int) RETURNS SETOF RECORD AS $$ DECLARE v_rec RECORD; BEGIN FOR temp_rec IN (SELECT col FROM table where col > 10) LOOP RETURN NEXT v_rec; END LOOP; RETURN; END; $$ LANGUAGE plpgsql;
I have used pipeline functions in DWH enviromnent with success and would like To use similar concept in PG too.
Any help, examples , links and shared experiences would be greately appreciated.
Best Regards. Milen
---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [email protected] so that your message can get through to the mailing list cleanly