select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / EVENT TRIGGER FUNCTIONS

pg_event_trigger_ddl_commands

Read PG 18 manual ↗

pg_event_trigger_ddl_commands returns a list of DDL commands executed by each user action, when invoked in a function attached to a ddl_command_end event trigger.

Signatures & examples

pg_event_trigger_ddl_commands () → setof record
pg_event_trigger_ddl_commands returns a list of DDL commands executed by each user action, when invoked in a function attached to a ddl_command_end event trigger. If called in any other context, an error is raised. pg_event_trigger_ddl_commands returns one row for each base command executed; some commands that are a single SQL sentence may return more than one row. This function returns the following columns:
Version history 2
  1. PG 12 → 13changed
  2. PG 9.4 → 9.5added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source