The ALTER TRIGGER modifies a .
Required privileges
To rename a trigger, the user must be the owner of the table on which the trigger is defined.
Synopsis
Parameters
ALTER TRIGGER ... IF EXISTS is a CockroachDB extension of the PostgreSQL syntax, which does not accept IF EXISTS for ALTER TRIGGER.
Renaming a trigger to its current name succeeds without changes. Renaming a trigger to a name that is already used by another trigger on the same table returns a duplicate-object error.
Examples
Setup
To follow along, run to start a temporary, in-memory cluster with the sample dataset preloaded:
Rename a trigger
Create a sample trigger function:
Create a sample trigger:
Rename the trigger:
Verify the new trigger name:
See also