Re: Command Triggers, patch v11 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Command Triggers, patch v11
Date
Msg-id 18852.1330376038@sss.pgh.pa.us
Whole thread Raw
In response to Re: Command Triggers, patch v11  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Command Triggers, patch v11  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: Command Triggers, patch v11  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Thom Brown <thom@linux.com> writes:
>> I've got a question regarding the function signatures required for
>> command triggers, and apologies if it's already been discussed to
>> death (I didn't see all the original conversations around this).
>> These differ from regular trigger functions which don't require any
>> arguments, and instead use special variables.  Why aren't we doing the
>> same for command triggers?  So instead of having the parameters

> Basically so that we don't have to special code support for each and
> every language out there.

FWIW, I agree with Thom on this.  If we do it as you suggest, I
confidently predict that it will be less than a year before we seriously
regret it.  Given all the discussion around this, it's borderline insane
to believe that the set of parameters to be passed to command triggers
is nailed down and won't need to change in the future.

As for special coding of support, it hardly seems onerous when every
language that has triggers at all has got some provision for the
existing trigger parameters.  A bit of copying and pasting should get
the job done.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: possible new option for wal_sync_method
Next
From: Dimitri Fontaine
Date:
Subject: Re: Command Triggers, patch v11