Re: Getting fancy errors when accessing information_schema on 10.5

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Getting fancy errors when accessing information_schema on 10.5
Дата
Msg-id d45d02406b2d0bd62f371d726795969841200c69.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Getting fancy errors when accessing information_schema on 10.5  (Axel Rau <Axel.Rau@Chaos1.DE>)
Список pgsql-admin
Axel Rau wrote:
> nextcloud=> explain select ((pg_has_role(relowner, 'USAGE'::text) OR has_sequence_privilege(oid, 'SELECT, UPDATE,
USAGE'::text)))from pg_class;
 
>                         QUERY PLAN                         
> -----------------------------------------------------------
>  Seq Scan on pg_class  (cost=0.00..28.56 rows=656 width=1)
> (1 row)
> 
> nextcloud=> explain select (relkind = 'S'::"char") from pg_class;
>                         QUERY PLAN                         
> -----------------------------------------------------------
>  Seq Scan on pg_class  (cost=0.00..28.56 rows=656 width=1)
> (1 row)

Hm, strange, for me the first query is slightly more expensive (because
of the OR), but the costs are pretty similar.

Another idea I have is to raise the costs of "has_sequence_privilege"
slightly.

Yours,
Laurenz Albe



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

Предыдущее
От: Axel Rau
Дата:
Сообщение: Re: Getting fancy errors when accessing information_schema on 10.5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Getting fancy errors when accessing information_schema on 10.5