Re: grant the right to select only certain rows?

From: "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com>
To: "'Fran Fabrizio'" <ffabrizio(at)mmrd(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: grant the right to select only certain rows?
Date: 2002-01-25 17:24:52
Message-ID: 9534B16F750ED2118CF90008C724C4460C222466@lmig-msg-20.lmig.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You could create a VIEW and in that view show only grade level 1; and give
her access just to that view.

-----Original Message-----
From: Fran Fabrizio [mailto:ffabrizio(at)mmrd(dot)com]
Sent: Friday, January 25, 2002 12:04 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] grant the right to select only certain rows?

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2002-01-25 17:33:51 Re: grant the right to select only certain rows?
Previous Message Hiroshi Inoue 2002-01-25 17:23:26 Re: persistent portals/cursors (between transactions)