From: Robin Iddon <robin@edesix.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: %psql help
Date: Thu, 06 Jul 2006 07:38:57 +0100
Message-ID: <44ACB001.2000504@edesix.com> (raw)
In-Reply-To: <44ABF47E.7000605@inegi.gob.mx>
References: <44ABF47E.7000605@inegi.gob.mx>
Check out the GRANT nd REVOKE commands:
http://www.postgresql.org/docs/8.1/static/sql-grant.htmlhttp://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 <db1> <user2>? I am pretty sure that there is little or no
difference between:
psql <db1> <user2>
and
\c <db1> <user2>
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??
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: robin@edesix.com
Subject: Re: %psql help
In-Reply-To: <44ACB001.2000504@edesix.com>
References: <44ABF47E.7000605@inegi.gob.mx> <44ACB001.2000504@edesix.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