Re: More new SQL/JSON item methods - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: More new SQL/JSON item methods
Date
Msg-id 00138a30a9c8dec41d21e614e5cab5c5@anastigmatix.net
Whole thread Raw
In response to Re: More new SQL/JSON item methods  (Vik Fearing <vik@postgresfriends.org>)
List pgsql-hackers
On 2023-08-31 20:50, Vik Fearing wrote:
>   — An SQL/JSON item is defined recursively as any of the following:
> ...
>     • An SQL/JSON array, defined as an ordered list of zero or more
>       SQL/JSON items, called the SQL/JSON elements of the SQL/JSON
>       array.
> ...
>   — An SQL/JSON sequence is an ordered list of zero or more SQL/JSON
>     items.

As I was thinking, because "an ordered list of zero or more SQL/JSON
items" is also exactly what an SQL/JSON array is, it seems at least
possible to implement things that are specified to return "SQL/JSON
sequence" by having them return an SQL/JSON array (the kind of thing
that isn't possible for XML(SEQUENCE), because there isn't any other
XML construct that can subsume it).

Still, it seems noteworthy that both terms are used in the spec, rather
than saying the function in question should return a JSON array. Makes
me wonder if there are some other details that make the two distinct.

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: should frontend tools use syncfs() ?
Next
From: Nathan Bossart
Date:
Subject: Re: should frontend tools use syncfs() ?