Re: json_query conditional wrapper bug

2024-09-13 Thread Amit Langote
On Thu, Sep 12, 2024 at 8:12 PM Amit Langote wrote: > > Hi Andreas, > > On Thu, Sep 12, 2024 at 7:08 PM Andreas Ulbrich > wrote: > > > > Salvete! > > > > > > Sorry for my out of the rules replay, but I'm not at home, and also I can't > > verify and check your patch. > > > > But I think you have

Re: json_query conditional wrapper bug

2024-09-11 Thread Amit Langote
On Wed, Sep 11, 2024 at 8:56 PM Peter Eisentraut wrote: > On 11.09.24 13:25, Amit Langote wrote: > > On Wed, Sep 11, 2024 at 6:57 PM Peter Eisentraut > > wrote: > >> On 11.09.24 09:51, Amit Langote wrote: > > I've updated your patch to include updated test outputs and a nearby > > code c

Re: json_query conditional wrapper bug

2024-09-11 Thread Peter Eisentraut
On 11.09.24 13:25, Amit Langote wrote: On Wed, Sep 11, 2024 at 6:57 PM Peter Eisentraut wrote: On 11.09.24 09:51, Amit Langote wrote: I've updated your patch to include updated test outputs and a nearby code comment expanded. Do you intend to commit it or do you prefer that I do? This chang

Re: json_query conditional wrapper bug

2024-09-11 Thread Amit Langote
On Wed, Sep 11, 2024 at 6:57 PM Peter Eisentraut wrote: > On 11.09.24 09:51, Amit Langote wrote: > >>> I've updated your patch to include updated test outputs and a nearby > >>> code comment expanded. Do you intend to commit it or do you prefer > >>> that I do? > >> > >> This change looks unrelat

Re: json_query conditional wrapper bug

2024-09-11 Thread Peter Eisentraut
On 11.09.24 09:51, Amit Langote wrote: I've updated your patch to include updated test outputs and a nearby code comment expanded. Do you intend to commit it or do you prefer that I do? This change looks unrelated: -ERROR: new row for relation "test_jsonb_constraints" violates check constrai

Re: json_query conditional wrapper bug

2024-09-11 Thread Amit Langote
On Wed, Sep 11, 2024 at 5:15 AM Peter Eisentraut wrote: > On 10.09.24 10:00, Amit Langote wrote: > > Sorry for missing this report and thanks Andrew for the offlist heads up. > > > > On Wed, Sep 4, 2024 at 7:16 PM Peter Eisentraut > > wrote: > >> On 28.08.24 11:21, Peter Eisentraut wrote: > >>>

Re: json_query conditional wrapper bug

2024-09-10 Thread Peter Eisentraut
On 10.09.24 10:00, Amit Langote wrote: Sorry for missing this report and thanks Andrew for the offlist heads up. On Wed, Sep 4, 2024 at 7:16 PM Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wra

Re: json_query conditional wrapper bug

2024-09-10 Thread Amit Langote
Sorry for missing this report and thanks Andrew for the offlist heads up. On Wed, Sep 4, 2024 at 7:16 PM Peter Eisentraut wrote: > On 28.08.24 11:21, Peter Eisentraut wrote: > > These are ok: > > > > select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper); > > json_query > > --

Re: json_query conditional wrapper bug

2024-09-05 Thread Andrew Dunstan
> On Sep 5, 2024, at 11:51 AM, Peter Eisentraut wrote: > > On 05.09.24 17:01, Andrew Dunstan wrote: >>> On 2024-09-04 We 4:10 PM, Andrew Dunstan wrote: >>> >>> On 2024-09-04 We 6:16 AM, Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: > These are ok: > >

Re: json_query conditional wrapper bug

2024-09-05 Thread Peter Eisentraut
On 05.09.24 17:01, Andrew Dunstan wrote: On 2024-09-04 We 4:10 PM, Andrew Dunstan wrote: On 2024-09-04 We 6:16 AM, Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper);   json_query --

Re: json_query conditional wrapper bug

2024-09-05 Thread Andrew Dunstan
On 2024-09-04 We 4:10 PM, Andrew Dunstan wrote: On 2024-09-04 We 6:16 AM, Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper);   json_query   42 select json_query('{"a": 1, "

Re: json_query conditional wrapper bug

2024-09-04 Thread Andrew Dunstan
On 2024-09-04 We 6:16 AM, Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper);   json_query   42 select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' with unconditional wr

Re: json_query conditional wrapper bug

2024-09-04 Thread Peter Eisentraut
On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper);  json_query  42 select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' with unconditional wrapper);  json_query  [42] But this app

json_query conditional wrapper bug

2024-08-28 Thread Peter Eisentraut
These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper); json_query 42 select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' with unconditional wrapper); json_query [42] But this appears to be wrong: select json_query('{"a": 1, "