Re: Unexpected extra row from jsonb_path_query() with a recursivepath - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: Unexpected extra row from jsonb_path_query() with a recursivepath
Date
Msg-id 20191210023805.GF72921@paquier.xyz
Whole thread Raw
In response to Re: Unexpected extra row from jsonb_path_query() with a recursive path  (Jan Przemysław Wójcik <jan.przemyslaw.wojcik@gmail.com>)
List pgsql-bugs
On Mon, Dec 09, 2019 at 09:37:23AM +0100, Jan Przemysław Wójcik wrote:
> Yes, there is the only object with the attribute 'key' and its value
> should be returned. Note, that a non-recursive path on the same JSON
> correctly returns a single row:
>
> select jsonb_path_query('{"data": [{"key": "value"}]}', '$.*.key')
>
>  jsonb_path_query
> ------------------
>  "value"
> (1 row)

Yeah, that result is right.  Something looks wrong regarding the
lookup of an array's elements when doing a recursion.  Let's wait a
bit to see if Nikita or Alexander have anything to share as they
implemented the feature.  If not, I'll try to take a closer look at
this issue.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16157: handling of pg_malloc(0)
Next
From: Michael Paquier
Date:
Subject: Re: Warning in the RecordTransactionAbort routine during compilationwith O3 flag