From: | Erik Rijkers <er(at)xs4all(dot)nl> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: remaining sql/json patches |
Date: | 2023-07-17 07:15:34 |
Message-ID: | a1461fe0-ae70-0989-cced-c4b3b0a94013@xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Op 7/17/23 om 07:00 schreef jian he:
> hi.
> seems there is no explanation about, json_api_common_syntax in
> functions-json.html
>
> I can get json_query full synopsis from functions-json.html as follows:
> json_query ( context_item, path_expression [ PASSING { value AS
> varname } [, ...]] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8
> ] ] ] [ { WITHOUT | WITH { CONDITIONAL | [UNCONDITIONAL] } } [ ARRAY ]
> WRAPPER ] [ { KEEP | OMIT } QUOTES [ ON SCALAR STRING ] ] [ { ERROR |
> NULL | EMPTY { [ ARRAY ] | OBJECT } | DEFAULT expression } ON EMPTY ]
> [ { ERROR | NULL | EMPTY { [ ARRAY ] | OBJECT } | DEFAULT expression }
> ON ERROR ])
>
> seems doesn't have a full synopsis for json_table? only partial one
> by one explanation.
>
FWIW, Re: json_api_common_syntax
An (old) pdf that I have (ISO/IEC TR 19075-6 First edition 2017-03)
contains the below specification. It's probably the source of the
particular term. It's easy to see how it maps onto the current v7
SQL/JSON implementation. (I don't know if it has changed in later
incarnations.)
------ 8< ------------
5.2 JSON API common syntax
The SQL/JSON query functions all need a path specification, the JSON
value to be input to that path specification for querying and
processing, and optional parameter values passed to the path
specification. They use a common syntax:
<JSON API common syntax> ::=
<JSON context item> <comma> <JSON path specification>
[ AS <JSON table path name> ]
[ <JSON passing clause> ]
<JSON context item> ::=
<JSON value expression>
<JSON path specification> ::=
<character string literal>
<JSON passing clause> ::=
PASSING <JSON argument> [ { <comma> <JSON argument> } ]
<JSON argument> ::=
<JSON value expression> AS <identifier>
------ 8< ------------
And yes, we might need a readable translation of that in the docs
although it might be easier to just get get rid of the term
'json_api_common_syntax'.
HTH,
Erik Rijkers
From | Date | Subject | |
---|---|---|---|
Next Message | Önder Kalacı | 2023-07-17 07:24:27 | Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table. |
Previous Message | suyu.cmj | 2023-07-17 06:26:56 | Re: The same 2PC data maybe recovered twice |