"Marcelo de Moraes Serpa" <celoserpa@gmail.com> 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