how to create an user with ONLY select permission and nothing else?

From: Jessica Richard <rjessil(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: how to create an user with ONLY select permission and nothing else?
Date: 2007-10-11 18:33:24
Message-ID: 320881.18517.qm@web56413.mail.re3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I created a test user with the following command:

$ createuser test
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE

This user at the moment does not have permission to look at any existing tables, but it can create a table:

$ psql -Utest -d postgres
Password for user test:

postgres=> create table test(x int);
CREATE TABLE

Two questions:

1. How do I create a user with ONLY select permission but nothing else (not even creating any new tables)?

2. How do I check to see what permissions a particular user currently has?

I know that \z tablename can show who has what permissions on a table, but it does not tell if a user has "create table" permission or not.

Thanks,
Jessica


---------------------------------
Shape Yahoo! in your own image. Join our Network Research Panel today!

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Kempter 2007-10-11 18:56:10 permissions on system catalogs for non-superuser?
Previous Message Mark Steben 2007-10-11 18:21:33 postgres 8.2.4 new installation - trying to get autovacuum to work