Re: 10% drop in code line count in PG 17
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-20T21:15:04Z
Lists: pgsql-hackers
> On 20 Nov 2025, at 21:30, Bruce Momjian <bruce@momjian.us> wrote:
> Yeah, that's part of a larger discussion. In an email I just sent I
> suggested we are trying to count files that are part of a cluster
> install, rather than testing files, but again, needs discussion.
Right, but that was sort of my point, you are counting lines which aren't part
of the cluster install since src/test has lot's of C code which is just tests.
$ find src/test/ -name '*.[chyl]' | xargs cat|wc -l
23587
And the cluster install does contain C++ which isn't counted for.
$ find . -name '*.cpp' | xargs cat|wc -l
1485
Counting just lines in a cluster install is a valid use case but the script
might need some adaptations to match the current tree.
--
Daniel Gustafsson