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 :=3D ''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
--=20
Sean Chittenden