On Thu, Apr 23, 2026 at 2:06 PM Jeff Davis <pgsql@j-davis.com> wrote:
On Thu, 2026-04-23 at 10:57 -0700, Mark Dilger wrote:
> John is right that the hardcoded BKI_ROWTYPE_OID(2173) makes this
> non-backportable as-is.

Right, but that leaves the questions:

(a) Is this the right fix for master?

Yes.  This approach has no problem in master that I can see.
 
(b) Is there anything we can do in the back branches, or we just leave
it as fix going forward only?

I don't see a solution.  We could try to replace the error message with
something better, but even that seems hard to phrase.  Replacing
"cannot read pg_class without having selected a database" with, say,
"permission denied" would also be confusing for a role which does have
the privilege but just can't verify it.

--

Mark Dilger