RefLib

Reference library for AI

Back

postgresql_16:3.6.29.1 Capturing Changes at Command End

PostgreSQL 16 > The SQL Language > Functions and Operators > Event Trigger Functions > Capturing Changes at Command End

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: Name Type Description classid oid OID of catalog the object belongs in objid oid OID of the object itself objsubid integer Sub-object ID (e.g., attribute number for a column) command_tag text Command tag object_type text Type of the object schema_name text Name of the schema the object belongs in, if any; otherwise NULL. No quoting is applied. object_identity text Text rendering of the object identity, schema-qualified. Each identifier included in the identity is quoted if necessary. in_extension boolean True if the command is part of an extension script command pg_ddl_command A complete representation of the command, in internal format. This cannot be output directly, but it can be passed to other functions to obtain different pieces of information about the command.

Back