From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Chapman Flack <jcflack(at)acm(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: SQL/JSON query functions context_item doc entry and type requirement |
Date: | 2024-06-28 05:27:06 |
Message-ID: | CAKFQuwYy+rOOrWQay5WvcDW693-QaK1dO5XuCJj=EonF_Gyx8w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, June 20, 2024, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
>
>> >
>> > > As for table 9.16.3 - it is unwieldy already. Lets try and make the
>> core syntax shorter, not longer. We already have precedence in the
>> subsequent json_table section - give each major clause item a name then
>> below the table define the syntax and meaning for those names. Unlike in
>> that section - which probably should be modified too - context_item should
>> have its own description line.
>> >
>> > I had posted a patch a little while ago at [1] to render the syntax a
>> > bit differently with each function getting its own syntax synopsis.
>> > Resending it here; have addressed Jian He's comments.
>> >
>> > --
>>
>
> I was thinking more like:
>
> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
> index c324906b22..b9d157663a 100644
> --- a/doc/src/sgml/func.sgml
> +++ b/doc/src/sgml/func.sgml
> @@ -18692,8 +18692,10 @@ $.* ? (@ like_regex "^\\d+$")
> <entry role="func_table_entry"><para role="func_signature">
> <indexterm><primary>json_exists</primary></indexterm>
> <function>json_exists</function> (
> - <replaceable>context_item</replaceable>,
> <replaceable>path_expression</replaceable> <optional>
> <literal>PASSING</literal> { <replaceable>value</replaceable>
> <literal>AS</literal> <replaceable>varname</replaceable> } <optional>,
> ...</optional></optional>
> - <optional> { <literal>TRUE</literal> | <literal>FALSE</literal>
> |<literal> UNKNOWN</literal> | <literal>ERROR</literal> } <literal>ON
> ERROR</literal> </optional>)
> + <replaceable>context_item</replaceable>,
> + <replaceable>path_expression</replaceable>
> + <optional>variable_definitions</optional>
> + <optional>on_error_boolean</optional>)
> </para> empty semantics should be the same as json_query.
>
>>
>>
The full first draft patch for this is here:
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2024-06-28 05:56:39 | Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions |
Previous Message | Amit Langote | 2024-06-28 05:18:12 | Re: SQL/JSON query functions context_item doc entry and type requirement |