On 1/18/18 12:41, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> So I'm proposing the attached alternative patch, which creates
>> constraint triggers to be TRIGGER_FIRES_ALWAYS by default.
>> Thoughts?
>
> Hm, the general idea seems attractive, but I'm not sure we want
> this behavioral change for user-created triggers. Can we make it
> happen like that only for RI triggers specifically? If not, there's
> at least some missing doco changes here.
I never quite understood the difference between a normal trigger and a
constraint trigger. But perhaps this should be it. If the purpose of a
constraint trigger is to enforce a constraint, then this should be the
default behavior, I think. You could always manually ALTER TABLE things.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services