final class Triggers
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Derives and writes triggers and event triggers.

Rule: PG-TRIGGER-001. The table of a trigger is resolved (PG-TABLE-TARGET-001) and is the relation fact of the statement; inside CREATE SCHEMA an unqualified table is in the schema being created. The declared kind of the table limits its triggers (PG-RELATION-KIND-001): no INSTEAD OF trigger on a table or a foreign table, no row BEFORE or AFTER and no TRUNCATE trigger on a view, no constraint trigger on a foreign table, no trigger at all on a materialized view or a sequence. The WHEN condition of a row trigger sees the columns of the table as OLD and NEW ("the WHEN condition can refer to columns of the old and/or new row values

  • by writing OLD.column_name or NEW.column_name"); the server gives a

statement trigger's condition the same scope and then rejects every reference to OLD or NEW (PG-TRIGGER-WHEN-001, TriggerReferences). ROW transition variables are reported as not supported. An event trigger's event must be ddl_command_start, ddl_command_end, sql_drop, table_rewrite or (PostgreSQL 17) login, and its filter variable tag; others are reported. Source: https://www.postgresql.org/docs/17/sql-createtrigger.html, https://www.postgresql.org/docs/17/event-trigger-definition.html. Status: Implemented.

Methods§

Private surface 1§

Implementation details, listed for orientation only.

private const EVENTS = ['ddl_command_start', 'ddl_command_end', 'sql_drop', 'table_rewrite', 'login']

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 7
Method calls 7