RES: [GENERAL] Conditioned access to a database
От | Ricardo J.C.Coelho |
---|---|
Тема | RES: [GENERAL] Conditioned access to a database |
Дата | |
Msg-id | 01BE55F8.0C31E740.pulsar@truenet-ce.com.br обсуждение исходный текст |
Список | 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@esoterica.pt] Enviada em: Quinta-feira, 11 de Fevereiro de 1999 16:07 Para: pgsql-general@postgreSQL.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@esoterica.pt)
В списке pgsql-general по дате отправления: