Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 070481337EEB for ; Thu, 14 Oct 2010 04:34:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 13170-03 for ; Thu, 14 Oct 2010 07:32:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from esri3.esri.com (esrismtp2.esri.com [198.102.62.103]) by mail.postgresql.org (Postfix) with ESMTP id 927EE1337CAD for ; Wed, 13 Oct 2010 17:21:21 -0300 (ADT) Received: from redmx2.esri.com (redmx2.esri.com [10.49.4.18]) by esri3.esri.com (8.11.7p3+Sun/8.11.7) with ESMTP id o9DKLHw09541; Wed, 13 Oct 2010 13:21:17 -0700 (PDT) Received: from redmx2.esri.com ([10.49.4.18]) by redmx2.esri.com ([10.49.4.18]) with mapi; Wed, 13 Oct 2010 13:21:16 -0700 From: Kasia Tuszynska To: Guillaume Lelarge CC: pgsql-admin Date: Wed, 13 Oct 2010 13:21:15 -0700 Subject: Re: two questions about pg 9.0 Thread-Topic: [ADMIN] two questions about pg 9.0 Thread-Index: ActqN0CCe8llRSpORC2eihYQWauQhgA0HQbQ Message-ID: <232B5217AD58584C87019E8933556D1102199CC548@redmx2.esri.com> References: <1508171717.69491.1286831195955.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net> <7815.1286839244@sss.pgh.pa.us> <232B5217AD58584C87019E8933556D1102198CA98C@redmx2.esri.com> <4CB4A1F9.60408@lelarge.info> In-Reply-To: <4CB4A1F9.60408@lelarge.info> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/114 X-Sequence-Number: 35855 Hi Guillaume, Thanks for your reply I did a bit more testing with the superuser priv issu= e, and now I came to the conclusion that pgAdminIII may be doing something = silly. I created a user: bob In pgAdminIII I checked off the box for: can inherit from parent role, can = create db object, superuser Got the following sql:=20 CREATE ROLE bob LOGIN ENCRYPTED PASSWORD 'md51e9484aace238e7cb2609130fd87646e' SUPERUSER INHERIT CREATEDB NOCREATEROLE; UPDATE pg_authid SET rolcapupdate=3Dfalse WHERE rolname=3D'bob'; Than I created bobb In pgAdminIII I checked off the box for: can inherit from parent role, can = create db object, superuser, Can modify catalog directly Got the following sql:=20 CREATE ROLE bobb LOGIN ENCRYPTED PASSWORD 'md51e9484aace238e7cb2609130fd87646e' SUPERUSER INHERIT CREATEDB NOCREATEROLE; Conclusion: Sql level superuser =3D pgAdminIII superuser + can modify catalog directly This is misleading, I would call it a pgAdminIII bug but who knows maybe it= is a feature... Sincerely, Kasia=20 -----Original Message----- From: Guillaume Lelarge [mailto:guillaume@lelarge.info]=20 Sent: Tuesday, October 12, 2010 10:59 AM To: Kasia Tuszynska Cc: pgsql-admin Subject: Re: [ADMIN] two questions about pg 9.0 Hi, Le 12/10/2010 19:25, Kasia Tuszynska a =E9crit : > [...] > 1. Permissions: > When I create a login role with superuser privileges in pgAdminIII I have= the option of indicating that the superuser will also have the permission = to: "can modify catalog directly", when I look at the sql that is generated= by that gui, I do not see a corresponding sql permission, I see: > "CREATE ROLE kasia LOGIN ENCRYPTED PASSWORD 'md5ff0508b7bb33909c096d1b447= a17d09b' > SUPERUSER VALID UNTIL 'infinity';" > A. What does "can modify catalog directly" actually do? I looked it up an= d I found : "This option determines whether the role can modify system cata= log directly or not." But that really does not tell me much. Yeah, we kinda suck at documenting things :) It refers to the rolcatupdate column in the pg_authid system table. Which is a permission to update the system catalogs (system tables). > B. Why is there no sql level equivalent? When I revoke the "can modify ca= talog directly" permission I get the following sql: UPDATE pg_authid SET r= olcatupdate=3Dfalse WHERE OID=3D17331::oid;=20 You create a superuser, which already has this capacity. So we don't need to add something else. Of course, if you uncheck it, we'll have to update the system table to set it to false. --=20 Guillaume http://www.postgresql.fr http://dalibo.com