pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Privileges & roles
2+ messages / 2 participants
[nested] [flat]

* Privileges & roles
@ 2008-07-29 15:47  Carol Walter <walterc@indiana.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: Carol Walter @ 2008-07-29 15:47 UTC (permalink / raw)
  To: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Privileges & roles
@ 2008-07-29 19:08  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Carol Walter <walterc@indiana.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2008-07-29 19:08 UTC (permalink / raw)
  To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin

Carol Walter <walterc@indiana.edu> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-07-29 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-29 15:47 Privileges & roles Carol Walter <walterc@indiana.edu>
2008-07-29 19:08 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox