[EMAIL PROTECTED] wrote:
Is it possible to define a complex return type like a record in a function without having some table around with the needed structure of the return values?
Sure, you just have to specify the columns at select time instead (and this is easy enough to wrap inside a view).
CREATE FUNCTION foo(TEXT) RETURNS SETOF RECORD AS '...' LANGUAGE 'plpgsql' ; SELECT * FROM foo('bar') AS x(a,b,c,d) ; Regards, LL ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match