Re: SQL/JSON query functions context_item doc entry and type requirement

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SQL/JSON query functions context_item doc entry and type requirement
Дата
Msg-id CAKFQuwYy+rOOrWQay5WvcDW693-QaK1dO5XuCJj=EonF_Gyx8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SQL/JSON query functions context_item doc entry and type requirement  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Thursday, June 20, 2024, David G. Johnston <david.g.johnston@gmail.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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: SQL/JSON query functions context_item doc entry and type requirement
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions