json_query - redundant result

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема json_query - redundant result
Дата
Msg-id CAFj8pRDgxcD5imBqWODk0y_MKU=1Oek1CutTXpq1apZSBNbk5A@mail.gmail.com
обсуждение исходный текст
Ответы Re: json_query - redundant result
Список pgsql-hackers
Hi

I am learning new JSON API, and I am not sure, how the result of JSON_QUERY in one case is correct. So I am asking here

(2022-04-28 10:13:26) postgres=# SELECT JSON_QUERY(jsonb '[{"a":10, "b": 20}, {"a": 30, "b":100}]', '$.**.a' with wrapper);
┌──────────────────┐
│    json_query    │
╞══════════════════╡
│ [10, 30, 10, 30] │
└──────────────────┘
(1 row)

Is this result correct? I am expecting just [10, 30]

Regards

Pavel


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Possible corruption by CreateRestartPoint at promotion
Следующее
От: "kuroda.hayato@fujitsu.com"
Дата:
Сообщение: RE: Multi-Master Logical Replication