RES: [GENERAL] Conditioned access to a database

From: "Ricardo J(dot)C(dot)Coelho" <pulsar(at)truenet-ce(dot)com(dot)br>
To: "'Paulo da Silva'" <pdasilva(at)esoterica(dot)pt>, "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: RES: [GENERAL] Conditioned access to a database
Date: 1999-02-11 21:33:06
Message-ID: 01BE55F8.0C31E740.pulsar@truenet-ce.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Olá Paulo,

Como falamos a mesma língua, estou respondendo em Português.

Veja o capítulo que fala sobre VIEWS e RULES. Você deve criar uma "view"
para cada grupo selecionando apenas os registros que você quer permitir o
acesso. Por exemplo:

create view TABELA_GRUPOA as select * from TABELA where dptm='A';
create view TABELA_GRUPOB as select * from TABELA where dptm='B';

Dar permissão de acesso para a "view" e não para TABELA (Veja GRANT).

Execute a query: select * from TABELA_GRUPOA;

Como o Pgsql não permite alteração de "views", você deve criar "rules" nas
"views" para alterar TABELA, se for o caso.

Espero que tenha lhe ajudado.

Ricardo Coelho.

----- Mensagem original -----
De: Paulo da Silva [SMTP:pdasilva(at)esoterica(dot)pt]
Enviada em: Quinta-feira, 11 de Fevereiro de 1999 16:07
Para: pgsql-general(at)postgreSQL(dot)org
Assunto: [GENERAL] Conditioned access to a database

Hello,

I'm evaluating sql/postgresql for the following purpose:
I need to have a database with lots of "records".
I need to allow groups of users to access sets of
those records grouped by the contents of one field.
For example, the group A can only access records that
have the dptm field = "A". Is this possible?

If the subject is not simple, pls just tell me
which doc to read.

TIA

Paulo

--
"Esta Ilha pequena que habitamos"
Luis de Camoes
(International version soon available)
Paulo (pdasilva(at)esoterica(dot)pt)

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Scott 1999-02-11 22:28:12 Problems compiling
Previous Message Stephan Doliov 1999-02-11 21:08:12 Subject: Re: [GENERAL] A book for PgSQL? A need? yes? no?