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 1v7Vde-003mRt-Is for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Oct 2025 09:11:42 +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 1v7Vda-00Fjk5-CW for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Oct 2025 09:11:39 +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 1v7Vda-00Fjjx-2d for pgsql-hackers@lists.postgresql.org; Sat, 11 Oct 2025 09:11:38 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v7VdU-001B37-0Q for pgsql-hackers@lists.postgresql.org; Sat, 11 Oct 2025 09:11:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=LOVp83cKT8jH2M+9ydVTEzR/zM4pIWZtxwIPwDFVvDQ=; b=n24PZJDpCPm1HQGx0NiYDcCJ7M RZIVJ3sfsuvoupvl9zcAVZG4Dk5p4ALVdS2srlovS5FHCRMbx+PDqReU4w0H7MetfQ3d7AEn74eok p/69P85/tImDuejY/JddXLXzKs4YzwdJDi2TE8Gy3ASH1+OBt74S/szN7RGpyg1ycoK60N3FOLhNi LUjw70rab9FzMWohxixbu9dr6QaRO57+d7vZ5f7IwkRnuGxe2Ti9FoX89dw4Urmh7wfjSXBFEIfcg 6F+fo90QukBi+PReyMeQM5yeXIQDpAUgiiNwSsLcOEhc3Nqg/8MAxDMD76/JtV1TlMFMyRzcrcXON 8ztOIfXg==; Received: from [2409:11:4120:300:4d6d:f911:9497:12fc] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v7VdG-004DVs-1z; Sat, 11 Oct 2025 09:11:23 +0000 Date: Sat, 11 Oct 2025 18:11:03 +0900 (JST) Message-Id: <20251011.181103.1209570651155443747.ishii@postgresql.org> To: tgl@sss.pgh.pa.us Cc: pramsey@cleverelephant.ca, ojford@gmail.com, peter@eisentraut.org, li.evan.chao@gmail.com, krasiyan@gmail.com, vik@postgresfriends.org, andrew@tao11.riddles.org.uk, david@fetter.org, pgsql-hackers@lists.postgresql.org Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options From: Tatsuo Ishii In-Reply-To: <20251011.090731.1451293026979559494.ishii@postgresql.org> References: <20251008.093117.1326499841464447981.ishii@postgresql.org> <2952409.1760023154@sss.pgh.pa.us> <20251011.090731.1451293026979559494.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:4d6d:f911:9497:12fc (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> I think it should be set up >> so that if the window function fails to call that, then something in >> mainline execution of nodeWindowAgg.c throws an error when there had >> been a RESPECT/IGNORE NULLS option. With that idea, you could drop >> the allowNullTreatment argument and just have the window functions >> that support this syntax call something named along the lines of >> WinAllowNullTreatmentOption. > > Does that mean all user defined window functions start to fail after > upgrading to PostgreSQL 19? I am not sure if it's acceptable for > extension developers and their users. Probably I misunderstood what you said. Now I realize what you are suggesting was, throwing an error *only* when a RESPECT/IGNORE NULLS option is given and the function did not call WinAllowNullTreatmentOption. If the option is not given, no error is thrown even if WinAllowNullTreatmentOption is not called. I am okay with this direction. I will post a patch for this. Best regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp