Re: grant the right to select only certain rows? - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: grant the right to select only certain rows?
Date
Msg-id 3C51A571.C463ADC7@mmrd.com
Whole thread Raw
In response to grant the right to select only certain rows?  (Fran Fabrizio <ffabrizio@mmrd.com>)
List pgsql-general
I was wondering if there were other options, since the reality is that we
have so many grade_levels.  It would have been cool if it could be done via
grant or something similar, because (and I'd be thrilled if someone told me
I was wrong on this next point) doing it via views means that every time you
reload the db schema, you have to recreate the views (since the views point
to an OID for the parent table that no longer exists).  Our schema will be
under heavy development at least for a couple more months, so this could
become tedious.

Thanks,
Fran



> Fran Fabrizio <ffabrizio@mmrd.com> writes:
> > And I have two database users, mary_smith and tom_white.  If Mary Smith
> > is the 1st grade teacher, is there any way to grant her access to only
> > select rows where grade_level=1?
>
> Make a VIEW that shows only those rows, and grant access to the view.
> See the archives for past discussions.
>
>                         regards, tom lane


pgsql-general by date:

Previous
From: Fran Fabrizio
Date:
Subject: Re: grant the right to select only certain rows?
Next
From: Elein
Date:
Subject: Re: Yet another optimizer index choosing questions