Question: Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables.

It also looks like Foreign Key constraints show up in the pg\_trigger table, which I DO NOT want to drop. I just want to drop the user created trigger from my tables and keep the FKs.

Any suggestions?

Answer: 
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste:

```
SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || event_object_table || ';'
FROM information_schema.triggers
WHERE trigger_schema = 'public';

```
The top answer is still flawed because there is no need for two loops.

It can be done by:

```
CREATE PROCEDURE _DropTableTriggers()
AS
$$
DECLARE
    _rec    RECORD;
BEGIN
    FOR _rec IN
        SELECT  DISTINCT    event_object_table, trigger_name
        FROM    INFORMATION_SCHEMA.triggers
    LOOP
        EXECUTE 'DROP TRIGGER ' || _rec.trigger_name || ' ON ' || _rec.event_object_table || ';';
    END LOOP;
END
$$ LANGUAGE plpgsql SECURITY DEFINER;

```