Skip site navigation (1) Skip section navigation (2)

Re: DML Restriction unless through a function

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: val(at)webtribe(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DML Restriction unless through a function
Date: 2004-06-30 13:15:39
Message-ID: 40E2BCFB.2030007@frodo.hserus.net (view raw or flat)
Thread:
Lists: pgsql-general
val(at)webtribe(dot)net wrote:

> Hi all;
> 
> Is it possible to write a trigger or the ilk that would disallow 
> direct inserts, updates, or deletes to a table unless it was 
> being executed through a function?  How can I identify that the 
> DML being issued is being done via a function?

http://www.postgresql.org/docs/7.4/static/sql-createfunction.html

Look for security definer. Grant table access only to user who creates the 
function and grant access to function to everybody concerned.

HTH

  Shridhar

In response to

pgsql-general by date

Next:From: joseph speigleDate: 2004-06-30 13:45:18
Subject: substring syntax with regexp
Previous:From: Karam ChandDate: 2004-06-30 12:50:41
Subject: SQLyog for PostgreSQL has been released

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group