X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8624D9FA5C3 for ; Tue, 4 Jul 2006 11:52:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 11521-03 for ; Tue, 4 Jul 2006 11:51:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31807.mail.mud.yahoo.com (web31807.mail.mud.yahoo.com [68.142.207.70]) by postgresql.org (Postfix) with SMTP id 365EF9FA2F3 for ; Tue, 4 Jul 2006 11:51:54 -0300 (ADT) Received: (qmail 34427 invoked by uid 60001); 4 Jul 2006 14:51:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=xsL5+Ixvl9zuohIHpn90cUMoXg2ZI5AgqMpyy+bHzorRuWZAMFmp1XgfBZ9B+SZcZo3VS2ZNViyCSoh8E7uyg+wV4DtiHEipwE7F3ss9q33KTIpY5clEuMoa+h7fToeQXBLXwVTy9dhJTVMH6w/XRpbBVeTP5hNhBAC8nPYMIuQ= ; Message-ID: <20060704145152.34425.qmail@web31807.mail.mud.yahoo.com> Received: from [24.54.196.198] by web31807.mail.mud.yahoo.com via HTTP; Tue, 04 Jul 2006 07:51:52 PDT Date: Tue, 4 Jul 2006 07:51:52 -0700 (PDT) From: Richard Broersma Jr Subject: Re: i have a problem of privilages To: MJ Santhosh , "Penchalaiah P." Cc: pgsql-sql@postgresql.org In-Reply-To: <224a3e7e0607040531t33821d87t7d21920637417bf5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/38 X-Sequence-Number: 25612 > 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 ; > 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. 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.