Krzysztof Barlik <kbarlik(at)wp(dot)pl> writes:
> I have a question - is it possible to rename
> columns in rowset returned from plpgsql function
> delared as 'returns table(...)' ?
Sure ...
regression=# create function foo() returns table (a int, b text) as
regression-# $$ values (1,'one'), (2,'two') $$ language sql;
CREATE FUNCTION
regression=# select * from foo();
a | b
---+-----
1 | one
2 | two
(2 rows)
regression=# select * from foo() as x(y,z);
y | z
---+-----
1 | one
2 | two
(2 rows)
If that's not what you are talking about, you need to be more
specific about what you are talking about.
regards, tom lane