On 5/30/21 7:24 PM, Justin Pryzby wrote:
> On Wed, Jan 20, 2021 at 11:00:50PM +0100, Tomas Vondra wrote:
>> Thanks, I've pushed this. I had to tweak the regression tests a bit, for two
>> reasons:
> 
> \dX isn't checking schema visibility rules, so accidentally shows stats 
> objects
> outside of the search path.  I noticed after installing the PG14b1 client,
> since we create stats objects in a separate schema to allow excluding them 
> with
> pg_dump -N.
> 
> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
> index 195f8d8cd2..e29f13c65e 100644
> --- a/src/bin/psql/describe.c
> +++ b/src/bin/psql/describe.c
> @@ -4774,7 +4774,7 @@ listExtendedStats(const char *pattern)
>       processSQLNamePattern(pset.db, &buf, pattern,
>                                                 false, false,
>                                                 
> "es.stxnamespace::pg_catalog.regnamespace::text", "es.stxname",
> -                                               NULL, NULL);
> +                                               NULL, 
> "pg_catalog.pg_statistics_obj_is_visible(es.oid)");
>  
>       appendPQExpBufferStr(&buf, "ORDER BY 1, 2;");
>  

Thanks for noticing this! Will push.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to