Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-09 Thread Amit Langote
On Tue, Jul 9, 2024 at 12:30 PM Amit Langote wrote: > On Tue, Jul 9, 2024 at 10:39 AM jian he wrote: > > On Mon, Jul 8, 2024 at 8:57 PM Amit Langote wrote: > > > > > > Updated patch attached. > > > > > > > Returns true if the SQL/JSON > > path_expression > > -applied to the con

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-08 Thread Amit Langote
On Tue, Jul 9, 2024 at 10:39 AM jian he wrote: > On Mon, Jul 8, 2024 at 8:57 PM Amit Langote wrote: > > > > Updated patch attached. > > > > Returns true if the SQL/JSON > path_expression > -applied to the context_item using the > -PASSING values yields > any > -

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-08 Thread jian he
On Mon, Jul 8, 2024 at 8:57 PM Amit Langote wrote: > > Updated patch attached. > Returns true if the SQL/JSON path_expression -applied to the context_item using the -PASSING values yields any -items. +applied to the context_item doesn't yield +any

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-08 Thread Amit Langote
Thanks for the readthrough. On Sat, Jul 6, 2024 at 11:56 AM jian he wrote: > json_exists > "Returns true if the SQL/JSON path_expression applied to the > context_item using the PASSING values yields any items." > now you changed to > << > Returns true if the SQL/JSON path_expression applied to th

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-08 Thread Amit Langote
On Fri, Jul 5, 2024 at 10:16 PM Erik Rijkers wrote: > Op 7/5/24 om 14:35 schreef Amit Langote: > > Hi Jian, > > > > Thanks for the reviews. > > > > [v3-0001-SQL-JSON-Various-improvements-to-SQL-JSON-query-f.patch] >i.e., from the patch for doc/src/sgml/func.sgml > > > Small changes: > > 4

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-08 Thread jian he
another tiny issue. -select json_query(jsonb '{"a": "[1, 2]"}', 'lax $.a' OMIT QUOTES); +JSON_QUERY(jsonb '{"a": "[1, 2]"}', 'lax $.a' OMIT QUOTES); [1, 2] -select json_query(jsonb '{"a": "[1, 2]"}', 'lax $.a' RETURNING int[] OMIT QUOTES ERROR ON

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-07 Thread jian he
+ context_item can be any character string that + can be succesfully cast to jsonb. typo: "succesfully", should be "successfully" maybe rephrase it to: + context_item can be jsonb type or any character string that + can be successfully cast to jsonb. +ON EMPTY expression (that i

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-05 Thread jian he
On Fri, Jul 5, 2024 at 8:35 PM Amit Langote wrote: > Please check the attached. I've also added lists as I > remember you had proposed before to make the functions' descriptions a > bit more readable -- I'm persuaded. :-) > json_exists "Returns true if the SQL/JSON path_expression applied to t

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-05 Thread Erik Rijkers
Op 7/5/24 om 14:35 schreef Amit Langote: Hi Jian, Thanks for the reviews. > [v3-0001-SQL-JSON-Various-improvements-to-SQL-JSON-query-f.patch] i.e., from the patch for doc/src/sgml/func.sgml Small changes: 4x: 'a SQL' should be 'an SQL' ('a SQL' does never occur in the docs; it's alwa

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-05 Thread Amit Langote
Hi Jian, Thanks for the reviews. On Wed, Jul 3, 2024 at 11:15 AM jian he wrote: > Overall, I found this approach makes the synopsis scattered, it's not > easy to see the full picture. > for example: > ``` > JSON_VALUE ( context_item, path_expression [variable_definitions] > [return_type] [on_emp

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-02 Thread jian he
hi. the following review is based on v2-0001, v2-0002. "context_item can be a JSON document passed as a value of type json, jsonb document, a character or an UTF8- endoded bytea string." is wrong? e.g. SELECT JSON_EXISTS( NULL::bytea, 'lax $.a[5]' ERROR ON ERROR) check following query: select oid

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-07-02 Thread Amit Langote
On Fri, Jun 28, 2024 at 2:56 PM Amit Langote wrote: > On Tue, Jun 25, 2024 at 3:47 PM David G. Johnston > wrote: > > > > Hey! > > > > Lots of SQL/JSON threads going about. This one is less about technical > > correctness and more about usability of the documentation. Though in > > writing this

Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-06-27 Thread Amit Langote
Hi David, On Tue, Jun 25, 2024 at 3:47 PM David G. Johnston wrote: > > Hey! > > Lots of SQL/JSON threads going about. This one is less about technical > correctness and more about usability of the documentation. Though in writing > this I am finding some things that aren't quite clear. I'm go

Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-06-24 Thread David G. Johnston
Hey! Lots of SQL/JSON threads going about. This one is less about technical correctness and more about usability of the documentation. Though in writing this I am finding some things that aren't quite clear. I'm going to come back with those on a follow-on post once I get a chance to make my se