From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: john.james@rocketbnk.com
Subject: Ambiguous statement about order
Date: Thu, 14 Sep 2023 16:52:27 +0000
Message-ID: <169471034724.2433969.10991418756730188687@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/datatype-json.html
Description:
The following statement in the page doesn't speak about arrays which created
some confusion with developers in our company:
"By contrast, jsonb does not preserve white space, does not preserve the
order of object keys, and does not keep duplicate object keys. If duplicate
keys are specified in the input, only the last value is kept."
The reason that caused confusion was some developers argued object keys
include arrays.
What added to the ambiguity is another line (a footnote):
"For this purpose, the term “value” includes array elements, though JSON
terminology sometimes considers array elements distinct from values within
objects."
I understand that it is only related to containment test. But it was causing
confusion with others.
I observed that arrays inside JSONB preserved order of insertion. An
explicit line about whether the array order will be preserved or not would
be helpful.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, john.james@rocketbnk.com
Subject: Re: Ambiguous statement about order
In-Reply-To: <169471034724.2433969.10991418756730188687@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox