diff options
author | Álvaro Herrera | 2025-03-13 16:38:21 +0000 |
---|---|---|
committer | Álvaro Herrera | 2025-03-13 16:38:21 +0000 |
commit | da0f0582e81e2fc42e19feaece56364acfb3f640 (patch) | |
tree | 23931153fe0c68d83c643e07d58be9e0c23a7d6c | |
parent | 0697b23906adabccba41fa7bf19909eb98bdf0dd (diff) |
Make lwlocknames.h generated file less ugly
We can make the output look a bit better by aligning each lock's
definition, so add some padding space to achieve that. This change
makes no practical difference, but casual onlookers will be less
distracted by (lack of) whitespace.
Author: Gurjeet Singh <gurjeet@singh.im>
Discussion: https://postgr.es/m/CABwTF4VxfwDtRV-H22_XK4XeDogaV-Vaobu+af5U=8ZAZn9ZZQ@mail.gmail.com
-rw-r--r-- | src/backend/storage/lmgr/generate-lwlocknames.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/generate-lwlocknames.pl b/src/backend/storage/lmgr/generate-lwlocknames.pl index 084da2ea6e0..4441b7cba0c 100644 --- a/src/backend/storage/lmgr/generate-lwlocknames.pl +++ b/src/backend/storage/lmgr/generate-lwlocknames.pl @@ -108,7 +108,8 @@ while (<$lwlocklist>) $continue = ",\n"; # Add a "Lock" suffix to each lock name, as the C code depends on that - print $h "#define ${lockname}Lock (&MainLWLockArray[$lockidx].lock)\n"; + printf $h "#define %-32s (&MainLWLockArray[$lockidx].lock)\n", + $lockname . "Lock"; } die |