databasepostgresqlsyntax-errorsql-droppostgresql-triggers

Cannot drop trigger getting error in PostgreSQL


I am learning PostgreSQL after python. I follow tutorialspoint.com website.

There is no problem until i create a trigger and it works like a charm..

But when I tried to delete (i.e., drop) the trigger, i get the following error.

DROP TRIGGER example_trigger;
ERROR:  syntax error at or near ";"
LINE 1: DROP TRIGGER example_trigger;
                                    ^

I am not sure why do I get this error. Help me please. Is it common or am I going wrong?


Solution

  • As documented in the manual, the correct syntax is:

    drop trigger example_trigger on table_name;