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 1vvc5E-00AGma-2T for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Feb 2026 14:11:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvc5D-00CuRc-2C for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Feb 2026 14:11:15 +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 1vvY8P-00Bg9y-1N for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 09:58:17 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvY8C-00000001H4D-1ouy for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 09:58:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=C1ydtmRDshW3Ze2r02Y2onslNGdv1GEHqWJ9GQS2PUo=; b=Beyl7sjUykrJ6EKUsNAc910bMK HKrPPWyR5iLDYvtdr53ZKpEn8iNNxaOE8ozSIZ9Z4EnLBjxj37PsNoKu+kAklzl2pNi05gZWJTLJ6 TsevB0Atcetx94dyUwIBDDBhdTSzxJ4Cry9RpcMPh95kH5f4UhQlQHuOJxAO8tylxiOuDFxac0LSc /mtBP2tXgcUzjSZqjXWa4EJpy+H5PcnyEcNqV9FpSiUq5b/xIcF0TrIYSalOaTEZuXRwFmrcJDBGY 1Eul5cj4S2RbKkLcNByQ8hCfWNm6735PWbumimwLwPH/9E9CSPAMwoWC/aFee8EqhoPdainI2u6xG QSCiyD0g==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvY8C-003lGN-0k for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 09:58:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvY8B-00CITv-2P for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 09:58:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: lukas.eder@gmail.com Reply-To: lukas.eder@gmail.com, pgsql-bugs@lists.postgresql.org Date: Thu, 26 Feb 2026 09:57:50 +0000 Message-ID: <19418-591ba1f29862ef5b@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19418 Logged by: Lukas Eder Email address: lukas.eder@gmail.com PostgreSQL version: 18.2 Operating system: Linux Description: =20 When using the ISO/IEC 9075-2:2023(E) 6.34 syntax, 6.34 GR 4) b) i) says that empty tables should produce a JSON array with no elements (intuitively), not NULL. Try this: select json_array(select 1 where false); It produces NULL, not []