X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EE7689FB1CC for ; Thu, 6 Jul 2006 04:06:13 -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 96585-08 for ; Thu, 6 Jul 2006 04:06:09 -0300 (ADT) X-Greylist: delayed 00:27:12.097304 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 643F79FA603 for ; Thu, 6 Jul 2006 04:06:09 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from blaster.systems.pipex.net (blaster.systems.pipex.net [62.241.163.7]) by svr4.postgresql.org (Postfix) with ESMTP id 08E505AF06E for ; Thu, 6 Jul 2006 06:38:55 +0000 (GMT) Received: from flange.edesix.com (81-86-64-114.dsl.pipex.com [81.86.64.114]) by blaster.systems.pipex.net (Postfix) with ESMTP id 8817BE00019A for ; Thu, 6 Jul 2006 07:38:52 +0100 (BST) Received: from host81-153-244-222.range81-153.btcentralplus.com ([81.153.244.222] helo=[192.168.101.208]) by flange.edesix.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1FyNVk-0005yL-2F for pgsql-admin@postgresql.org; Thu, 06 Jul 2006 07:38:52 +0100 Message-ID: <44ACB001.2000504@edesix.com> Date: Thu, 06 Jul 2006 07:38:57 +0100 From: Robin Iddon User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 Cc: pgsql-admin@postgresql.org Subject: Re: %psql help References: <44ABF47E.7000605@inegi.gob.mx> In-Reply-To: <44ABF47E.7000605@inegi.gob.mx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/32 X-Sequence-Number: 22278 Check out the GRANT nd REVOKE commands: http://www.postgresql.org/docs/8.1/static/sql-grant.html http://www.postgresql.org/docs/8.1/static/sql-revoke.html You may want to do some revoking of PUBLIC rights followed by some granting of rights to specific users on specific databases. But, I don't think that the psql \c command allows you to bypass pg_hba configuration, so I wonder if your pg_hba.conf file is broken - have you tried psql ? I am pretty sure that there is little or no difference between: psql and \c Cheers, Robin KyLiE wrote: > Hi all, I'm quiet new in this stuff, I have N psql users and N > databases, each user has a database and can connect to it using his > psql account, however I don't want to allow that some user access to > another database that does not belong to him. I've modify my > pg_hba.conf file, and allow the access to the databases acording to > his owner, but once the user has connected to the DB it can change the > connection to another using this command : \c db1 user2, so my > question is, can I revoke commands?? or can I configure it per user?? > or something??