SHOW CREATE TRIGGER
Function
Returns the exact string that can be used to recreate the named trigger.
Precautions
The sql_mode indicates the session value during query. Database b displays the sql_mode bound during routine creation. openGauss displays the session value because openGauss does not bind routines to sql_mode during routine creation.
character_set_client is the session value of the system variable when client_encoding creates the routine.
collation_connection is the value specified when lc_collate creates the database.
Database Collation is the value specified when lc_collate creates the database.
Syntax
SHOW CREATE TRIGGER trigger_name
Parameter Description
- trigger_name - Trigger name. 
Examples
--Query the statement for creating a trigger.
openGauss=# show create trigger before_ins_stmt_trig;
       Trigger        |              sql_mode               |                                                        SQL Original Statement                          
                              | character_set_client | collation_connection | Database Collation 
----------------------+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------
 before_ins_stmt_trig | sql_mode_strict,sql_mode_full_group | CREATE TRIGGER before_ins_stmt_trig BEFORE INSERT ON main_table FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('before_ins_stmt') | UTF8                 | en_US.UTF-8          | en_US.UTF-8
(1 row)
Feedback