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 1vBkja-004hU6-7x for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Oct 2025 02:07:21 +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 1vBkjZ-002gjO-7T for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Oct 2025 02:07:20 +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 1vBkjY-002gjD-UM for pgsql-hackers@lists.postgresql.org; Thu, 23 Oct 2025 02:07:19 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vBkjV-003iNz-1u for pgsql-hackers@lists.postgresql.org; Thu, 23 Oct 2025 02:07:19 +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=mrpoNcofDLl5UI20syy+35MTo5LMtERLDzkbnuLeZWk=; b=AJyDGd5mC6i/QdyiQCIXddmTqV IKPpRkG1/VDcO6Z22oEEzMM9BR0pOR1UxJFntLB1qgqAMMy1NhpFf0S8IQ9cSAB0WXCRBsBRePWFq 47AhA+nW1yPO7YcVLpruyxYEvq5zNUr+EeAKQrCy/o5+NgweXgOE5+Bdro6moLGOFBmbkxOw1Ecfs +tXpTIoJNJyuA4N4ptFrK+taI8ed20FnR2z8SB0MFoRDG7vE4EPrvOgJe/+Op0HmtQxRhvLXButy3 VpwLk7q9Me+irsgeXSkjlWsr1TJH4aGAPiWm7znWdwlh+IDD8JOsZy/DUCSxoDMAZXImJGq3Et+ni xO/oB9Aw==; Received: from [2409:11:4120:300:10fd:cbd6:bc:56ff] (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 1vBkjS-008h3m-24; Thu, 23 Oct 2025 02:07:16 +0000 Date: Thu, 23 Oct 2025 11:06:59 +0900 (JST) Message-Id: <20251023.110659.292357580714448419.ishii@postgresql.org> To: dgrowleyml@gmail.com, li.evan.chao@gmail.com Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, pramsey@cleverelephant.ca, ojford@gmail.com, peter@eisentraut.org, krasiyan@gmail.com, vik@postgresfriends.org, andrew@tao11.riddles.org.uk, david@fetter.org Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options From: Tatsuo Ishii In-Reply-To: <20251022.144911.1367366293633639433.ishii@postgresql.org> References: <20251020.125847.997839131426057290.ishii@postgresql.org> <20251022.144911.1367366293633639433.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:10fd:cbd6:bc:56ff (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> On Mon, 20 Oct 2025 at 16:59, Tatsuo Ishii wrote: >>> >>> > A very trivial commit: >>> > >>> > ``` >>> > + else >>> > + >>> > + /* >>> > + * For other cases we have no idea what position of row callers would >>> > + * fetch next time. Also for relpos < 0 case (we go backward), we >>> > + * cannot set mark either. For those cases we always set mark at 0. >>> > + */ >>> > + mark_pos = 0; >>> > ``` >>> > >>> > The empty line after “else” is not needed. >>> >>> That was added by pgindent. >> >> If it's written down somewhere, I can't find it, but the rule we >> normally follow here is; don't use braces if the code block has a >> single statement without any comments that appear on a separate line. >> Otherwise, use braces. > > Oh ok, I didn't know that. > >> Since your comments are not on the same line as the statement, it >> should have braces. I imagine that's why pgindent is "acting weird". > > Attached is a trivial patch to follow the rule. Patch pushed. Thanks. -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp