From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: Mladen Gogala <gogala.mladen@gmail.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
Date: Thu, 15 Sep 2022 00:38:58 -0400
Message-ID: <3120830.1663216738@sss.pgh.pa.us> (raw)
In-Reply-To: <AC8B235F-3EE9-48E0-B7ED-F435931B0E62@yugabyte.com>
References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com>
<2bc1d63b-5376-bd25-4592-d86b77e4a4b8@gmail.com>
<AC8B235F-3EE9-48E0-B7ED-F435931B0E62@yugabyte.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, bryn@yugabyte.com, gogala.mladen@gmail.com
Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
In-Reply-To: <3120830.1663216738@sss.pgh.pa.us>
References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com> <2bc1d63b-5376-bd25-4592-d86b77e4a4b8@gmail.com> <AC8B235F-3EE9-48E0-B7ED-F435931B0E62@yugabyte.com> <3120830.1663216738@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox