Re: Revoke Connect Privilege from Database not working

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "Ing(dot) Marijo Kristo" <marijo(dot)kristo(at)icloud(dot)com>, PostgreSQL Bug List <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Revoke Connect Privilege from Database not working
Date: 2026-01-20 23:05:41
Message-ID: 1933586.1768950341@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-sql

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> This is admittedly a half-formed idea, but perhaps we could have whatever's
> specified in GRANTED BY override select_best_grantor(), like in the
> attached patch. I've no idea if this is the intention of the standard, but
> it should at least address the reported issue. FWIW I recently received an
> independent report about the same thing.

Motivated by the discussion at [1], I'd started on the same idea,
but arrived at a rather different refactorization. I think this
way is nicer (less duplicated logic). Either way, we need to
address the docs and probably add more regression tests.

regards, tom lane

[1] https://www.postgresql.org/message-id/flat/85cd06c6-7b2e-483e-b05d-d5ff87b0168d%40garret.ru

Attachment Content-Type Size
v2-0001-GRANTED-BY.patch text/x-diff 8.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2026-01-21 06:53:11 BUG #19385: Normal SELECT generates an ineffecifient query plan compare to the prepared SELECT.
Previous Message Tom Lane 2026-01-20 18:00:56 Re: BUG #19380: Transition table in AFTER INSERT trigger misses rows from MERGE when used with INSERT in a CTE

Browse pgsql-sql by date

  From Date Subject
Next Message Nathan Bossart 2026-01-21 15:28:53 Re: Revoke Connect Privilege from Database not working
Previous Message Nathan Bossart 2025-11-13 16:47:14 Re:   Re: Re: Revoke Connect Privilege from Database not working