Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 554102E1374 for ; Fri, 8 Feb 2008 09:05:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43537-01-10 for ; Fri, 8 Feb 2008 09:04:56 -0400 (AST) Received: from Citrus.usj.edu.lb (rectorat2.usj.edu.lb [193.227.187.140]) by postgresql.org (Postfix) with ESMTP id D6B592E22F5 for ; Fri, 8 Feb 2008 09:04:50 -0400 (AST) Received: from pascolo ([192.168.100.239]) by Citrus.usj.edu.lb (8.13.1/8.13.1) with ESMTP id m18CoZOl023674 for ; Fri, 8 Feb 2008 14:50:36 +0200 Message-Id: <200802081250.m18CoZOl023674@Citrus.usj.edu.lb> Reply-To: From: "Pascal Tufenkji" To: Subject: Postgres roles Date: Fri, 8 Feb 2008 15:02:38 +0200 Organization: USJ MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E4_01C86A63.A5C1D7B0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: <00a401c86a43$f88de120$3102a8c0@dream> Thread-Index: AchqQjWee6jgpscXTK+nPPu6Gj/fDwADYxpg X-USJ-MailScanner-Information: Please contact the ISP for more information X-USJ-MailScanner: Found to be clean X-USJ-MailScanner-From: ptufenkji@usj.edu.lb X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/60 X-Sequence-Number: 30151 This is a multi-part message in MIME format. ------=_NextPart_000_00E4_01C86A63.A5C1D7B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'd like to ask you a question about users, groups and roles. In older versions of Postgres we had users and groups as two separate entities Our IT department at work is called "sti", that's why: - I had a user "sti" (the username of our IT manager) - I had a group "sti" (the group containing all the users of our department: user1, user2.) When we upgraded to PostgreSQL 8.2.4, came up the concept of roles; users and groups became one entity So now I have in my database, only one role, called "sti" My questions are: 1. how do I identify the users assigned to this role : (in the older version) SELECT grolist from pg_group where groname = 'sti'; 2. how do I differ granting permissions on a table to the user sti from the whole members of the group sti (in the older version) GRANT SELECT ON table TO group sti; GRANT SELECT,INSERT,UPDATE,DELETE ON table TO sti; I'd appreciate any help regarding this issue Pascal Tufenkji ------=_NextPart_000_00E4_01C86A63.A5C1D7B0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

I’d like to ask you a question about users, = groups and roles.

 

In older versions of Postgres we had users and = groups as two separate entities

Our IT department at work is called = “sti”, that’s why:

-         I = had a user “sti” (the username of our IT manager)

-         I = had a group “sti” (the group containing all the users of our department: user1, = user2…)

 

When we upgraded to PostgreSQL 8.2.4, came up the = concept of roles; users and groups became one entity

So now I have in my database, only one role, called = “sti”

 

My questions are:

 

1.      = how do I identify the users assigned to this role :
(in the older version)
SELECT grolist from pg_group where = groname =3D 'sti';

 

2.      = how do I differ granting permissions on a table to the user = sti from the whole members of the group sti
(in the older version)
GRANT SELECT ON table TO group = sti;
GRANT SELECT,INSERT,UPDATE,DELETE ON table TO sti;


 

I’d appreciate any help regarding this = issue

 

Pascal Tufenkji

------=_NextPart_000_00E4_01C86A63.A5C1D7B0--