hi.
       <para>
        <literal>jsonb_path_query('"abc,def,ghi,jkl"',
'$.split_part(",", 2)')</literal>
        <returnvalue>"ghi"</returnvalue>
       </para></entry>
the return value should be
"def"
?

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <replaceable>string</replaceable> <literal>.</literal>
<literal>ltrim(<replaceable>characters</replaceable>)</literal>
        <returnvalue><replaceable>string</replaceable></returnvalue>
       </para>
       <para>
        String with the longest string containing only spaces or the
        characters in <replaceable>characters</replaceable> removed from the
        start of <replaceable>string</replaceable>
       </para>
       <para>
        <literal> jsonb_path_query('"  hello"', '$.ltrim()')</literal>
        <returnvalue>"hello"</returnvalue>
       </para>
       <para>
        <literal>jsonb_path_query('"zzzytest"', '$.ltrim("xyz")')</literal>
        <returnvalue>"test"</returnvalue>
       </para></entry>
      </row>

The actual signature:
<replaceable>characters</replaceable> part is optional, but we didn't
use square brackets
to indicate it's optional.

personally I would prefer list two seperate function signature, like:
       <entry role="func_table_entry"><para role="func_signature">
        <replaceable>string</replaceable> <literal>.</literal>
<literal>ltrim()</literal>
        <returnvalue><replaceable>string</replaceable></returnvalue>
       </para>
       <para role="func_signature">
        <replaceable>string</replaceable> <literal>.</literal>
<literal>ltrim(<replaceable>characters</replaceable>)</literal>
        <returnvalue><replaceable>string</replaceable></returnvalue>
       </para>

similarly:
string . rtrim([ characters ]) → string
change to
```
string . rtrim() → string
string . rtrim(characters ) → string
```

string . btrim([ characters ]) → string
change to
```
string . btrim() → string
string . btrim([ characters ]) → string
``
would improve the readability, I think.


--
jian
https://www.enterprisedb.com/


Reply via email to