Re: Problem with delete trigger: how to allow only triggers to delete a row?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Christopher Maier <maier(at)med(dot)unc(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with delete trigger: how to allow only triggers to delete a row?
Date: 2008-10-10 18:39:20
Message-ID: 20081010183920.GD4194@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Christopher Maier wrote:

> Correct? That sounds like it would work. If at all possible, I'd like
> to keep the "interface" the same for all my tables, though (i.e., users
> don't have to be concerned with whether they can do regular SQL deletes,
> or if they have to call a special function).

Hmm, maybe you can turn a regular DELETE into a function call by using
an INSTEAD rule, but I'm not sure. That way they would just do a plain
DELETE and the sec-def function would be called instead.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2008-10-10 20:53:15 Re: Problem with delete trigger: how to allow only triggers to delete a row?
Previous Message Christopher Maier 2008-10-10 18:25:05 Re: Problem with delete trigger: how to allow only triggers to delete a row?