SHOW TRIGGERS lists the defined on a table.
SHOW TRIGGERS
The
List the triggers on the table:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SHOW TRIGGERS lists the defined on a table.
| Parameter | Description |
|---|---|
table_name | The name of the table for which to list triggers. |
| Field | Description |
|---|---|
trigger_name | The name of the trigger. |
enabled | Whether the trigger is enabled. |
CREATE TABLE users (id INT PRIMARY KEY, name STRING);
CREATE FUNCTION update_timestamp()
RETURNS TRIGGER AS $$
BEGIN
RAISE NOTICE 'Current timestamp: %', now();
RETURN NEW;
END;
$$ LANGUAGE PLpgSQL;
CREATE TRIGGER log_update_timestamp
AFTER UPDATE ON users
FOR EACH ROW
EXECUTE FUNCTION update_timestamp();
SHOW TRIGGERS FROM users;
trigger_name | enabled
-----------------------+----------
log_update_timestamp | t
(1 row)
