From: | Luís Eduardo Oliveira Lizardo <lizardo(dot)luis(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is it possible to use an EVENT TRIGGER to validate a TRIGGER? |
Date: | 2016-07-06 12:18:24 |
Message-ID: | CAGOcHe6NjKqa70zjPKF8A_So1GT61zCHH1V_sFGTDeUyxoWAgw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Álvaro, thanks for your reaponse.
Can you please give me a small example showing how to do this, or more
hints?
Thanks in advance,
Luis Lizardo
On Jul 6, 2016 00:02, "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com> wrote:
> Luís Eduardo Oliveira Lizardo wrote:
> > Hi,
> >
> > Is it possible to use an EVENT TRIGGER to validate a TRIGGER definition?
> >
> > What I want is to guarantee that the trigger is fired AFTER a STATEMENT,
> on
> > INSERT or UPDATE but not on DELETE, like the following example:
>
> What you can do with a C language function in 9.5 is to examine the
> CreateTrigger struct and verify that it matches the conditions you want.
> So, yes, it's possible, but not in plpgsql.
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-07-06 13:23:43 | Re: Update statement results in Out of memory |
Previous Message | FarjadFarid(ChkNet) | 2016-07-06 12:01:10 | Re: Fastest memmove in C |