pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: DROP OWNED BY fails to clean out pg_init_privs grants
Date: Tue, 30 Apr 2024 00:10:02 -0400
Message-ID: <1562011.1714450202@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwajB+mm5zK9JGzqoGdZmm+1D5PWoqcd83Rs2g3Dn9b9=g@mail.gmail.com>
References: <1745535.1712358659@sss.pgh.pa.us>
<78CCD91B-99DC-4B0F-B65E-AD46E67CBC0B@yesql.se>
<2857513.1713733688@sss.pgh.pa.us>
<F27F3F6F-A052-4EEF-9A11-3D10A867843F@yesql.se>
<32556.1714165429@sss.pgh.pa.us>
<378162.1714257933@sss.pgh.pa.us>
<772627.1714330360@sss.pgh.pa.us>
<33E80863-5516-45A1-93D1-00F1A166EC7C@yesql.se>
<1372432.1714418108@sss.pgh.pa.us>
<CAKFQuwajB+mm5zK9JGzqoGdZmm+1D5PWoqcd83Rs2g3Dn9b9=g@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> My solution to this was to rely on the fact that the bootstrap superuser is
> assigned OID 10 regardless of its name.
Yeah, I wrote it that way to start with too, but reconsidered
because
(1) I don't like hard-coding numeric OIDs. We can avoid that in C
code but it's harder to do in SQL.
(2) It's not clear to me that this test couldn't be run by a
non-bootstrap superuser. I think "current_user" is actually
the correct thing for the role executing the test.
regards, tom lane
view thread (53+ messages) latest in thread
Message-ID: <1562011.1714450202@sss.pgh.pa.us> Permalink: ../1562011.1714450202@sss.pgh.pa.us/ Also on: postgresql.org/message-id/1562011.1714450202@sss.pgh.pa.us ·
reply
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-hackers@postgresql.org Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, daniel@yesql.se, sfrost@snowman.net, andres@anarazel.de Subject: Re: DROP OWNED BY fails to clean out pg_init_privs grants In-Reply-To: <1562011.1714450202@sss.pgh.pa.us> References: <1745535.1712358659@sss.pgh.pa.us> <78CCD91B-99DC-4B0F-B65E-AD46E67CBC0B@yesql.se> <2857513.1713733688@sss.pgh.pa.us> <F27F3F6F-A052-4EEF-9A11-3D10A867843F@yesql.se> <32556.1714165429@sss.pgh.pa.us> <378162.1714257933@sss.pgh.pa.us> <772627.1714330360@sss.pgh.pa.us> <33E80863-5516-45A1-93D1-00F1A166EC7C@yesql.se> <1372432.1714418108@sss.pgh.pa.us> <CAKFQuwajB+mm5zK9JGzqoGdZmm+1D5PWoqcd83Rs2g3Dn9b9=g@mail.gmail.com> <1562011.1714450202@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