Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
128540: sql: support creating and dropping triggers r=DrewKimball a=DrewKimball #### sql: add trigger descriptor This commit adds a `Triggers` field to the table descriptor, which is a list of `TriggerDescriptor` structs. `TriggerDescriptor` contains all the information needed to build and execute a trigger, including the timing, matched event type, and fully-resolved trigger function body. This commit also adds the logic needed to track and update object references and back-references within descriptors due to triggers. Informs #126359 Release note: None #### schemachanger: support CREATE TRIGGER in the declarative schema changer This commit adds support for `CREATE TRIGGER` statements to the declarative schema changer. The implementation assumes that most of the validation will be carried out during planning, apart from checking for cross-database references. Note that `CREATE TRIGGER` will not be implemented in the legacy schema changer. Informs #126359 Release note: None #### schemachanger: support DROP TRIGGER in the declarative schema changer This commit adds `DROP TRIGGER` support to the declarative schema changer. Just as with `CREATE TRIGGER`, `DROP TRIGGER` will not be implemented in the legacy schema changer. Informs #126359 Release note (sql change): Implemented DROP TRIGGER statements. Note that the CASCADE option for dropping a trigger is not supported. #### opt: add support for CREATE TRIGGER in optimizer This commit finalizes support for `CREATE TRIGGER` by adding support for it in the optimizer. This includes validation for the statement, dependency resolution, and logic tests. Fixes #126359 Release note (sql change): Added support for CREATE TRIGGER. Note that OR REPLACE syntax is not yet supported. Co-authored-by: Drew Kimball <[email protected]>
- Loading branch information