Re: Is it possible to stop sessions killing eachother when they all authorize as the same role? - Mailing list pgsql-general

From Tom Lane
Subject Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
Date
Msg-id 3120830.1663216738@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-general
Bryn Llewellyn <bryn@yugabyte.com> writes:
> I just confirmed that, if it suits me, I can revoke "execute" from "public" on all overloads of the humble length()
function.Maybe I should refer to it as "pg_catalog.length()" to emphasize another point that had escaped me. 

Yup.  For even more fun, try revoking privileges on a function that
underlies an operator.

regression=# revoke execute on function int4pl from public;
REVOKE
regression=# select 2+2;  -- still works, for a superuser
 ?column?
----------
        4
(1 row)

regression=# create user joe;
CREATE ROLE
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=> select 2+2;  -- not so much for anybody else
ERROR:  permission denied for function int4pl

            regards, tom lane



pgsql-general by date:

Previous
From: misha1966 misha1966
Date:
Subject: Re[2]: CVE-2022-2625
Next
From: Matthias Apitz
Date:
Subject: Re: Mysterious performance degradation in exceptional cases