On Thursday, June 20, 2024, David G. Johnston <david.g.johns...@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: https://www.postgresql.org/message-id/cakfquwznxnhupk44zdf7z8qzec1aof10aa9twvbu5cmheke...@mail.gmail.com David J.