On Tue, Dec 12, 2006 at 10:30:07AM +0100, Rikard Pavelic wrote:
> Hi!
>
> Is there any plan to add implicit declaration of returning parameters
> for functions?
> Something like:
> create function list(in a int) returns setof implicit record as
You can use a SETOF function as:
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;
-----------------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)