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.94.2) (envelope-from ) id 1qjnqR-00CAQm-2K for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Sep 2023 21:37:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qjnqP-007hrO-AG for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Sep 2023 21:37:49 +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.94.2) (envelope-from ) id 1qjnqP-007hr3-0t for pgsql-bugs@lists.postgresql.org; Fri, 22 Sep 2023 21:37:49 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjnqL-0065pR-Eq for pgsql-bugs@lists.postgresql.org; Fri, 22 Sep 2023 21:37:47 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id A11F71BF203; Fri, 22 Sep 2023 21:37:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------Y8PgLJ0NhgJZjU0un2rGjLMz" Message-ID: Date: Fri, 22 Sep 2023 17:37:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: why are null bytes allowed in JSON columns? Content-Language: en-US To: Wyatt Alt , "David G. Johnston" Cc: "pgsql-bugs@lists.postgresql.org" References: From: Andrew Dunstan In-Reply-To: X-GND-Sasl: adsend@dunslane.net List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Y8PgLJ0NhgJZjU0un2rGjLMz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-09-21 Th 21:57, Wyatt Alt wrote: > Thanks for the clarification. I now see the "Note" above the table > explains this. Essentially the json data type allows anything that is syntactically valid according to the standard.  That doesn't mean that functions operating on the type can always work, and this is the most obvious of such restrictions. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------Y8PgLJ0NhgJZjU0un2rGjLMz Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2023-09-21 Th 21:57, Wyatt Alt wrote:
Thanks for the clarification. I now see the "Note" above the table explains this.


Essentially the json data type allows anything that is syntactically valid according to the standard.  That doesn't mean that functions operating on the type can always work, and this is the most obvious of such restrictions.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------Y8PgLJ0NhgJZjU0un2rGjLMz--