Re: remaining sql/json patches

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: remaining sql/json patches
Дата
Msg-id a1461fe0-ae70-0989-cced-c4b3b0a94013@xs4all.nl
обсуждение исходный текст
Ответ на Re: remaining sql/json patches  (jian he <jian.universality@gmail.com>)
Ответы Re: remaining sql/json patches
Список 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



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

Предыдущее
От: Önder Kalacı
Дата:
Сообщение: Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL
Следующее
От: Önder Kalacı
Дата:
Сообщение: Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.