Re: [HACKERS] Why no jsonb_exists_path()?

2015-06-10 Thread Alexander Korotkov
Josh, On Tue, Jun 9, 2015 at 9:16 PM, Josh Berkus 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

Re: [HACKERS] Why no jsonb_exists_path()?

2015-06-09 Thread Andrew Dunstan
On 06/09/2015 05:30 PM, Andrew Dunstan wrote: On 06/09/2015 02:40 PM, Tom Lane wrote: Josh Berkus writes: I'm noticing a feature gap for JSONB operators; we have no way to do this: jsonb_col ? ARRAY['key1','key2','key3'] ... that is, there is no way for us to check for key existence in an i

Re: [HACKERS] Why no jsonb_exists_path()?

2015-06-09 Thread Andrew Dunstan
On 06/09/2015 02:40 PM, Tom Lane wrote: Josh Berkus writes: I'm noticing a feature gap for JSONB operators; we have no way to do this: jsonb_col ? ARRAY['key1','key2','key3'] ... that is, there is no way for us to check for key existence in an indexable fashion. Given that @> already can chec

Re: [HACKERS] Why no jsonb_exists_path()?

2015-06-09 Thread Tom Lane
Josh Berkus writes: > I'm noticing a feature gap for JSONB operators; we have no way to do this: > jsonb_col ? ARRAY['key1','key2','key3'] > ... that is, there is no way for us to check for key existence in an > indexable fashion. Given that @> already can check the whole path > including the v

[HACKERS] Why no jsonb_exists_path()?

2015-06-09 Thread Josh Berkus
Dmitry, Alexander: I'm noticing a feature gap for JSONB operators; we have no way to do this: jsonb_col ? ARRAY['key1','key2','key3'] ... that is, there is no way for us to check for key existence in an indexable fashion. Given that @> already can check the whole path including the value, is th