Search Postgresql Archives

Re: [ERROR] syntax error at end of input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux