Re: FOR EACH ROW triggers on partitioned tables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: FOR EACH ROW triggers on partitioned tables
Date
Msg-id 20180309204143.n4xwudjl5oawf55p@alvherre.pgsql
Whole thread Raw
In response to Re: FOR EACH ROW triggers on partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: FOR EACH ROW triggers on partitioned tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: FOR EACH ROW triggers on partitioned tables  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: JIT compiling with LLVM v11
Next
From: Peter Eisentraut
Date:
Subject: Re: JIT compiling with LLVM v11