Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZC4as-0006wx-QY for pgsql-admin@arkaria.postgresql.org; Mon, 06 Jul 2015 11:29:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZC4aq-0002IF-AF for pgsql-admin@arkaria.postgresql.org; Mon, 06 Jul 2015 11:29:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZC4Yd-0000TD-EB for pgsql-admin@postgresql.org; Mon, 06 Jul 2015 11:27:31 +0000 Received: from mail-wg0-f51.google.com ([74.125.82.51]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZC4YZ-0005cs-Re for pgsql-admin@postgresql.org; Mon, 06 Jul 2015 11:27:30 +0000 Received: by wgck11 with SMTP id k11so137445276wgc.0 for ; Mon, 06 Jul 2015 04:27:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=1s1rRovMkOJDNhqXvg9/qsD4MZE3OEjN6B+z/KN4NbE=; b=YMaWZZ9o+cEXdM3YGO/5CtliQLEqpmO6GS7EpV75aRFLVfjXrE9mRqP/0ZazsxURtU IeLTiQ17eLQn5hAivAzoT5lg9YH2lxc161PacjERTfq2QTtRhhmeOqabl8GKA13Il+Fx VkqypmObduGZ2kE1YUGcb2nU5BCKcMqw027TsAbjfB5mtdvw6wtzc+Z1H5RVsalTpNdy nboyecKZdkP+2ZmqyvXZ7u3/Lm+qE7PFR/babA7DxjrpfxkGPJw6unT+Zvy6y3qcFrbx 37a8cINrkxRnekgr1wTJzeTy5HhGhjtM6ASBeU3kqn5LD9d6Uc4xMpAPnorpVTLgHd2G EvwQ== X-Gm-Message-State: ALoCoQnAv12+Avw/HS4IT4rJCU+ylasV+vwVFmkz+2lw84TxryHNCTbyCJE62gjor03oh7e5cnU+ X-Received: by 10.180.75.4 with SMTP id y4mr52323117wiv.1.1436182046224; Mon, 06 Jul 2015 04:27:26 -0700 (PDT) Received: from tatras.localnet ([81.18.187.187]) by mx.google.com with ESMTPSA id lk5sm28070849wic.24.2015.07.06.04.27.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 04:27:25 -0700 (PDT) From: Yves Jacolin To: pgsql-admin@postgresql.org, 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> Organization: Camptocamp User-Agent: KMail/4.13.3 (Linux/3.13.0-55-generic; KDE/4.13.3; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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