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 1wHIpq-0072eY-1P for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 10:05:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wHIpo-00DOSt-16 for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 10:05:00 +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 1wHIpn-00DOSY-0o for pgsql-hackers@lists.postgresql.org; Mon, 27 Apr 2026 10:05:00 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wHIpk-000000030gl-4BnF for pgsql-hackers@postgresql.org; Mon, 27 Apr 2026 10:04:58 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 14C221400114; Mon, 27 Apr 2026 06:04:56 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 27 Apr 2026 06:04:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1777284296; x=1777370696; bh=TVOPkrS/NR6XIF7Pynw6Q2WAdwTVkIKa 59Kh0Nmsy44=; b=h7kXPIyS9kZRdlXhXO/6tNpZQmNUG+Ozpuko9z6z97uxptrp v/C1isCi1MzMtioJGDm4asExkhX+TRgEJp1k2SVbBcbh/Vv8bUEy5sPO8sljTmIt 04pRwEVq+4/ifjI2uur86RACBWqHFt/+bOoVn1+liLLytHxeuSNHr4z0l1kmzj7a PdkjFhiCl53mMgCKhVdorbeNglxwym8W9vVyG9rw3MKT9n+Fx2ie2Dlm2J7yjWwh BglvRl2Zn2/L8pelc4dWLMSIvNrorCk2KsncDby2ucJr1zEEiIZxImonvzWj8kh5 HwK2FPPMU2XXEMVJJWzcJxAyF2fMZnaBHA1SKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1777284296; x= 1777370696; bh=TVOPkrS/NR6XIF7Pynw6Q2WAdwTVkIKa59Kh0Nmsy44=; b=K EFCZSwQ5S+vBdbXiZnfvP9OealteTUdhPq9NyXf0Np+fMxhvO1uV4hrUzB/BO4rb taVPR94U4Aqh3bLpPnl0HEqOLLIhicptOoHMg/Kkbtud4bXcw9CkByYJswDXL9xo Oe45bEuBQPixN+y+aWJCONBVU1ofScoKYlPZuQPYyqrajNX+HNHQE6x0bYz1tunC bO/8RM23a3h3lyWA/pQHz+8V8UQaO+wnfQFKIxX3PTji491I+IOAbzoLVWIbDVQe P/WsuPdOT3p/NO84Wqzr+sbB3OXRrjOF6kim3EywgHiMqCkUDpTKGShUKQ8RO9DE t+J5LjU2sarPyygDUC6LQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdejkeegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueetvdff udekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhirghnrdhunhhivhgvrhhsrg hlihhthiesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhs sehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehpjhesihhllhhumhhinhgrth gvuggtohhmphhuthhinhhgrdgtohhm X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Apr 2026 06:04:55 -0400 (EDT) Message-ID: Date: Mon, 27 Apr 2026 12:04:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: FOR PORTION OF gram.y target_location seems wrong To: jian he , PostgreSQL-development Cc: Paul A Jungwirth References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 24.04.26 03:10, jian he wrote: > Hi. > > | FOR PORTION OF ColId FROM a_expr TO a_expr > { > ForPortionOfClause *n = makeNode(ForPortionOfClause); > n->range_name = $4; > n->location = @4; > n->target_start = $6; > n->target_end = $8; > n->target_location = @5; > $$ = (Node *) n; > } > > n->target_location = @5; > > Should be > > n->target_location = @6; I think the existing code is fine. The target consists of the start and the end value. If we pointed to @6 then one could be confused into thinking that only the start value is meant.