BUG #16828: duplicate results when using ** recursive expression in JSON path

Поиск
Список
Период
Сортировка
Искать
От
PG Bug reporting form
Тема
BUG #16828: duplicate results when using ** recursive expression in JSON path
Дата
Msg-id
16828-2b0229babfad2d8c@postgresql.org
Список
Дерево обсуждения
BUG #16828: duplicate results when using ** recursive expression in JSON path PG Bug reporting form <noreply@postgresql.org>
Re: BUG #16828: duplicate results when using ** recursive expression in JSON path Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #16828: duplicate results when using ** recursive expression in JSON path Alexander Korotkov <aekorotkov@gmail.com>
The following bug has been logged on the website:

Bug reference:      16828
Logged by:          Thomas Kellerer
Email address:      shammat@gmx.net
PostgreSQL version: 13.1
Operating system:   Windows 10, CentOS 8
Description:        

The following query 

  select jsonb_path_query_array(col, '$.**.itemName')
  from (
    values ('{"items": [{"itemName": "a", "items": [{"itemName":
"b"}]}]}'::jsonb)
  ) as t(col) 

returns ["a", "a", "b", "b"] but should return only ["a", "b"] as each value
only appears once in the JSON value. 

This also happens on Postgres 12.x

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