pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: MJ Santhosh <mjsanthosh@gmail.com>
To: Penchalaiah P. <penchalaiahp@infics.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: i have a problem of privilages
Date: Tue, 4 Jul 2006 07:51:52 -0700 (PDT)
Message-ID: <20060704145152.34425.qmail@web31807.mail.mud.yahoo.com> (raw)
In-Reply-To: <224a3e7e0607040531t33821d87t7d21920637417bf5@mail.gmail.com>

>  I am not an expert in postgres, may this work for you.
> REVOKE INSERT,UPDATE,DELETE ON ALL from PUBLIC;
> it will take the INSERT,UPDATE,DELETE permmission from all users for all
> objects in the database.
> If you want to give permission for a specific user on all objects
> GRANT ALL on ALL to <user_name>;
> Please make a backup before doing this , good for always
> I am not sure is this is want you want.
> 
> On 7/4/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
> >
> >  I have 290 tables .. to these tables one schema is there .. that name is
> > public….so I don't know how to create permission to these tables.. either I
> > have to give permissions to individual table.. or I have to give permissions
> > to schema or schema name… if I give permission to schema it has to
> > applicable to all tables..
> > I created one user  with password… then finally I don't know how to
> > allocate permission to him.. please tell me very briefly step by step.. then
> > I can understand…
> > Please tell me if any one knows about this……..

One way to limit which users can access specific database is with the pg_hba.conf file.
You really should spend some time to read it.
http://www.postgresql.org/docs/8.1/interactive/client-authentication.html#AUTH-PG-HBA-CONF

In PostgreSQL 8.1 the concept of "Roles" were added.  A "Role" can be given specific privileges to
the database.  Once this step is complete, database uses can be assigned to this role.  This will
essentially inherit all role privileges to these users.  There is also an important document that
should be read in order to understand it.
http://www.postgresql.org/docs/8.1/interactive/user-manag.html

The SQL syntax for assigning privileges is found here:
http://www.postgresql.org/docs/8.1/interactive/ddl-priv.html

Also finding these topic is very easy also. Simple scan over the table of contents of the manual:
http://www.postgresql.org/docs/8.1/interactive/index.html

And of-course depending on what version of PostgreSQL you have:
http://www.postgresql.org/docs/manuals/

Regards,

Richard Broersma Jr.



view thread (6+ messages)  latest in thread

Message-ID: <20060704145152.34425.qmail@web31807.mail.mud.yahoo.com>
Permalink:  ../20060704145152.34425.qmail@web31807.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060704145152.34425.qmail@web31807.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com, mjsanthosh@gmail.com, penchalaiahp@infics.com
  Subject: Re: i have a problem of privilages
  In-Reply-To: <20060704145152.34425.qmail@web31807.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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