pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Dayo Johnson <dayoj@cleanjohn.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Priviliges and Roles
Date: Mon, 27 Feb 2006 12:39:29 -0600
Message-ID: <20060227183929.GA24041@wolff.to> (raw)
In-Reply-To: <4402EC0C.9030903@cleanjohn.net>
References: <4402EC0C.9030903@cleanjohn.net>

On Mon, Feb 27, 2006 at 12:09:48 +0000,
  Dayo Johnson <dayoj@cleanjohn.net> wrote:
> Hello,
> 
> Is it possible to do the following:
> Disallow permission to write to a table (either by UPDATE or INSERT) but 
> allow EXECUTE permission on a Function that writes to the table ?
> 
> The reason I want to do this is so that I can perform certain checks on 
> the data that is being written before I allow it to be written.

You can use SECURITY DEFINER functions to do this. Those functions run
with the access rights of the function creator, rather than the executor.



view thread (5+ messages)

Message-ID: <20060227183929.GA24041@wolff.to>
Permalink:  ../20060227183929.GA24041@wolff.to/
Also on:    postgresql.org/message-id/20060227183929.GA24041@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, dayoj@cleanjohn.net
  Subject: Re: Priviliges and Roles
  In-Reply-To: <20060227183929.GA24041@wolff.to>
  References: <4402EC0C.9030903@cleanjohn.net> <20060227183929.GA24041@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox