Commit 359bcf77 authored by Alvaro Herrera's avatar Alvaro Herrera

psql \dX: reference regclass with "pg_catalog." prefix

Déjà vu of commit fc40ba1296a7, for another backslash command.
Strictly speaking this isn't a bug, but since all references to catalog
objects are schema-qualified, we might as well be consistent.  The
omission first appeared in commit ad600bba and replicated in
a4d75c86; backpatch to 14.

Author: Justin Pryzby <pryzbyj@telsasoft.com>
Discussion: https://postgr.es/m/20210827193151.GN26465@telsasoft.com
parent a32860b8
...@@ -4735,7 +4735,7 @@ listExtendedStats(const char *pattern) ...@@ -4735,7 +4735,7 @@ listExtendedStats(const char *pattern)
appendPQExpBuffer(&buf, appendPQExpBuffer(&buf,
"pg_catalog.format('%%s FROM %%s', \n" "pg_catalog.format('%%s FROM %%s', \n"
" pg_get_statisticsobjdef_columns(es.oid), \n" " pg_get_statisticsobjdef_columns(es.oid), \n"
" es.stxrelid::regclass) AS \"%s\"", " es.stxrelid::pg_catalog.regclass) AS \"%s\"",
gettext_noop("Definition")); gettext_noop("Definition"));
else else
appendPQExpBuffer(&buf, appendPQExpBuffer(&buf,
...@@ -4746,7 +4746,7 @@ listExtendedStats(const char *pattern) ...@@ -4746,7 +4746,7 @@ listExtendedStats(const char *pattern)
" ON (es.stxrelid = a.attrelid \n" " ON (es.stxrelid = a.attrelid \n"
" AND a.attnum = s.attnum \n" " AND a.attnum = s.attnum \n"
" AND NOT a.attisdropped)), \n" " AND NOT a.attisdropped)), \n"
"es.stxrelid::regclass) AS \"%s\"", "es.stxrelid::pg_catalog.regclass) AS \"%s\"",
gettext_noop("Definition")); gettext_noop("Definition"));
appendPQExpBuffer(&buf, appendPQExpBuffer(&buf,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment