From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Josué Maldonado <josue(at)lamundial(dot)hn> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Restricted query |
Date: | 2004-05-19 03:06:16 |
Message-ID: | 40AACF28.7060000@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You could use a view and give group rights to a particular view.
Josué Maldonado wrote:
> Hello list,
>
> This is an inventory system where some users are restricted to view only
> certain suppliers, those restrictions are in a table called pedusers
> (username,supplierallowed), there are other kind of "superuser" who are
> not restricted, actually I created another table for them (userexcept).
> To select restricted rows I use this code:
>
> select * from prvdor
> where prvtiprov = 2 and
> prvpk in
> (select usr_prvdor from peduser where
> usr_login = 'default')
>
>
> I think I would write this in a return set function instead but I would
> like to know others ways to write a SQL sentence to return the rows
> according users permission/restrictions.
>
>
> Thanks in advance for your comments
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-19 03:41:04 | Re: PgSQL 7.4.2 - NaN on Tru64 UNIX |
Previous Message | Brian Hirt | 2004-05-19 02:21:43 | Re: pg_autovacuum seems to be a neat freak and cleans way too much |