Re: list of extended statistics on psql (\dX)

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: list of extended statistics on psql (\dX)
Дата
Msg-id 519d629f-8932-6850-0bbf-50f36b8c7b86@enterprisedb.com
обсуждение исходный текст
Ответ на RE: list of extended statistics on psql  ("Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>)
Ответы Re: list of extended statistics on psql (\dX)  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Fdw batch insert error out when set batch_size > 65535
Следующее
От: Andres Freund
Дата:
Сообщение: Re: O_DIRECT on macOS