Re: Restricting access to rows? - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: Restricting access to rows?
Date
Msg-id 20060526053929.GA21043@KanotixBox
Whole thread Raw
In response to Restricting access to rows?  (Benjamin Smith <lists@benjamindsmith.com>)
Responses Re: Restricting access to rows?
List pgsql-general
Benjamin Smith <lists@benjamindsmith.com> schrieb:
> How can I set up a user so that Bob can update his records, without letting
> Bob update Jane's records? Is it possible, say with a view or some other
> intermediate data type?

You can use a VIEW to select all rows for CURRENT_USER, and then create
RULES for this view to do INSERT, UPDATE and DELETE.

A nice framework for row-level access-control is 'veil':
http://pgfoundry.org/projects/veil


HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-general by date:

Previous
From: Benjamin Smith
Date:
Subject: Restricting access to rows?
Next
From: Greg Stark
Date:
Subject: Re: Restricting access to rows?