Core
Version 3.2.0
More SQL Server Enhancements. A second gap found while building the SQL Server provider: its triggers carry their action as an inline statement body, not by calling a separate function as PostgreSQL’s do.
Added
Triggernow has an optionalBodyto take an statement body, alongside the existingFunctionthat Postgres uses. The two are mutually exclusive: a trigger either executes a function, or runs an inline body (SQL Server).Bodyis optional and defaults tonull, so the change is source-compatible, and it participates in structural equality (a body change is a drop + recreate, like any other structural trigger change).- The SQL DDL parser and writer accept and emit the inline form:
CREATE TRIGGER … ON s.t AS $$ … $$(dollar-quoted, so the body may contain its own;), in addition to the existing… EXECUTE FUNCTION f(args)form.