Re: *** Newbie Question About PostgreSQL *** - Mailing list pgsql-general

From will trillich
Subject Re: *** Newbie Question About PostgreSQL ***
Date
Msg-id 20010530122941.G2454@serensoft.com
Whole thread Raw
List pgsql-general
On Tue, May 29, 2001 at 07:49:46PM -0400, Arcadio A. Sincero Jr. wrote:
> Hello list,

wrong list. try pgsql-general@postgresql.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@serensoft.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/ ...

pgsql-general by date:

Previous
From: newsreader@mediaone.net
Date:
Subject: Re: DBD::Pg 1.00
Next
From: "Tim Barnard"
Date:
Subject: Re: Things are terribly quiet