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 1wFiLk-005Swm-30 for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Apr 2026 00:55:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFiLk-00FriD-0h for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Apr 2026 00:55:24 +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 1wFiLj-00Fri5-35 for pgsql-bugs@lists.postgresql.org; Thu, 23 Apr 2026 00:55:23 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFiLh-00000002KmI-3XMR for pgsql-bugs@lists.postgresql.org; Thu, 23 Apr 2026 00:55:23 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-40423dbe98bso2578910fac.2 for ; Wed, 22 Apr 2026 17:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776905721; cv=none; d=google.com; s=arc-20240605; b=OiliLKzMyy0SvHBDba0+ly73zAE/lHns5wGf64kEihGaV/GQaAQU78ax1CdnYwBr2R LHavKb3+dxK10eUt+CM61BLxnL0jef+3Is0yinq0OdRj+jRFfqtKqmCQXpHCZGs5rMXr 0A5ncoI1h6+MhPt7ete++dsNupryOUFbyjOdzGvuL7/g0EeUQWFs9IWNSLFXTtEYz1rH bsak8ghDl87VJrlPg8Bo+lrIk6s2T+F823Bq5KmvlMMDYtk4iTRaDQPeFavfbpsoNKCB VX8+h9U+FlOPU1FHoTitYJKyxRabd9Cp02CvyeIuH/xHH+kIE0zYGiJyJVLMreHwEjBS E7YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gn9o7AAH5UeChz2PLZ7/pQs4iRH89a/lq2JEERfiDS0=; fh=69QMwEPJQOFjQUUapJ59ArhIh08bOv7s6mnBWviPz8s=; b=iF1coG5NIwtjTEP1KsoSXC/LT2+5dSKzVlWJDc8vuPgUIdR24HqA6eakQTh4gdLhKV bB7/NExUy2memyNFI5UcWTlvmaOotjyTIPuKgQiogBWYl0x5l/T70xBOL//wlVAShXWC Ac3OxsauNRIiz1C70MhR2n2b16zQ4p48dIpoqCJA5++SC3k2tpRWTW2kylmo7G81us+i q/Z7nDilPELbSAlpdLIzh9N0A7e0ttrFEw+ClgB1V9tefdjCEHhE1qWbZisVL+DoL9gQ oy3WDzhU54izg0qxs6lROrjwEc6gtVYwBY0q/8SJp9qU5ACQWrHm4iXdQ8VSgmNBJuiK Dfyg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776905721; x=1777510521; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gn9o7AAH5UeChz2PLZ7/pQs4iRH89a/lq2JEERfiDS0=; b=O3K8fHgtF4d9aJG9X0aebxlKe4bSxVW+ltifgXIw0XVhBfdJ1cVPhrOeu5o9gLShzB J0dq0FvdGj1ixL90umyYNznW9AX5E2dT1PUbqwEoiPWVYNnQ6iE+7LbGvBTx5oLDQThJ 09MAt/oog71dCCmJgOpOgzPiYjbHu3P/cIMxm/DQy50L/lugNkGXUVA1qf1Zc3VOM8Pc +CJ0xFx7jtIaugtaMY8JiuaD6SiCduP+0GNV34ZJmb0V7UhFHHXjfqyaWGbN+UVlaa3V 0dZaExJTMdqIipVdC14Abl86qM4CPQ1RkWmWEjmlT+T2+Y7lyTSzdgrJd6m28yoNg4v+ 1Uhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776905721; x=1777510521; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gn9o7AAH5UeChz2PLZ7/pQs4iRH89a/lq2JEERfiDS0=; b=P+ZD/RhRK0XzQgLh5W6AxsJ+z/uYkS7g3+0jzU7ZXX1Y9yu+RrcreNl13/3JoXszmH ejRFMXgfuVv2vypMyBR7hsYKnZMgAYrQ3ydcEPNseDuZprytmMrlvksM8L51jyFzK73Q k0XpYQtLXAfHKThzZjctR4/j+Ed4vkcPNf8YNGN3PKEnXslh/VzZrhluj/negxRs1bDu U9WysaPZCcKJC9Ze9euOWGaLs4Qt7WX4s5YkAXBoXLW7u6/ZTHzpfk+wRFk5nXbSCKzO j5coTi6kYZq1mvgMd7eUw3rQ2zQdCvDBMnQri6OxxCL/lhHocRGepHTr4BDyYNgjvoXm mppQ== X-Forwarded-Encrypted: i=1; AFNElJ+HVsyXpEVmP8k770m6DxigRwt2uHFcz0rGJcSiIyYSHZQ049dw9qnQJLGJhOdFyKkyMeGOXssXBbL1@lists.postgresql.org X-Gm-Message-State: AOJu0YzjVbs4Z58AFlNhftcJyjnb+8ydRB7xoORtEjJfwR43LXKuZbdY zjyuJt6k8BeVbh/l2NPqtkBGX8LH7Kxv91FZwbWDj0fGK2904XCzVrns4HCjxMvSfAHvwccW0Fw 3Guw0xiJon6MkmCxA8zFZqhHPJftUPlI= X-Gm-Gg: AeBDievBnXuYtgZQsyYRunm9KKj2kyvl4/6scUk7mmcXYP15fwyFWVO7BEak4YdfAup bY2NMLAHvxUKomqd7oLDkFrZ/6HOq3prbeuR8rQkAOzVZv81EpgOZV/M5n15rtN8dZGMzjSHcTw r9+Ppa+Xk/yxTdGkvJ304m8HYdUGKU8tpMJOdm1+XC5OXg1pMxViXKSeCOmCWRuCQRuVrahcdvC JQsZm0nzke4BDGLFfQQB2JCp7rRL2cVyhEcd1mWRQvMF4zHg0j7eD8EQKnlQGxrmYOnV+476Xam AHBdvwmL481inZ/n36CHErfOrtb7o6A= X-Received: by 2002:a05:6820:220d:b0:67b:f12a:dfc1 with SMTP id 006d021491bc7-69462ee3109mr12733060eaf.33.1776905721444; Wed, 22 Apr 2026 17:55:21 -0700 (PDT) MIME-Version: 1.0 References: <19418-591ba1f29862ef5b@postgresql.org> <2abdb464-27f5-4759-bb0b-f09ab5b5ceab@postgresfriends.org> <501040.1772433449@sss.pgh.pa.us> <485641.1776738632@sss.pgh.pa.us> In-Reply-To: From: Richard Guo Date: Thu, 23 Apr 2026 09:55:10 +0900 X-Gm-Features: AQROBzC1qQMsjj8FOHwB9QFGYdyMx91ky_L7ff54tMltpULflReTrJ_7pkNEO8Y Message-ID: Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 To: Tom Lane Cc: Amit Langote , Vik Fearing , lukas.eder@gmail.com, pgsql-bugs@lists.postgresql.org, rmt@lists.postgresql.org, =?UTF-8?Q?=C3=81lvaro_Herrera?= , Nathan Bossart , Heikki Linnakangas , Melanie Plageman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 21, 2026 at 12:20=E2=80=AFPM Richard Guo wrote: > > On Tue, Apr 21, 2026 at 11:30=E2=80=AFAM Tom Lane wro= te: > > Richard Guo writes: > > > Another question I'd like to raise: is it OK to commit this patch to > > > master given that feature freeze has passed? I think the answer is > > > yes, because this is arguably a bug fix rather than a new feature. > > > However, it does change user-visible behavior, and existing app code > > > that relies on the NULL behavior would break. So if we commit it, we > > > need to add in the release notes about this incompatibility. > > > Well, if we definitely intend to commit a compatibility-breaking > > change, I think it's better to commit it sooner not later. If we > > wait till v20, all we accomplish is to give users another year to > > write code that depends on the old behavior. > > > > However, usually at this stage of the cycle the answer to such > > questions is "let the RMT decide". Take the question to them > > (cc'd). > > Thanks Tom for the suggestion. Not sure the RMT mailing list works or not, maybe I'd better CC RMT members. - Richard > Hi RMT, > > I'd like to commit a fix for JSON_ARRAY(subquery) behavior that > involves a user-visible incompatibility, and would appreciate your > go/no-go since we're past feature freeze. > > Summary: > > - JSON_ARRAY(SELECT ...) currently returns NULL over an empty result > set, but the SQL/JSON standard requires it to return '[]'. Fixing > this changes user-visible output. > > - The same patch also fixes a deparsing issue: views defined with > JSON_ARRAY(SELECT ...) are dumped back as the internal JSON_ARRAYAGG > rewrite instead of the original syntax. > > - Richard