Re: per-statement-level INSTEAD OF triggers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: per-statement-level INSTEAD OF triggers
Date: 2016-08-09 20:48:58
Message-ID: CA+TgmobuXtVFczo5TZJVoPUYDZObL4v30X_N49P9FY7a-SMyLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 8, 2016 at 4:40 AM, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote:
> I'm asking out of curiosity, do anyone know why we don't have
> per-statement-level INSTEAD OF triggers? I looked into the
> standard SQL (20xx draft), but I can't find the restriction
> such that INSTEAD OF triggers must be row-level. Is there
> any technical difficulties, or other reasons for the current
> implementation?

I think one problem is that the trigger wouldn't have any way of
knowing the specifics of what the user was trying to do. It would
just know the type of operation (INSERT, UPDATE, or DELETE). I guess
that could be useful to someone, but not all that useful.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-09 20:57:06 Re: per-statement-level INSTEAD OF triggers
Previous Message Alvaro Herrera 2016-08-09 20:32:44 Re: Logical Replication WIP