psql: fix \l display for pre-v15 databases.

With a pre-v15 server, show NULL for the "ICU Locale" column,
matching what you see in v15 when the database locale isn't ICU.
The previous coding incorrectly repeated datcollate here.

(There's an unfinished discussion about whether to consolidate
these columns in \l output, but in any case we'd want this fix
for \l+ output.)

Euler Taveira, per report from Christoph Berg

Discussion: https://postgr.es/m/YlmIFCqu+TZSW4rB@msg.df7cb.de
This commit is contained in:
Tom Lane 2022-04-15 18:31:01 -04:00
parent 6fea65508a
commit 7129a9791e

View File

@ -904,7 +904,7 @@ listAllDbs(const char *pattern, bool verbose)
gettext_noop("Locale Provider"));
else
appendPQExpBuffer(&buf,
" d.datcollate as \"%s\",\n"
" NULL as \"%s\",\n"
" 'libc' AS \"%s\",\n",
gettext_noop("ICU Locale"),
gettext_noop("Locale Provider"));