Re: Getting fancy errors when accessing information_schema on 10.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Axel Rau <Axel(dot)Rau(at)Chaos1(dot)DE>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Getting fancy errors when accessing information_schema on 10.5
Date: 2018-10-30 12:58:38
Message-ID: 12415.1540904318@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Axel Rau <Axel(dot)Rau(at)Chaos1(dot)DE> writes:
>> Am 30.10.2018 um 13:17 schrieb Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> It doesn't happen for me either. Looking at the planner code, it seems
>> like the relkind check should happen first because it'd be cheaper than
>> the OR condition. Have you perhaps messed with the cost attributed to
>> pg_has_role(), has_sequence_privilege(), or chareq()?

> Not by intention. The instance has some history, it go back to 8.x I think.

>> You could investigate with, eg,
>>
>> select oid::regprocedure, procost from pg_proc
>> where proname = 'has_sequence_privilege';

> nextcloud=> select oid::regprocedure, procost from pg_proc
> nextcloud-> where proname = 'has_sequence_privilege';
> oid | procost
> ----------------------------------------+---------
> has_sequence_privilege(name,text,text) | 1
> has_sequence_privilege(name,oid,text) | 1
> has_sequence_privilege(oid,text,text) | 1
> has_sequence_privilege(oid,oid,text) | 1
> has_sequence_privilege(text,text) | 1
> has_sequence_privilege(oid,text) | 1
> (6 rows)

Hm, nothing surprising there, but what about the other two?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Christoph Berg 2018-10-30 13:00:09 Re: creating table without columns
Previous Message Greg Spiegelberg 2018-10-30 12:53:04 Re: creating table without columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Axel Rau 2018-10-30 13:02:33 Re: Getting fancy errors when accessing information_schema on 10.5
Previous Message Tatsuo Ishii 2018-10-30 12:48:15 Re: pgbench doc fix