Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A10389FB7CF for ; Thu, 11 Oct 2007 15:33:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18650-04 for ; Thu, 11 Oct 2007 15:33:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from web56413.mail.re3.yahoo.com (web56413.mail.re3.yahoo.com [216.252.111.92]) by postgresql.org (Postfix) with SMTP id 6E7989FB354 for ; Thu, 11 Oct 2007 15:33:30 -0300 (ADT) Received: (qmail 19126 invoked by uid 60001); 11 Oct 2007 18:33:24 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=FpcYi6YxcU3pawwX/XkydxmCTZKBQND0N4HYvyB6kB4ea1UbOXprNK14E5s9Pzlz+3+SRJ7Af1Bojcz4qN/Vvv7dfNbokEYtpdLpck60ff1D1qSDsuWPSecK+O4uAF2ZXVBbcVmy8gDPO3xNzyNRWUC6BbJbnMm3yfs7dWVIhn4=; X-YMail-OSG: iG8e1g8VM1nA0sJVQLvF_kgBml2WFLq3lhDXufI9h329dQDTlK4RxtW4zhs4VIoXLAsKMg9Ej0IhgZnYcBg5pAT3KBl1Bl_ZsZWGv7q4RG18SwJq7fEG7cQII0MCAEBy6kYFZt6VWxWO2wWOH3QjqRe8sQ-- Received: from [198.119.134.32] by web56413.mail.re3.yahoo.com via HTTP; Thu, 11 Oct 2007 11:33:24 PDT Date: Thu, 11 Oct 2007 11:33:24 -0700 (PDT) From: Jessica Richard Subject: how to create an user with ONLY select permission and nothing else? To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1283084068-1192127604=:18517" Content-Transfer-Encoding: 8bit Message-ID: <320881.18517.qm@web56413.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/100 X-Sequence-Number: 27014 --0-1283084068-1192127604=:18517 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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! --0-1283084068-1192127604=:18517 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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! --0-1283084068-1192127604=:18517--