Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtEGp-000288-Mt for pgsql-sql@arkaria.postgresql.org; Wed, 08 Jul 2020 17:54:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtEGo-0001Sd-C9 for pgsql-sql@arkaria.postgresql.org; Wed, 08 Jul 2020 17:54:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtEGo-0001SW-5g for pgsql-sql@lists.postgresql.org; Wed, 08 Jul 2020 17:54:10 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtEGi-0001Iw-0X for pgsql-sql@postgresql.org; Wed, 08 Jul 2020 17:54:09 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id B3B185F79F; Wed, 8 Jul 2020 13:54:02 -0400 (EDT) Date: Wed, 8 Jul 2020 13:54:02 -0400 From: Stephen Frost To: Gaurav Tomar Cc: pgsql-sql@postgresql.org Subject: Re: Role information table name Message-ID: <20200708175402.GL3125@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="J+UeKfBGib79GnN+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --J+UeKfBGib79GnN+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Gaurav Tomar (gauravtomar14@gmail.com) wrote: > Simple question -- in which table postgres store the role > privilege information. >=20 > CREATE ROLE postgres WITH > LOGIN > SUPERUSER > INHERIT > CREATEDB > CREATEROLE > REPLICATION; >=20 > in which table I can find the above information. While this is in pg_authid, if that's all the info you want to find out, you should probably be getting it from pg_roles (which is a view over pg_authid), since you need to be GRANT'd access to pg_authid unless you're a superuser. Thanks, Stephen --J+UeKfBGib79GnN+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJfBgg6AAoJEO1sijiDR2RVO5IQAKz5sgVho6DJLgh9eBpywOn0 KBmMAUv8gxhAe4uyqTfV4/q0SGsLQgvbwvls4wMW8YAdDd27k3335+aYhMmi1QOE E3E57/Y9SM8DJ2Lu6o/V7clt9J0BBV7HPGRGZoqZtDK+atSxZ3ZL4+3M0LhAwZ6k Cl02bX81C6+025nNbsh43aao6F/1OEDgSlOa7zIAWFtKQn9ozKZgBJ0H3ECCB1KV Jc6ngkLUB4zEf8Tf8oe+JSkrjoINIys14l5+TBZCoHatecfOhtBAgz3eLchM0SVD BTu/iIxhivBwBYTSSo9Bw3Cog3UG+/ZdQ7hjhJSose+bV+g30QTnKwUaOPY/gpFi 13ptPHiSfiGenGfRKj0O0UZ7JBrDGPFyUS1V/qv6O2JRtfWNEmKjif33VaRZSdlS f5cyKLvfhl9LPkpZl3UiEhpjr2md1bkUthC2Cmhclna6eAR/vm+CUhUq6diNAkvO hBV577EYM72X3gTsMxJQ4lXbtkpEuxQXHTlsnCbCZiV2d9hPU6+C9NFGDOpUwPQo XYBeWsin5sLhzO/vL8EziHXUtbJhpX/bFf0t8iJJeQnlDanp2xytmF7xcBdVXAZe /A9t3mJuRj0EBS3fjzQkNDckUnsjtlnGAmkDE3lzQrVmne3jqM7Ik7OLudTUaARf D91QP5dGoHQn7HkZ9piP =C6kr -----END PGP SIGNATURE----- --J+UeKfBGib79GnN+--