pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Teunis Peters <teunis@wintersgift.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: users, address record restrictions
Date: Mon, 20 Jun 2005 17:22:09 -0600
Message-ID: <20050620232209.GA27784@winnie.fuhr.org> (raw)
In-Reply-To: <70756f4668fbcef8a75a240af4bb3d7d@wintersgift.com>
References: <70756f4668fbcef8a75a240af4bb3d7d@wintersgift.com>

On Mon, Jun 20, 2005 at 11:51:11AM -0700, Teunis Peters wrote:
>
> I've got an interesting problem - this MIGHT (probably) isn't the right 
> forum for this.

pgsql-general is usually a good place if you're not sure where a
question belongs.  This doesn't sound much like an interfaces
problem.

> however - I'd like to restrict access to specific records and groups of 
> records (based on another table) - and I'm not even sure where to start 
> looking.

By "access" do you mean SELECT only, or also INSERT, UPDATE, and/or
DELETE?  One possibility might be to use a view with a WHERE clause
that does the restriction.  You'd revoke all privileges from the
underlying tables and grant whatever privileges people need on the
view, possibly adding rules to rewrite INSERT, UPDATE, and DELETE
operations.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (2+ messages)

Message-ID: <20050620232209.GA27784@winnie.fuhr.org>
Permalink:  ../20050620232209.GA27784@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050620232209.GA27784@winnie.fuhr.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mike@fuhr.org, teunis@wintersgift.com
  Subject: Re: users, address record restrictions
  In-Reply-To: <20050620232209.GA27784@winnie.fuhr.org>

* 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