Privileges & roles

Поиск
Список
Период
Сортировка
Искать

Privileges & roles

От:
Carol Walter <walterc@indiana.edu>
Дата:
Hello,

I'm running PostgreSQL 8.2.3 on Solaris 10.

I'm still trying to give my users the access they want without  
"giving away the store".  They want to be able to create temporary  
tables in a specified database.  I created a test role and a test  
database.  The database has two tables.  I gave a test user temporary  
access to the test database.  From another terminal session, I logged  
into the database as that user and created a table.  The table  
creation went fine, but the table that was created remained after I  
logged out.  It was still there what I logged back in.  How do you  
make a user that can only create temporary tables?

If a user has the ability to make temporary tables, must I grant them  
the "reference" privileges if they want to link their temporary  
tables with live tables in the database.  I really don't understand  
this capability.  It seems to me that if a role has temporary ability  
to create tables that should include the temporary ability to create  
non-persistent keys and indices on permanent tables.

This user who has read the documentation also thinks he needs create  
privileges.  If I create a schema called temp and grant him access to  
it, he shouldn't need create should he?

Thank you for your time and interest,

Carol

Re: Privileges & roles

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Carol Walter  writes:
> How do you make a user that can only create temporary tables?

Well, you grant them TEMP privilege on the database, and you revoke
everything else.  I suspect the key bit you're missing is to revoke
public CREATE privilege on the "public" schema.

			regards, tom lane
FAQ