public inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Erik Wienhold <ewie@ewie.name>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bob Kline <bkline@rksystems.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Inclusion of json in list of standard data types
Date: Mon, 8 Dec 2025 19:33:42 +0100
Message-ID: <31bad2c4-1876-4cfe-9463-08f4b02bf536@ewie.name> (raw)
In-Reply-To: <2326014.1765045678@sss.pgh.pa.us>
References: <CAGjKmVoP4qVeJgkaBtQ6L46+OLARzmym53uQGhp5COw4wp65yQ@mail.gmail.com>
<2326014.1765045678@sss.pgh.pa.us>
On 2025-12-06 19:27 +0100, Tom Lane wrote:
> Bob Kline <bkline@rksystems.com> writes:
> > Would there be any reason not to add "json" to the list of data types
> > "specified by SQL" in the "Compatibility" box shown near the beginning
> > of Chapter 8 ("Data Types") of the PostgreSQL documentation?
>
> Yeah, that seems like an oversight. Will fix, thanks for noticing it.
But does Postgres' json type really map to the JSON type defined by
SQL:2023? jsonb appears to be closer to that, although I don't have
access to that particular version of the standard. Peter wrote [1]
about the compatibility with SQL:2023 and noted that the standard maps
more readily to jsonb (see 3rd bullet point in the notes section) and
features T879–T882 still only apply to jsonb.
I don't think we should list json in that compatibility box unless it's
an alias for jsonb (maybe in some future version). Or at least note
that jsonb is the better choice for people looking for standard
compatibility. To me, "compatibility" implies that Postgres also
implements certain features of those standard types rather than just
providing some type that happens to match the name of a standard type
for historical reasons.
[1] https://peter.eisentraut.org/blog/2023/04/18/postgresql-and-sql-2023
--
Erik Wienhold
reply
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: ewie@ewie.name, tgl@sss.pgh.pa.us, bkline@rksystems.com, pgsql-docs@lists.postgresql.org
Subject: Re: Inclusion of json in list of standard data types
In-Reply-To: <31bad2c4-1876-4cfe-9463-08f4b02bf536@ewie.name>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox