Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP6Dr-004RgI-0U for pgsql-general@arkaria.postgresql.org; Fri, 28 Nov 2025 21:41:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vP6Do-00DiPm-1t for pgsql-general@arkaria.postgresql.org; Fri, 28 Nov 2025 21:41:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP6Do-00DiPe-0o for pgsql-general@lists.postgresql.org; Fri, 28 Nov 2025 21:41:44 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP6Dl-0023S3-37 for pgsql-general@lists.postgresql.org; Fri, 28 Nov 2025 21:41:43 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 35BE79F2E3; Fri, 28 Nov 2025 22:41:40 +0100 (CET) Date: Fri, 28 Nov 2025 22:41:40 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: set role command Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <176402341688.7.8547269556353940402.1025478372@georgiou.vip> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pnflvjlsa3nl5y4z" Content-Disposition: inline In-Reply-To: <176402341688.7.8547269556353940402.1025478372@georgiou.vip> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --pnflvjlsa3nl5y4z Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: set role command MIME-Version: 1.0 On 2025-11-24 17:30:14 -0500, pg254kl@georgiou.vip wrote: > Just because you did set role does not mean you lost your superuser privi= leges, > it's correct behavior. >=20 > If you want to impersonate in a permissions sandbox it's easy: >=20 > create role usera_sandbox in group usera; > \c - usera_sandbox But that just disconnects and reconnects as the new user. So you have to be able to authenticate as that user. hjp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --pnflvjlsa3nl5y4z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmkqFw0ACgkQ8g5IURL+ KF2nCA//TQj1l08RUAtqwgD9XpirThucTz8Czg3V23lN/hOA8V0oXWVscI9VhLv4 mnHaXohUVzhGWmZ61RyLiAapLKBeR7FgXs+3ARBcgE101Fn7W1UJCf5BdfL5dKWQ JwCNHVOB9xhFPhiPXvSRMwKUAlMd/Q68croBZ1xCcYD7+YCc6C6oCB7rYP05PAP4 8sMpvsi9+CpNaMBK2u4raFJk8gOaStqT+ajhDmiZYZI58wDwQzsbXPllCr6io4Hx bIr+yDKsHs6G4PVr+d0d5nWCO2xnZwudmNVlSaeFVVtlZGMUbmpigDcwQpwbKuO6 IL0fkiqC4VHfYhVL3xT6iEO1eP13wUnGOwo9WWmU7vdi7q+mnFrk/JLg4zi4B2SF KjX88HV/Fd/ZdshYzR469MR/6xgaZO9lA+WTS5W9YzTHcKfVuNEkpwGZUI6ZtFAt O4ZZ4oUKzFltfFejVYqRdFQOwTzMv2+Q+615E3AF9pbKoO9Mm1FiRQePIKb5Y9ZV s0gu9ZBjjh2iNnGkSGqX75BR/pzP78IPCcAuOOkRmd8cpfPors7mGDsM4tJofgAN 4kuTaikJX7RMdr0VRJME3p+iwfAdRkXHDIqFvpaKDC1fXvQ8JlIFmjLIOAfV0OWN 03n3xvA/qw/Tvn23OdVFcNyeVipVcuUO7VABr8/vcQtBQwKQWdY= =4Z8y -----END PGP SIGNATURE----- --pnflvjlsa3nl5y4z--