Re: Indexing on JSONB field not working

From: Zhihong Zhang <zhihong(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Indexing on JSONB field not working
Date: 2019-12-26 23:57:52
Message-ID: AB8741FA-1561-4E40-A87E-DA4171668B69@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I created the index myself using the same account. Should I be the owner?

Zhihong

> On Dec 26, 2019, at 6:51 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-12-27 02:30:59 Re: Indexing on JSONB field not working
Previous Message Tom Lane 2019-12-26 23:51:34 Re: Indexing on JSONB field not working