Re: Advice needed on application/database authentication/authorization/auditing model

Поиск
Список
Период
Сортировка
От Harald Fuchs
Тема Re: Advice needed on application/database authentication/authorization/auditing model
Дата
Msg-id 861v7fd1bs.fsf@mgm.protecting.net
обсуждение исходный текст
Ответ на Advice needed on application/database authentication/authorization/auditing model  (Tony Cebzanov <tonyceb@andrew.cmu.edu>)
Список pgsql-general
In article <20101022161331.GD9770@frohike.homeunix.org>,
Peter Bex <Peter.Bex@xs4all.nl> writes:

> As far as I can see, this would imply either creating views on the
> <whatever> for every user (or company?), or manually crafting queries
> to do the same.

Not necessarily. Consider this:

  CREATE TABLE t1 (
    id serial NOT NULL,
    val int NOT NULL,
    usr text NOT NULL,
    PRIMARY KEY (id)
  );

  COPY t1 (val, usr) FROM stdin;
  1    u1
  2    u1
  3    u2
  4    u3
  \.

  CREATE VIEW t1v (id, val) AS
  SELECT id, val
  FROM t1
  WHERE usr = current_user;

Now user "u1" can only see rows 1 and 2.

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

Предыдущее
От: zhong ming wu
Дата:
Сообщение: Re: What is "return code" for WAL send command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: What is "return code" for WAL send command