Forum OpenACS Development: Response to Porting pl/pgsql using PERFORM and SELECT to call functions

And there's also EXECUTE, for dinamyc queries inside PL/pgSQL. http://www.postgresql.org/idocs/index.php?plpgsql-description.html#AEN24149.