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

From Fran Fabrizio
Subject grant the right to select only certain rows?
Date
Msg-id 3C51900B.D3C0DA36@mmrd.com
Whole thread Raw
Responses Re: grant the right to select only certain rows?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: grant the right to select only certain rows?  (Jan Wieck <janwieck@yahoo.com>)
Re: grant the right to select only certain rows?  ("Arguile" <arguile@lucentstudios.com>)
List pgsql-general
If I have a table students:

name    grade_level
Joe        1
Kim        1
Lisa        2
Mike        2

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?  I think GRANT only works as a
table-wide permission, but a co-worker thinks he has seen similar
behavior in Oracle, like
"GRANT SELECT AS SELECT * FROM STUDENTS WHERE grade_level = 1
ON students FOR USER mary_smith"   (Rough approximation of the type of
query I am looking for).

Thanks,
Fran


pgsql-general by date:

Previous
From: Florian Wunderlich
Date:
Subject: Re: persistent portals/cursors (between transactions)
Next
From: Tom Lane
Date:
Subject: Re: persistent portals/cursors (between transactions)