Re: *** Newbie Question About PostgreSQL ***

From: will trillich <will(at)serensoft(dot)com>
To: debian-user(at)lists(dot)debian(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: *** Newbie Question About PostgreSQL ***
Date: 2001-05-30 17:29:41
Message-ID: 20010530122941.G2454@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 29, 2001 at 07:49:46PM -0400, Arcadio A. Sincero Jr. wrote:
> Hello list,

wrong list. try pgsql-general(at)postgresql(dot)org instead.

> I'd like to set up Postgresql so that users can have "read-only" access to a
> database. Right now, I only know how to set it so a user can have all or
> nothing access by adding something like the following in the pg_hba.conf
> file:
>
> local mydb crypt users.mydb
>
> And put the names of all the users I want to allow access to the "mydb"
> database into the users.mydb file. But like I said, this only allows all or
> nothing access to the database. A user can still do a CREATE TABLE and add
> additional tables to the database. Is there anyway to have it so a user can
> only do SELECTs? Thanks.

according to /usr/share/doc/postgresql-doc/html/user/sql-grant.htm
(apt-get install postgresql-doc) the objects you can grant and
revoke priviliges from tables, but not databases.

you can specity 'public' meaning "everyone at large that's not
specifically mentioned in a contrary access rule" but it looks
like you'll need to iterate for each table you've got.

unless i'm wrong, of course.

--
DEBIAN NEWBIE TIP #31 from Will Trillich <will(at)serensoft(dot)com>
:
Ever wonder why Debian stable seems out-of-date? It's because
it's STABLE! When enough testing shows a release to be worthy
of the "stable" name, it's frozen -- nothing new can be added
to it. Gizmo 57.3 might come out the next day, but it won't
show up in the stable release. If you want to be on the
bleeding edge, try "testing" or "unstable". If you want solid
dependability, stick with "stable" and use tried-and-true
packages instead of the newfangled ones that might break.

Also see http://newbieDoc.sourceForge.net/ ...

Browse pgsql-general by date

  From Date Subject
Next Message Tim Barnard 2001-05-30 17:30:48 Re: Things are terribly quiet
Previous Message Tom Lane 2001-05-30 17:00:02 Re: Re: [GENERAL] Patch for PGACCESS