From: Jov <zhao6014@gmail.com>
To: Andreas <maps.on@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to limit access only to certain records?
Date: Fri, 22 Jun 2012 20:35:51 +0800
Message-ID: <CADyrUxO2zqFMSNYFFodswCth-BOQ1OEKeiC-2V3WWubb-vpmyQ@mail.gmail.com> (raw)
In-Reply-To: <4FE458AB.4000109@gmx.net>
References: <4FE458AB.4000109@gmx.net>
no,I think there is no such way.
what about create view for the user you want to limit,and revoke select
privilege from the base table ?
2012/6/22 Andreas <maps.on@gmx.net>
> Hi,
>
> is there a way to limit access for some users only to certain records?
>
> e.g. there is a customer table and there are account-managers.
> Could I limit account-manager #1 so that he only can access customers only
> acording to a flag?
>
> Say I create a relation cu_am ( customer_id, account_manager_id ).
> Could I let the database control that account-manager #1 can only see
> customers who are assigned to him in the cu_am-relation?
>
> For now I do this in the front-end but this is easily circumvented for
> anyone who has a clue and uses some other client like psql.
>
>
> Regards
> Andreas
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-sql<http://www.postgresql.org/mailpref/pgsql-sql;
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zhao6014@gmail.com, maps.on@gmx.net
Subject: Re: How to limit access only to certain records?
In-Reply-To: <CADyrUxO2zqFMSNYFFodswCth-BOQ1OEKeiC-2V3WWubb-vpmyQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox