Re: user restriction

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: user restriction
Date: 2007-06-01 07:56:49
Message-ID: 20070601075648.GB27968@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 01, 2007 at 11:15:30AM +0530, Ashish Karalkar wrote:
> Hi All,
>
> I want to create a user in Postgres Database. And I want to restrict
> that user with some privileges. And also I want that user should be
> specific to particular database.
>
> He should not be able to do the following
>
> 1) Connect to any other database.
>
> 2) Connect to System database (like Postgres).

Setup the pg_hba so that s/he can only connect to the database you
list. If it's applicable to you, you can also set it up so users can
only connect to the database with the same name as their username
(sameuser option).

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Anton 2007-06-01 08:35:10 Re: how to use array with "holes" ?
Previous Message Martijn van Oosterhout 2007-06-01 07:36:04 Re: Numeric performances