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 1oYgeg-0002fd-G9 for pgsql-general@arkaria.postgresql.org; Thu, 15 Sep 2022 04:39:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYged-0002FH-7Q for pgsql-general@arkaria.postgresql.org; Thu, 15 Sep 2022 04:39:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYgec-0002D0-P6 for pgsql-general@lists.postgresql.org; Thu, 15 Sep 2022 04:39:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYgeT-0006uw-Bs for pgsql-general@lists.postgresql.org; Thu, 15 Sep 2022 04:39:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 28F4cwg63120831; Thu, 15 Sep 2022 00:38:58 -0400 From: Tom Lane To: Bryn Llewellyn cc: Mladen Gogala , pgsql-general list Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role? In-reply-to: References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com> <2bc1d63b-5376-bd25-4592-d86b77e4a4b8@gmail.com> Comments: In-reply-to Bryn Llewellyn message dated "Wed, 14 Sep 2022 21:07:09 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3120829.1663216738.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 15 Sep 2022 00:38:58 -0400 Message-ID: <3120830.1663216738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryn Llewellyn writes: > I just confirmed that, if it suits me, I can revoke "execute" from "publ= ic" on all overloads of the humble length() function. Maybe I should refer= to it as "pg_catalog.length()" to emphasize another point that had escape= d me. Yup. For even more fun, try revoking privileges on a function that underlies an operator. regression=3D# revoke execute on function int4pl from public; REVOKE regression=3D# select 2+2; -- still works, for a superuser ?column? = ---------- 4 (1 row) regression=3D# create user joe; CREATE ROLE regression=3D# \c - joe You are now connected to database "regression" as user "joe". regression=3D> select 2+2; -- not so much for anybody else ERROR: permission denied for function int4pl regards, tom lane