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 1vs1o0-001SFD-2P for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Feb 2026 16:50:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vs1nz-0046n0-1J for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Feb 2026 16:50: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.96) (envelope-from ) id 1vs1nz-0046mr-0P for pgsql-hackers@lists.postgresql.org; Mon, 16 Feb 2026 16:50:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vs1nw-00000000vAr-3enS for pgsql-hackers@postgresql.org; Mon, 16 Feb 2026 16:50:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 61GGoYTZ1133419; Mon, 16 Feb 2026 11:50:34 -0500 From: Tom Lane To: Andrew Dunstan cc: Akshay Joshi , pgsql-hackers Subject: Re: [PATCH] pgindent truncates last line of files missing a trailing newline In-reply-to: <3bd49b59-7a87-4ab6-9eac-59b5d9cb78de@dunslane.net> References: <3bd49b59-7a87-4ab6-9eac-59b5d9cb78de@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Mon, 16 Feb 2026 11:28:58 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1133417.1771260634.1@sss.pgh.pa.us> Date: Mon, 16 Feb 2026 11:50:34 -0500 Message-ID: <1133418.1771260634@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > Yeah. I wonder if we shouldn't be just ensuring that there is a line > feed at the end of the buffer, i.e. add one if it's not there. We > shouldn't be adding files without a trailing LF, and ensuring there is > one seems like a reasonable thing to do in pg_bsd_indent. +1 regards, tom lane