Re: delta relations in AFTER triggers - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: delta relations in AFTER triggers
Date
Msg-id CABRT9RDYNRo2xT2o_sMENUVH0ki4W4hOEp6Rm6U_jqaYr1Sp+g@mail.gmail.com
Whole thread Raw
In response to Re: delta relations in AFTER triggers  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: delta relations in AFTER triggers  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: delta relations in AFTER triggers  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
On Tue, Jul 29, 2014 at 9:49 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I dislike this proposal - it is strongly inconsistent with current trigger
> design

The real point I was trying to convey (in my previous email) is that
these declarations should be part of the trigger *function* not the
function-to-table relationship. CREATE TRIGGER shouldn't be in the
business of declaring new local variables for the trigger function.
Whether we define new syntax for that or re-use the argument list is
secondary.

But the inconsistency is deliberate, I find the current trigger API
horrible. Magic variables... Text-only TG_ARGV for arguments...
RETURNS trigger... No way to invoke trigger functions directly for
testing.

By not imitating past mistakes, maybe we can eventually arrive at a
language that makes sense.

Regards,
Marti



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: delta relations in AFTER triggers
Next
From: Fabien COELHO
Date:
Subject: Re: gaussian distribution pgbench -- splits v4