Re: Why no jsonb_exists_path()? - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Why no jsonb_exists_path()?
Date
Msg-id CAPpHfdvzQKOpM+rZR_NaP9Jr5zZV0BK7KUq89+aQBRHc1xxhPQ@mail.gmail.com
Whole thread Raw
In response to Why no jsonb_exists_path()?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh,

On Tue, Jun 9, 2015 at 9:16 PM, Josh Berkus <josh@agliodbs.com> wrote:
Dmitry, Alexander:

I'm noticing a feature gap for JSONB operators; we have no way to do this:

jsonb_col ? ARRAY['key1','key2','key3']

What documents do you expect to match this operator?
Such syntax can be interpreted in very different semantics. Checking keys only at top level, any level, sequence starting from top level ... etc.

'{"key1": "value1", "key2": "value2", "key3": "value3"}'
'{"key1":{ "key2": {"key3: "value"}}}'
'{"key1": "value1"}
'[{"key1": "value1"}, {"key2": "value2"}, {"key3": "value3"}]'

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: s_lock() seems too aggressive for machines with many sockets
Next
From: Andres Freund
Date:
Subject: Re: s_lock() seems too aggressive for machines with many sockets