Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSg6a-003Orm-1o for pgsql-docs@arkaria.postgresql.org; Mon, 08 Dec 2025 18:37:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vSg6Z-0014Pv-0G for pgsql-docs@arkaria.postgresql.org; Mon, 08 Dec 2025 18:37:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSg3Y-0012q8-3A for pgsql-docs@lists.postgresql.org; Mon, 08 Dec 2025 18:33:57 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSg3V-003nf7-2O for pgsql-docs@lists.postgresql.org; Mon, 08 Dec 2025 18:33:56 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4dQ9bs1MTkz9tgx; Mon, 8 Dec 2025 19:33:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1765218825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NjOyxRXZXqCA+AW5QbUrDNalrRaoCnTdnCbpK5V9V54=; b=j44G6Oh3EsDvCjMyekuoEUe3E6jmE+FJJ9pviOouBlq9CB7WRlXBEtaTONQ6rvPGT6zbuJ 4H2OFjMLzNiEoZPyphkNuXVlm8Rd+ETOj61XmQtaXrYZAC1ws1NYgVq4MAsiX+cEQTpnFD YbxwgFTqIPPV921VP+NNyq5HPGw5QTpp5PtUXLpDCKH+SwWO+sfmTQx+xEChS3rKo9N4v7 MCXh/tDmbJUT6lm/s4x4HexkmCxBVDUqGHucouUfMGd49ac16hi/OcAhRv1BL1wALWzwco WtdWkVK8JrRUmBm8s6DTyyEoTwV1yf1c9W6JB6jDHxDf0UsqAGs7noU895gjkw== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of ewie@ewie.name designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=ewie@ewie.name Date: Mon, 8 Dec 2025 19:33:42 +0100 From: Erik Wienhold To: Tom Lane Cc: Bob Kline , pgsql-docs@lists.postgresql.org Subject: Re: Inclusion of json in list of standard data types Message-ID: <31bad2c4-1876-4cfe-9463-08f4b02bf536@ewie.name> References: <2326014.1765045678@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2326014.1765045678@sss.pgh.pa.us> X-Rspamd-Queue-Id: 4dQ9bs1MTkz9tgx List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-12-06 19:27 +0100, Tom Lane wrote: > Bob Kline 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