Re: grant the right to select only certain rows?

From: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: grant the right to select only certain rows?
Date: 2002-01-25 18:35:29
Message-ID: 3C51A571.C463ADC7@mmrd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mmrd(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fran Fabrizio 2002-01-25 18:37:29 Re: grant the right to select only certain rows?
Previous Message Jan Wieck 2002-01-25 18:23:41 Re: grant the right to select only certain rows?