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 1wF1ev-004fsN-09 for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Apr 2026 03:20:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wF1es-005ZWe-1G for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Apr 2026 03:20:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wF1es-005ZWW-0Q for pgsql-bugs@lists.postgresql.org; Tue, 21 Apr 2026 03:20:18 +0000 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wF1ep-00000002EQt-3wJC for pgsql-bugs@lists.postgresql.org; Tue, 21 Apr 2026 03:20:17 +0000 Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-7d4be94eeacso3819164a34.2 for ; Mon, 20 Apr 2026 20:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776741614; cv=none; d=google.com; s=arc-20240605; b=kWinKENdULdMKEiiTwY99L/+qNwaIV0PQW6GfkBdNgj8Mu+LOBXUpnNBYUZcSMUnft ItcEAC7SmSB5gRqeXrSm3zSoxmE538pLENdEgX7Mu2A5cI3akKTsIEFoBj8Tb/WUlCwB 5qU1/iZnW0JL3aRU329EFR9WYq/sTBqJrirtM187zZmhTzatQcHcPpoCcRffWKRSE+8j bEn4jtAI5HjIf6xQeZu4wojfLZeBbWreve1mGMI8bwzMGkgZbObSDAgfOBFOVtOovW+t mWSfVgDUlxYrNvFgSZ7G6rdcQKE53RKLtDV9jLUXTVxVgAQZhCkDOFy8vz6c8ND4CBEq t4Uw== 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=X7T9CA/awjpKdzoMcdrof3Fq5u01wiFyUyJRHLquNLA=; fh=9Z+41npJh8qSftJ01Y6t9IzuS350i+UY54au/lCVWV0=; b=FAy72QklbA5qjj7bukVvsttdOcgwui/yZU+zaZ2DboMoblDtD1fcCvWXtHNDaLdFob krlVx+gswZxi/vR8Qi4aYi7WIi+SZfztR2o2bno/pDaIyR67EPCDVWhjsesW2Bi40y2K MX9S18CvKHTKo4cY8Bnew9V8iQeltwmZr0bTqxYdO7o8+EboL/yzyYYLYZNDCBzJu4+f gs+eSPTyKY8ygEP213sg3UYbwnG8+gaBdWkvN2QIL8zmzhSBzf6SPuo6iN68r88ZCTCt DvfmRCq+0AbmYLHsRxh1/w0S8Hcj637q5UU+F2DGRfaCkg2OizHpCRkQEZcRPKk5bshl S9uw==; 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=1776741614; x=1777346414; 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=X7T9CA/awjpKdzoMcdrof3Fq5u01wiFyUyJRHLquNLA=; b=JB7n7zBCIuauFbaKBrFZMNOQvJ7LUr4R74tkQeT46BASPjprQPFE9adfY3+NHe0WXy s0J4HB93szDlvAB3oUK2JhUa+GGE9PrSsQCwVUkbDOUyvZk5HwnQd1HLKNAFFaE4jUJw 6dJA8OySiGiQhy7Vwx94KY5UUlqOFaqH01iWoxmBMFMsudcDR6CFU7xpuWlNBQDbcGP4 kazAogRK4l5HnFEbx0PMNRDUADS2ugo8q+DZ8kX+klxrniQAzcqBfg/g5uxa/W9szw+p U+L0y+QlhLqahgqCAddXxldtSMaHSL5k2bdchnhA9vSt5e9kDW/HFJDXxrJHQekhh2No ZYbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776741614; x=1777346414; 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=X7T9CA/awjpKdzoMcdrof3Fq5u01wiFyUyJRHLquNLA=; b=p5dZMoQtl917Eni1ic/eaR6uXCm6VNyBcPyPmUTY5ttqn+CQPDOwSXXz/05+s77drP Yijo7n21sPrycUjntNbBfIxBXKVwC/g/TMPWd06lYNgCx2ACnQr89nA0llEk1YDyc3D4 7rs8hvA647XpjslSpqTmf7a8uyp3rZbFhRnYfmx0mP3L2gNQAbFKrAEk2pCh30VqzrTg 6P3IoDEG7/4XAjGoLi9+ldhRKrIAbD44wtF9WqE5CTYYHT1GiNAHIHFUEzzCD4pxsu5O LnKpeqjhrxe4e4zIeHcoKQLcl6gKsChUP3h3hOMaEIr4tdjNJgmsqw0w3sHnwV0ctv8b WzpA== X-Forwarded-Encrypted: i=1; AFNElJ9/6OBCzWHGOKgNbnuBeLA+LWIinGxFRfh3He1M9H1aykjha/RHFRrNdR+/mdJlvJhMBLifjwx28tvq@lists.postgresql.org X-Gm-Message-State: AOJu0Ywj/uyCxtnta24HbsunXT+PQAHTqzyxFNYgJrNfoSOg8uUEwB7y FKisEEHAY/ntQZirBOIGjEDEHNyr3PO99Z7RQRengA1UFqjnD7TQXAlUs1gLY6GtRqdsc2aPjyS s+u+dSfTJ5Qio9F+yXwLqR956er25kJY= X-Gm-Gg: AeBDieu4AK3ccUdmryDkrPP1AXoMlyYfZKWuOb85LP5LLagNXBiX6Q/TNVjkeRA+Q8X 4nLn6uxrU1oT64W5KuYVbjUfmibwgUoeSafITsbyKLoVVDNqo0wT925fspS9QvU4RtyA402HAH3 4/IrmDuH+8DykSiqVUjR4pPQRJPJyBiijaD/YgyXQbPbU0hPcvKkRjP3yXasZ3ayUYDJnWdxO8q QNNJP1Soh+Ltq82UT/RQtwEs/YFQ+z+iN/RbhCOTnjN+R4B+KIkeWmECk3mUfXIeM68PKvAyeaZ 8jpkEyCub03yIlCxUZt1 X-Received: by 2002:a05:6820:f033:b0:67e:1380:a053 with SMTP id 006d021491bc7-69462ef4353mr9060662eaf.40.1776741613813; Mon, 20 Apr 2026 20:20:13 -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: <485641.1776738632@sss.pgh.pa.us> From: Richard Guo Date: Tue, 21 Apr 2026 12:20:02 +0900 X-Gm-Features: AQROBzBlbD_6ivm3LrJwYADXYGSa0ubrFKAqll7umekwKW8A7jlFTtyFMhtV-4c 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?= 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 11:30=E2=80=AFAM Tom Lane wrote= : > 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. 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