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 1ueKQV-007tht-Ne for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 21:21:32 +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 1ueKQU-00E2cr-N4 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 21:21:30 +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.94.2) (envelope-from ) id 1ueKQU-00E2YS-C1 for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 21:21:30 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ueKQQ-000Gik-0G for pgsql-hackers@postgresql.org; Tue, 22 Jul 2025 21:21:28 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 58D8E44368; Tue, 22 Jul 2025 21:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgresfriends.org; s=gm1; t=1753219283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0YkLXzHV6wP4vVU3BhBpn5dBWQpE192MudjAPcs88PU=; b=esFLhCO0Cg9H8Zdm70+hz5pHW7J2jH8IE2SdkJg8TPbP28ZJNXvHO+9uzixKo8Ozyjwe2k Cr66hY4STbbuy02Mr8W/4YBSmZUvlg6ymFjDV5v1FbL905svgFLkVRphjh3YkdRgGLcFs1 SVjTdWkxc2EHwGwkcvVzjWpgLUbKLF5Ol8dTNNvODtHFKjFTcNb4SvJgfSYJ9P5frWVXkY FJ9kh9WeqCsE/cgwvtw0nDJGZWVYJBK98vW3nRaKwnhy+W+WCWVT6cidLeofF/8IyA++W/ 39yoEKo+y6HBPAP1SuxvYWVL0+AKY/8ZhnQdePej39i78IM32+6fq0JcotC/Vg== Message-ID: Date: Tue, 22 Jul 2025 23:21:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Proposal: QUALIFY clause To: Matheus Alcantara , Marcos Pegoraro Cc: Pg Hackers , Peter Eisentraut References: <6c998e4f-f6f2-43c2-8b67-cfff360ef241@postgresfriends.org> Content-Language: en-US From: Vik Fearing In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejheeliecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeggihhkucfhvggrrhhinhhguceovhhikhesphhoshhtghhrvghsfhhrihgvnhgushdrohhrgheqnecuggftrfgrthhtvghrnhepuddtveefleegvddutdejhffhleehhfevheeilefhgeettdeuhfdtffegvdfgteffnecukfhppedvrgdtvdemkeegvdekmeduudgvtdemvdejtddumegrgegvudemgedvfhegmegrlegrkeemkegvieeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddvmeekgedvkeemudduvgdtmedvjedtudemrgegvgdumeegvdhfgeemrgelrgekmeekvgeikedphhgvlhhopeglkffrggeimedvrgdtvdemkeegvdekmeduudgvtdemvdejtddumegrgegvudemgedvfhegmegrlegrkeemkegvieekngdpmhgrihhlfhhrohhmpehvihhksehpohhsthhgrhgvshhfrhhivghnughsrdhorhhgpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepmhgrthhhvghushhsshhilhhvleejsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgrrhgtohhssehfuddtrdgtohhmrdgsrhdprhgtphhtthhopehpghhsq hhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-GND-Sasl: vik@postgresfriends.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22/07/2025 20:54, Matheus Alcantara wrote: > (this happens on transformQualifyClause() if you want to take a look) I took a quick look at the patch (without applying and testing it) and it seems to me that parse analysis is the wrong place to do this. We want ruleutils to be able to spew out the QUALIFY clause as written in a view and not as transformed.  If we are going to go down the syntax transformation route, that should happen in the rewriter at planning/execution time. -- Vik Fearing