Hola Gustavo, aquí les va la función:
*********************
CREATE OR REPLACE FUNCTION "public"."Prueba" (Nombre_Tabla CHAR(15),
Nombre_Atributo CHAR(15)) RETURNS BOOLEAN AS
$body$
DECLARE
table_name ALIAS FOR $1;
atrib_name ALIAS FOR $2;
BEGIN
ALTER TABLE table_name ADD COLUMN atrib_name varchar;
RETURN TRUE;
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
********************************************
y este es el error:
ERROR: syntax error at or near "$1" at character 14
QUERY: ALTER TABLE $1 ADD COLUMN $2 varchar
CONTEXT: SQL statement in PL/PgSQL function "Prueba" near line 5
muchas gracias.