Re: How restrict select on a view ?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How restrict select on a view ?
Date: 2008-12-15 23:46:05
Message-ID: 4946EC3D.7000009@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 15/12/2008 17:55, Andreas wrote:

> I'd like to have a view only to be used by certain users.
> The tables are public.

It doesn't seem to make a lot of sense to have public access to the
tables but restrict access to the views.

The usual pattern is the other way around - restrict access to the
tables, and use views to give public (or at least less restricted) to
those subsets of the data you choose.

If you have views with restricted access but leave the tables public,
the users with access to the views can bypass them and go straight to
the tables instead, circumventing your attempts at security.

Then again, maybe I've misunderstood what you're trying to achieve...
can you give more detail?

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2008-12-15 23:48:33 Re: Relational database design book
Previous Message Jaime Casanova 2008-12-15 21:31:39 Re: Urgente error in restore prod