Alvaro Herrera wrote:
> One thing I'd like to add before claiming this committable (backend-
> side) is enabling constraint triggers. AFAICT that requires a bit of
> additional logic, but it shouldn't be too terrible. This would allow
> for deferrable unique constraints, for example.
v7 supports constraint triggers. I added an example using a UNIQUE
DEFERRABLE constraint, and another one using plain CREATE CONSTRAINT TRIGGER.
It's neat to see that the WHEN clause is executed at the time of the
operation, and the trigger action is deferred (or not) till COMMIT time.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services