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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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