Untyped result (setof / rowset) from Functions ?

From: "Modern Mexican" <felipe(at)modernmexican(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Untyped result (setof / rowset) from Functions ?
Date: 2005-10-05 07:47:26
Message-ID: MPBBJNBFMGDOEMEFADNECEOLBGAB.felipe@modernmexican.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a technical reason why an untyped result (setof / rowset) from a
function (sql or plpgsql) is not implemented ?

Something Simple:

CREATE FUNCTION foo(x int) RETURNS SETOF records AS
'SELECT t1.*, t2.* FROM t1 INNER JOIN t2 ON t1.a=t2a
WHERE WHERE t1.id=$1'
LANGUAGE SQL

So I will not have to create a TYPE every time I return a SETOF JOINED
tables or a sub-set of the columns of a table.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Peter 2005-10-05 07:49:33 transaction toggling
Previous Message Matthew Peter 2005-10-05 07:40:02 query execution