Re: Problem with delete trigger: how to allow only triggers to delete a row? - Mailing list pgsql-sql

From Alvaro Herrera
Subject Re: Problem with delete trigger: how to allow only triggers to delete a row?
Date
Msg-id 20081010183920.GD4194@alvh.no-ip.org
Whole thread Raw
In response to Re: Problem with delete trigger: how to allow only triggers to delete a row?  ("Christopher Maier" <maier@med.unc.edu>)
List 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


pgsql-sql by date:

Previous
From: "Christopher Maier"
Date:
Subject: Re: Problem with delete trigger: how to allow only triggers to delete a row?
Next
From: Aarni Ruuhimäki
Date:
Subject: SELECT multiple MAX(id)s ?