Eric Brown <eric(dot)brown(at)propel(dot)com> writes:
> CREATE OR REPLACE FUNCTION g2(int) RETURNS int LANGUAGE plpgsql AS '
> DECLARE item t1%ROWTYPE;
> BEGIN
> SELECT INTO item * FROM t1 WHERE x = $1;
> RETURN g1(item);
> END';
This works in 8.0 but not earlier releases --- there was not support in
plpgsql for using whole-row variables in expressions.
regards, tom lane