Hi,

I found other functions that we should add "pg_catalog" prefix in
describe.c. This fix is similar to the following commit.

=====
commit 359bcf775550aa577c86ea30a6d071487fcca1ed
Author: Alvaro Herrera <alvhe...@alvh.no-ip.org>
Date:   Sat Aug 28 12:04:15 2021 -0400

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

Please find attached the patch.

Regards,
Tatsuro Yamada
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 90ff649..a33d77c 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2881,7 +2881,7 @@ describeOneTableDetails(const char *schemaname,
                                                          
"stxrelid::pg_catalog.regclass, "
                                                          
"stxnamespace::pg_catalog.regnamespace AS nsp, "
                                                          "stxname,\n"
-                                                         
"pg_get_statisticsobjdef_columns(oid) AS columns,\n"
+                                                         
"pg_catalog.pg_get_statisticsobjdef_columns(oid) AS columns,\n"
                                                          "  'd' = any(stxkind) 
AS ndist_enabled,\n"
                                                          "  'f' = any(stxkind) 
AS deps_enabled,\n"
                                                          "  'm' = any(stxkind) 
AS mcv_enabled,\n"
@@ -4734,7 +4734,7 @@ listExtendedStats(const char *pattern)
        if (pset.sversion >= 140000)
                appendPQExpBuffer(&buf,
                                                  "pg_catalog.format('%%s FROM 
%%s', \n"
-                                                 "  
pg_get_statisticsobjdef_columns(es.oid), \n"
+                                                 "  
pg_catalog.pg_get_statisticsobjdef_columns(es.oid), \n"
                                                  "  
es.stxrelid::pg_catalog.regclass) AS \"%s\"",
                                                  gettext_noop("Definition"));
        else

Reply via email to