How to drop trigger in PostgreSQL?

by elisha_langworth , in category: PHP Databases , a year ago

How to drop trigger in PostgreSQL?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by cali_green , 10 months ago

@elisha_langworth 1) Connect to the PostgreSQL database server using any client tool such as psql or pgAdmin.

2) Run the following DROP TRIGGER statement to drop the trigger:

1
DROP TRIGGER [trigger_name] ON [table_name];

3) Verify the trigger was dropped successfully by querying the schema:

1
SELECT * FROM pg_trigger WHERE tgname = '[trigger_name]';

4) If the query returns any rows then the trigger was deleted successfully.