Re: Unable to make use of "deep" JSONB index
От | Jeff Janes |
---|---|
Тема | Re: Unable to make use of "deep" JSONB index |
Дата | |
Msg-id | CAMkU=1zHod+UktMioLywae=NsEtAmFe1S1VRqSqSqin4NGXH6Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Unable to make use of "deep" JSONB index (Shaheed Haque <shaheedhaque@gmail.com>) |
Ответы |
Re: Unable to make use of "deep" JSONB index
|
Список | pgsql-bugs |
On Sun, Jun 12, 2022 at 5:34 AM Shaheed Haque <shaheedhaque@gmail.com> wrote:
OK, I have corrected and simplified the test case (including switching
to a btree index). The WHERE clause and the inex now look like this:
...WHERE ((snapshot -> 'employee' -> '999' ->>
'pay_graph')::integer != 0);
...USING btree (((snapshot -> 'employee' -> '$.*' ->>
'pay_graph')::integer != 0));
But, this is not a correction. You are still trying to use -> as if it were @?, and that is still not going to work.
You are indexing the part of snapshot which has the employee number of '$.*', which is a weird employee number for anyone to have. You might want to represent a wildcard but that is not what -> does.
Cheer,
Jeff
В списке pgsql-bugs по дате отправления: