Re: How to limit access only to certain records?

Поиск
Список
Период
Сортировка
От hari.fuchs@gmail.com
Тема Re: How to limit access only to certain records?
Дата
Msg-id 87r4t78klo.fsf@hf.protecting.net
обсуждение исходный текст
Ответ на How to limit access only to certain records?  (Andreas <maps.on@gmx.net>)
Список pgsql-sql
Andreas <maps.on@gmx.net> writes:

> 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?

Maybe something like the following:

CREATE TABLE test1 ( id serial NOT NULL, val text NOT NULL, _user text NOT NULL, PRIMARY KEY (id)
);

COPY test1 (val, _user) FROM stdin;
for user1#1    user1
for user1#2    user1
for user2#1    user2
\.

CREATE VIEW test1v AS
SELECT id, val
FROM test1
WHERE _user = current_user;



В списке pgsql-sql по дате отправления:

Предыдущее
От: Jayadevan M
Дата:
Сообщение: Re: How to limit access only to certain records?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: How to limit access only to certain records?