psql: fix \l display for pre-v15 databases.
authorTom Lane <[email protected]>
Fri, 15 Apr 2022 22:31:01 +0000 (18:31 -0400)
committerTom Lane <[email protected]>
Fri, 15 Apr 2022 22:31:01 +0000 (18:31 -0400)
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/[email protected]

src/bin/psql/describe.c

index 839f1add900ef17926958338e141d43e17b48ce5..583817b0cc696920b4dcf50bf3e2e64bb88f845a 100644 (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"));