Re: [PATCH] pgindent truncates last line of files missing a trailing newline

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgindent truncates last line of files missing a trailing newline
Date: 2026-02-16 16:50:34
Message-ID: 1133418.1771260634@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2026-02-16 17:03:26 Re: race condition in pg_class
Previous Message Andres Freund 2026-02-16 16:48:38 Re: index prefetching