pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yves Jacolin <yves.jacolin@camptocamp.com>
To: pgsql-admin@postgresql.org
To: KhunSanAung.GIS@gmail.com
Subject: Re: How to assign multiple-users to a Postgres database?
Date: Mon, 06 Jul 2015 13:27:24 +0200
Message-ID: <9642342.zDFveqarPE@tatras> (raw)
In-Reply-To: <CAAQr1javZp6_RE_u6pot==9WRReM9QJu2zmiF0ZwaYVwitfnow@mail.gmail.com>
References: <CAAQr1javZp6_RE_u6pot==9WRReM9QJu2zmiF0ZwaYVwitfnow@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Monday, July 06, 2015 16:56:59 KhunSanAung wrote:
> Hi All,
> 
> I'm using Postgres database, and using the postGIS extensions for storing
> spatial datasets.
> 
> I can create a user and a database.
> Currently I can assign one user as owner per one database and can login
> with pgAdminIII for administrating task.
> 
> I'd like to allow more than one user to edit the data.
> Is it possible to create multiple users for a database?
> How can I do it?
> 
> Thank you very much for any help.
Hello,

A short answer: you should create a ROLE for each user and give some grant 
access to the database (and probably to Scheme and Table):

The GRANT synopsis is:

GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
    ON DATABASE database_name [, ...]
    TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]

So, one example could be:

GRANT CONNECT ON DATABASE mydb TO yjacolin;

Regards,

Yves
-- 
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel (France) : +33 4 58 48 20 43 (new !)
Tel (Suisse) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81
Mail : yves.jacolin@camptocamp.com
http://www.camptocamp.com


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)

Message-ID: <9642342.zDFveqarPE@tatras>
Permalink:  ../9642342.zDFveqarPE@tatras/
Also on:    postgresql.org/message-id/9642342.zDFveqarPE@tatras

 · 

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-admin@postgresql.org
  Cc: yves.jacolin@camptocamp.com, KhunSanAung.GIS@gmail.com
  Subject: Re: How to assign multiple-users to a Postgres database?
  In-Reply-To: <9642342.zDFveqarPE@tatras>

* 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