Re: sql/json miscellaneous issue

2024-07-02 Thread Amit Langote
Hi, On Tue, Jun 25, 2024 at 1:53 PM jian he wrote: > On Tue, Jun 25, 2024 at 11:23 AM Amit Langote wrote: > > > My thoughts for the above cases are: > > > * json_value, json_query main description is the same: > > > {{Returns the result of applying the SQL/JSON path_expression to the > > > cont

Re: sql/json miscellaneous issue

2024-06-24 Thread jian he
On Tue, Jun 25, 2024 at 11:23 AM Amit Langote wrote: > > On Tue, Jun 25, 2024 at 12:18 PM jian he wrote: > > On Mon, Jun 24, 2024 at 7:46 PM Amit Langote > > wrote: > > > On Mon, Jun 24, 2024 at 7:04 PM jian he > > > wrote: > > > > > > > > hi. > > > > the following two queries should return t

Re: sql/json miscellaneous issue

2024-06-24 Thread Amit Langote
On Tue, Jun 25, 2024 at 12:18 PM jian he wrote: > On Mon, Jun 24, 2024 at 7:46 PM Amit Langote wrote: > > On Mon, Jun 24, 2024 at 7:04 PM jian he wrote: > > > > > > hi. > > > the following two queries should return the same result? > > > > > > SELECT * FROM JSON_query (jsonb 'null', '$' returnin

Re: sql/json miscellaneous issue

2024-06-24 Thread jian he
On Mon, Jun 24, 2024 at 7:46 PM Amit Langote wrote: > > Hi, > > On Mon, Jun 24, 2024 at 7:04 PM jian he wrote: > > > > hi. > > the following two queries should return the same result? > > > > SELECT * FROM JSON_query (jsonb 'null', '$' returning jsonb); > > SELECT * FROM JSON_value (jsonb 'null',

Re: sql/json miscellaneous issue

2024-06-24 Thread Amit Langote
Hi, On Mon, Jun 24, 2024 at 7:04 PM jian he wrote: > > hi. > the following two queries should return the same result? > > SELECT * FROM JSON_query (jsonb 'null', '$' returning jsonb); > SELECT * FROM JSON_value (jsonb 'null', '$' returning jsonb); I get this with HEAD: SELECT * FROM JSON_query

Re: sql/json miscellaneous issue

2024-06-24 Thread Amit Langote
Hi, On Mon, Jun 24, 2024 at 8:02 PM Stepan Neretin wrote: > Hi! > > I also noticed a very strange difference in behavior in these two queries, it > seems to me that although it returns a string by default, for the boolean > operator it is necessary to return true or false > SELECT * FROM JSON_v

Re: sql/json miscellaneous issue

2024-06-24 Thread Stepan Neretin
On Mon, Jun 24, 2024 at 5:05 PM jian he wrote: > hi. > the following two queries should return the same result? > > SELECT * FROM JSON_query (jsonb 'null', '$' returning jsonb); > SELECT * FROM JSON_value (jsonb 'null', '$' returning jsonb); > > I've tried a patch to implement it. > (i raised the