Re: TRIGGER with WHEN clause

Albe Laurenz <laurenz.albe@wien.gv.at>

From: "Albe Laurenz" <laurenz.albe@wien.gv.at>
To: "KaiGai Kohei *EXTERN*" <kaigai@kaigai.gr.jp>, "Itagaki Takahiro" <itagaki.takahiro@oss.ntt.co.jp>
Cc: <pgsql-hackers@postgresql.org>, <gsql-rrreviewers@postgresql.org>
Date: 2009-11-16T10:42:37Z
Lists: pgsql-hackers
KaiGai Kohei wrote:
> I'm uncertain how Oracle handles the condition on the statement
> triggers. But it seems to me WHEN clause on the statement triggers
> are nonsense.

SQL> CREATE TRIGGER dummy BEFORE DELETE ON employees WHEN (1 = 1)
  2  BEGIN
  3  END;
  4  /
CREATE TRIGGER dummy BEFORE DELETE ON employees WHEN (1 = 1)
                                                *
ERROR at line 1:
ORA-04077: WHEN clause cannot be used with table level triggers

Yours,
Laurenz Albe