Call me crazy, but shouldn't the following work? :~|
CREATE FUNCTION t() RETURNS TEXT AS ' DECLARE col_name pg_catalog.pg_attribute.attname%TYPE; BEGIN col_name := ''uga''; RETURN col_name; END; ' LANGUAGE 'plpgsql'; CREATE FUNCTION SELECT t(); WARNING: plpgsql: ERROR during compile of t near line 2 ERROR: Invalid type name 'pg_catalog.pg_attribute.attname % TYPE' -sc -- Sean Chittenden
msg04760/pgp00000.pgp
Description: PGP signature