Re: poll: CHECK TRIGGER?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: poll: CHECK TRIGGER?
Date: 2012-03-05 16:07:50
Message-ID: CAFj8pRDDXr7o8xksHtVZqpG1Z+RpYb_JS1TtSrn_R6yapQfMiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/3/5 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sat, Mar 3, 2012 at 9:23 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>> Uh!  Now that I read this I realize that what you're supposed to give to
>> CHECK TRIGGER is the trigger name, not the function name!  In that
>> light, using CHECK FUNCTION for this doesn't make a lot of sense.
>>
>> Okay, CHECK TRIGGER it is.
>
> I confess to some bafflement about why we need dedicated syntax for
> this, or even any kind of core support at all.  What would be wrong
> with defining a function that takes regprocedure as an argument and
> does whatever?  Sure, it's nicer syntax, but we've repeatedly rejected
> patches that only provided nicer syntax on the grounds that syntax is
> not free, and therefore syntax alone is not a reason to change the
> core grammar.  What makes this case different?

Fo checking trigger handler (trigger function) you have to know
trigger definition (only joined relation now), but it can be enhanced
for other tests based on trigger data.

Regards

Pavel

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Litwinowicz 2012-03-05 16:08:12 elegant and effective way for running jobs inside a database
Previous Message Robert Haas 2012-03-05 16:03:35 Re: poll: CHECK TRIGGER?