"Marcelo de Moraes Serpa" <celoserpa@xxxxxxxxx> writes: > DROP FUNCTION IF EXISTS aNomeProcAudita; > DROP TRIGGER IF EXISTS 'Audita_' || pTabAudit || '_trigger'; Neither of those match the documented syntax for the commands: you have left off required information. Also, as Andreas noted, if you want to construct a name dynamically then you have to use EXECUTE. The second one should go something like EXECUTE 'DROP TRIGGER IF EXISTS Audita_' || pTabAudit || '_trigger ON ' || tableName; regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend