RE: Working with JSONB data having node lists

2018-01-31 Thread Steven Winfield
If you can do this one without unnesting the downloads array I do not know how. Having done that: (WHERE dlarray->'publd' = '123) I think it’s doable like this: select * from contacts where data @> '{"downloads":[{"pubid":123}]}'::jsonb …which would be aided by a gin index on ‘data’ using json

Re: Working with JSONB data having node lists

2018-01-30 Thread David G. Johnston
On Tue, Jan 30, 2018 at 2:47 PM, geoff hoffman wrote: > JSONB fields are very attractive for our current use, particularly as > straight key-value pairs in the JSONB data; > > but we are having trouble finding documentation on how to query lists (of > scalars or objects) in nodes of the JSONB dat