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 1uVfLu-0039Ky-RO for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jun 2025 23:53:00 +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 1uVfLq-009qhw-Kh for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jun 2025 23:52:55 +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.94.2) (envelope-from ) id 1uVfLq-009qhn-8o for pgsql-hackers@lists.postgresql.org; Sat, 28 Jun 2025 23:52:54 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uVfLo-004e6q-0h for pgsql-hackers@postgresql.org; Sat, 28 Jun 2025 23:52:54 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5551a770828so33632e87.1 for ; Sat, 28 Jun 2025 16:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1751154769; x=1751759569; darn=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=XAPyrKRohsIzvFx+vN+jppG8mVAfejwk8jW8ZGwGvOY=; b=PkprJkCIv4nQb8L+aWjlvFQqxkWU5KWBFN+vWG+EVGIMW1ydtXU78jBQNaPwcRPLYa /iPtgvZUxRCwmgWmOZPPQbytmGGg4l3Nof/2hqVeyU9JGjiyCNnaDxR9PERvfv7tjbeR T5sWuvAOeTf5nBlEalvoN99Ly0nkwkDDksN626BoJPMNFF7wGFvqNKvbBS+qynrn45rP fdimpxoXcF/qTr4MXfxqDyt4OYcd0fu/ouNnZeUhOeDJ5lG5+PfuJ1duP//oSb14amo+ 7Z599HD1i3066scJcUrv5iIo6s9orLgYFrcYnIvW7ZjVI1sa9/YbQDFvcGcQWhxPiqlw 9Vpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751154769; x=1751759569; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XAPyrKRohsIzvFx+vN+jppG8mVAfejwk8jW8ZGwGvOY=; b=YI7LufKe0zQ09I7eccAEPE89o1VIGV7WviVcdKk1FMkHrPWmViY5t5xF8SUY6n6OWo AVsTQ+aXgQluDDxeX8E/sn6JkgKPXRw3+Pk7XERtCLug6JFdgriMUwYoiNhnG4vZ5qUk iJSpigxYNd+K5VlmtsXPe41yDgpiI2t+UHfa7ilecJygEuOnSwXE3uV/Xti5j+JRiFn/ GzaAyXeD2AGdKYfxRFcvFSDIpMcFF1CQ55iX0/mgkQ5LUSJRnp/zizL77E5Ux37bt+HI 0rb8KZW/hqUoaIq9OMguXY7aJZRqWtccVO5dBbDvuuJSL8ulu+FY/ww0mUlI6mjlk/Ou j+CQ== X-Forwarded-Encrypted: i=1; AJvYcCU1Ls2Q/Ubwpklo9szeB4nmYjk/4ePVZCAi317pY2MkIFbD3uS+c1Y5ZOP/g1eABpIepX1zLoooqNMozc8S@postgresql.org X-Gm-Message-State: AOJu0YyU4GXrL7K7Z9i8ljNyKB3k/aQBt0mJQu6uML1+3Kslxkpqyzxa vShv7/no+GGTViNiRckcLexH0owVwV1EQF98v0ax0knB4nx1D+jg1+9W03zy3wABnjHOJVT6Y/P D2LgTngy0xScdXkfUXEC2mu2af1V/slJOVsqREJmZ3w== X-Gm-Gg: ASbGnctqt/tTJUnYy9WkMioV1+0rL1ccczbJiu0ouk0LI27GKVDD0/58dDqX9MBmCDl hLMfz/e/ERdeFngPgEd+6+rzF8YM4H0lHZwCO67xCmIk8H/3aF9HpbvXsbQpwRbtaadWCWK+n35 L/4GJoJIbo7zgk0xrrr6vHbCwDA6hqZYEsw++nSLPf/6Uk X-Google-Smtp-Source: AGHT+IF6Hb19oWlCtasozsS2qzJghijtpA/oyRr6gOXBEZGMyQeLsbEe2FtjtxmaMAd9EpO6fcYdYjsPeigrhwfY8n0= X-Received: by 2002:ac2:4c4f:0:b0:553:510d:f470 with SMTP id 2adb3069b0e04-5550b85aab4mr3245467e87.4.1751154769095; Sat, 28 Jun 2025 16:52:49 -0700 (PDT) MIME-Version: 1.0 References: <21fa36b4-6d56-4556-b524-9e3955b922c8@eisentraut.org> In-Reply-To: From: Jelte Fennema-Nio Date: Sun, 29 Jun 2025 01:52:38 +0200 X-Gm-Features: Ac12FXy-U86Wy55KU21iUvv9D2pfEDLnk_g8nxEVMGQAcwdMw7-mrIemLFVXNz8 Message-ID: Subject: Re: SQL:2023 JSON simplified accessor support To: Alexandra Wang Cc: Mark Dilger , Matheus Alcantara , Peter Eisentraut , Andrew Dunstan , Nikita Glukhov , PostgreSQL Hackers , "David E. Wheeler" , jian he 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 Thu, 13 Mar 2025 at 15:02, Alexandra Wang wrote: > I have attached the new patches. Okay I finally found the time to look at this. I created a draft PR for pg_duckdb[1] to see if I would run into issues. There was only one real issue I found by doing this. The .* syntax is encoded as NULL in refupperindexpr, but that is currently already a valid representation of a slice operation without specifying upper or lower. The easiest way to reproduce the problem is: CREATE TABLE arr(a int[]); explain (verbose) SELECT a[:] FROM arr; QUERY PLAN =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Seq Scan on public.arr (cost=3D0.00..23.60 rows=3D1360 width=3D32) Output: a.* That last line should instead be Output: a[:] So I think we need to add a new Star node type, that represents the * literal after parsing. I haven't looked too closely at the code yet.