public inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
Inclusion of json in list of standard data types
4+ messages / 3 participants
[nested] [flat]

* Inclusion of json in list of standard data types
@ 2025-12-06 14:07 Bob Kline <bkline@rksystems.com>
  2025-12-06 18:27 ` Re: Inclusion of json in list of standard data types Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Bob Kline @ 2025-12-06 14:07 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

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?

-- 
Bob Kline
https://www.rksystems.com
mailto:bkline@rksystems.com





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Inclusion of json in list of standard data types
  2025-12-06 14:07 Inclusion of json in list of standard data types Bob Kline <bkline@rksystems.com>
@ 2025-12-06 18:27 ` Tom Lane <tgl@sss.pgh.pa.us>
  2025-12-08 18:33   ` Re: Inclusion of json in list of standard data types Erik Wienhold <ewie@ewie.name>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2025-12-06 18:27 UTC (permalink / raw)
  To: Bob Kline <bkline@rksystems.com>; +Cc: pgsql-docs@lists.postgresql.org

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.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Inclusion of json in list of standard data types
  2025-12-06 14:07 Inclusion of json in list of standard data types Bob Kline <bkline@rksystems.com>
  2025-12-06 18:27 ` Re: Inclusion of json in list of standard data types Tom Lane <tgl@sss.pgh.pa.us>
@ 2025-12-08 18:33   ` Erik Wienhold <ewie@ewie.name>
  2025-12-08 19:36     ` Re: Inclusion of json in list of standard data types Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Erik Wienhold @ 2025-12-08 18:33 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bob Kline <bkline@rksystems.com>; pgsql-docs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Inclusion of json in list of standard data types
  2025-12-06 14:07 Inclusion of json in list of standard data types Bob Kline <bkline@rksystems.com>
  2025-12-06 18:27 ` Re: Inclusion of json in list of standard data types Tom Lane <tgl@sss.pgh.pa.us>
  2025-12-08 18:33   ` Re: Inclusion of json in list of standard data types Erik Wienhold <ewie@ewie.name>
@ 2025-12-08 19:36     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2025-12-08 19:36 UTC (permalink / raw)
  To: Erik Wienhold <ewie@ewie.name>; +Cc: Bob Kline <bkline@rksystems.com>; pgsql-docs@lists.postgresql.org

Erik Wienhold <ewie@ewie.name> writes:
> 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.

Well, there is the weasel wording right at the start of that <note>:

    The following types (or spellings thereof) are specified by SQL:

This note also doesn't get into the rather large semantic gap between
what SQL says TIMESTAMP WITH TIME ZONE is and what timestamptz
actually does.  I think the point of the note is mostly to say that
"you have some hope of interoperability with other DBMSes if you
use these types".

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-12-08 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-06 14:07 Inclusion of json in list of standard data types Bob Kline <bkline@rksystems.com>
2025-12-06 18:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-12-08 18:33   ` Erik Wienhold <ewie@ewie.name>
2025-12-08 19:36     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox