Re: feature proposal - triggers by semantics

From: Craig Ringer <craig(at)2ndQuadrant(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Darren Duncan <darren(at)darrenduncan(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: feature proposal - triggers by semantics
Date: 2012-11-15 10:44:41
Message-ID: 50A4C799.3030909@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/15/2012 06:25 PM, Hannu Krosing wrote:
> On 11/15/2012 09:48 AM, Craig Ringer wrote:
>> If you want to prevent TRUNCATE, deny the privilege or add a trigger
>> that aborts the command.
> You can abort the transaction but not skip action as currently it is only
> possible to skip in ROW level triggers.
>
> So I'd modify this request to allow BEFORE EACH STATEMENT triggers
> to also be able to silently skip current action like BEFORE EACH ROW
> triggers can.
>
> Then this request would simply be satisfied by a simple trigger which
> rewrites TRUNCATE into DELETE .
That seems sensible to me, too.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-11-15 10:44:42 Re: Switching timeline over streaming replication
Previous Message Peter Geoghegan 2012-11-15 10:44:20 Re: Doc patch making firm recommendation for setting the value of commit_delay