On 2026-May-21, Peter Smith wrote:
> I think Nisha was correct about adding a PG15 version check. It was an
> accidental omission in my first patch. Even if PG14 is EOL-ed by the
> time this change is released, it is trivial to keep the psql \dRp+
> command behaving as-is rather than crashing due to an internal SQL
> error. So, I prefer to err on the side of caution and add the version
> check for now; a committer can remove it if they deem it unnecessary.
They shouldn't; the Notes subsection in the psql reference page says
<para><application>psql</application> works best with servers of the same
or an older major version. Backslash commands are particularly likely
to fail if the server is of a newer version than
<application>psql</application>
itself. However, backslash commands of the <literal>\d</literal> family
should
work with servers of versions back to 9.2, though not necessarily with
servers newer than <application>psql</application> itself. The general
functionality of running SQL commands and displaying query results
should also work with servers of a newer major version, but this cannot
be guaranteed in all cases.
</para>
so the version check is definitely needed.
Thanks
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"In fact, the basic problem with Perl 5's subroutines is that they're not
crufty enough, so the cruft leaks out into user-defined code instead, by
the Conservation of Cruft Principle." (Larry Wall, Apocalypse 6)