Re: TRIGGER with WHEN clause

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TRIGGER with WHEN clause
Date: 2009-11-19 01:09:28
Message-ID: 4B049AC8.4060807@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-rrreviewers

Itagaki-san,

I don't have any more comments in this patch, so I hope it to be reviewed
by committers then upstreamed.

Thanks for your good jobs.

Itagaki Takahiro wrote:
> KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com> wrote:
>
>> In addition, I could find a few matters.
>> * TOAST may be necessary for pg_trigger?
>
> I added toast relation to pg_trigger.
> DECLARE_TOAST(pg_trigger, 2336, 2337);
>
> I think having a toast relation for pg_trigger is reasonable
> because pg_trigger already has a variable field "tgargs"
> even if we don't have the new field "tgqual" from the patch.
> I'm not sure why we don't have a toast relation for pg_trigger
> because user might pass very long trigger arguments.
>
>> * ROW INSERT TRIGGER on COPY FROM statement
>
> Thanks. Good catch! Fixed and regression test added.
>
>> * Using system column in WHEN clause
>> 2) Describe a notice on the user documentation not to use system columns
>> in the WHEN clause, because these are assigned on after the trigger
>> invocations.
>
> I'd like to only add documentation because I don't have a whole solution.
> ----
> System columns are not available in the <literal>WHEN</> clause
> because those values are initialized after triggers are called.
> They might return wrong values if they used in expressions of the clause.
> ----
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>

--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-19 01:19:01 "Not safe to send CSV data" message
Previous Message Joachim Wieland 2009-11-19 01:06:53 Re: Listen / Notify - what to do when the queue is full

Browse pgsql-rrreviewers by date

  From Date Subject
Next Message KaiGai Kohei 2009-11-19 01:54:02 Re: [HACKERS] TRIGGER with WHEN clause
Previous Message Itagaki Takahiro 2009-11-18 08:46:02 Re: TRIGGER with WHEN clause