Re: [GENERAL] Querying JSON Lists

2017-03-03 Thread Adrian Klaver
On 03/03/2017 11:50 AM, Sven R. Kunze wrote: On 03.03.2017 16:05, Adrian Klaver wrote: https://www.postgresql.org/docs/9.6/static/functions-json.html As to why it works on JSON arrays: Table 9-43. Additional jsonb Operators " ? text Does the string exist as a top-level key within the

Re: [GENERAL] Querying JSON Lists

2017-03-03 Thread Sven R. Kunze
On 03.03.2017 16:05, Adrian Klaver wrote: https://www.postgresql.org/docs/9.6/static/functions-json.html As to why it works on JSON arrays: Table 9-43. Additional jsonb Operators " ? text Does the string exist as a top-level key within the JSON value? " So to be picky it not does

Re: [GENERAL] Querying JSON Lists

2017-03-03 Thread Adrian Klaver
On 03/02/2017 01:09 PM, Sven R. Kunze wrote: On 28.02.2017 17:33, Adrian Klaver wrote: On 02/26/2017 03:26 AM, Sven R. Kunze wrote: Hello everyone, playing around with jsonb and coming from this SO question

Re: [GENERAL] Querying JSON Lists

2017-03-03 Thread Sven R. Kunze
On 28.02.2017 17:33, Adrian Klaver wrote: On 02/26/2017 03:26 AM, Sven R. Kunze wrote: Hello everyone, playing around with jsonb and coming from this SO question http://stackoverflow.com/questions/19925641/check-if-a-postgres-json-array-contains-a-string I wonder why PostgreSQL behaves

Re: [GENERAL] Querying JSON Lists

2017-02-28 Thread Adrian Klaver
On 02/26/2017 03:26 AM, Sven R. Kunze wrote: Hello everyone, playing around with jsonb and coming from this SO question http://stackoverflow.com/questions/19925641/check-if-a-postgres-json-array-contains-a-string I wonder why PostgreSQL behaves differently for text and integers on the ? and @>

[GENERAL] Querying JSON Lists

2017-02-26 Thread Sven R. Kunze
Hello everyone, playing around with jsonb and coming from this SO question http://stackoverflow.com/questions/19925641/check-if-a-postgres-json-array-contains-a-string I wonder why PostgreSQL behaves differently for text and integers on the ? and @> operators. Let's have a look at 4