Re: Indexing on JSONB field not working - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Indexing on JSONB field not working
Date
Msg-id 9485.1577404294@sss.pgh.pa.us
Whole thread Raw
In response to Re: Indexing on JSONB field not working  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Indexing on JSONB field not working  (Zhihong Zhang <zhihong@gmail.com>)
List pgsql-bugs
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On Thu, Dec 26, 2019 at 05:25:22PM -0500, Zhihong Zhang wrote:
>> I am not superuser. Let me see how I can get access to the superuser on RDS.

> You can't - that's the point of am environment managed by someone else.
> Perhaps you could inspect the data directly in pg_statistic, not through
> the pg_stats view. But I haven't tried if that works on RDS.

He definitely shouldn't be able to do that, if not superuser.

However, after experimenting a bit it seems like pg_stats does work for
indexes as long as you are the owner of the index's table, which probably
explains why it took so long for anybody to notice the problem.  Maybe the
OP is trying to look at the stats as a non-owner that's just been GRANT'ed
table access?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Indexing on JSONB field not working
Next
From: Zhihong Zhang
Date:
Subject: Re: Indexing on JSONB field not working