Hi Milen,
Pipelined function is a code that acts like a database table.
Inorder to use this functionality in postgres you would need to write the function like this
CREATE OR REPLACE FUNCTION get_test_data (numeric)
RETURNS SETOF RECORD AS
$$
DECLARE
temp_rec RECORD;
BEGIN
FOR temp_rec IN (SELECT ename FROM emp WHERE sal > $1)
LOOP
RETURN NEXT temp_rec;
END LOOP;
RETURN;
END;
$$ LANGUAGE plpgsql;
now inorder to call this function you would write the code as follows
SELECT * FROM get_test_data(1000) AS t1 (emp_name VARCHAR);
Regards
Talha Amjad