Questions about privileges

Поиск
Список
Период
Сортировка
От sylsau14@hotmail.com
Тема Questions about privileges
Дата
Msg-id 1141477707.117312.180900@e56g2000cwe.googlegroups.com
обсуждение исходный текст
Ответы Re: Questions about privileges
Список pgsql-general
Hello,

For an exercise at university, I have several SQL queries to find to
manage privileges on a database.
I didn't found all the queries.

So, this is my problem :

I have got one table named books with several columns.
* The first question is :

- All users can find titles, codes and prices of books (which are
columns of the table books)

For the moment, I did this :   grant select on table books to public;

But with this solution, all users can find information about all the
attributes of the table books and not only about titles, codes and
prices.
So, I would like if a solution existed for that (to allow all users to
access only at the columns titles, codes and prices).


* My second question is :

- Mister X can create an index on the table books

For the moment, I did this :   grant create on tablespace books to X;

Is that good ?


* My third question is :

- Mister X can update the structure of the table books

For that, I don't know how I can do. Someone would have an idea to do
that ?


*  My last question is :

- Mister X can update the column quantity of the table books where the
column codes is equal to 2 but He can't access at others datas of the
table books.

For the moment, I found how to limit the update at the column quantity
of the table books with the following query :

grant update(quantity) on books to X;

But, I don't know how to limit the update of the column quantity only
where column codes is equal to 2.
Someone would have an idea to do that ?

Thanks to help me.

Sylvain.


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

Предыдущее
От: lists@adontendev.net
Дата:
Сообщение: What query on system tables retrieves table or queries definitoin
Следующее
От: "Bart Golda"
Дата:
Сообщение: A pg_hba.conf problem - again...