02.11.2023 18:22, Bruce Momjian wrote:
Third, I have come up with the following shell script to test for proper pgindentation, which I run automatically before commit:
I would also suggest using a script like attached to check a patch for new unicums (usually some of them are typos or inconsistencies introduced by the patch). The script itself can be improved, without a doubt, but it still can be useful as-is. For example, for a couple of arbitrarily chosen today's patches [1] it shows: .../postgresql.git$ check-patch-for-unicums.sh .../v4-0001-Make-all-SLRU-buffer-sizes-configurable.patch New unicums: cotents: ./doc/src/sgml/config.sgml: Specifies the amount of memory to use to cache the cotents of ==== .../postgresql.git$ check-patch-for-unicums.sh .../v4-0003-Partition-wise-slru-locks.patch New unicums: bank_tranche_id: ./src/include/access/slru.h: int bank_tranche_id, SyncRequestHandler sync_handler); CommitTSSLRU: ./src/backend/storage/lmgr/lwlock.c: "CommitTSSLRU", CommitTsSLRULock: ./src/backend/storage/lmgr/lwlocknames.txt:#38 was CommitTsSLRULock ControlLock: ./src/backend/replication/slot.c: * flag while holding the ControlLock as otherwise a concurrentctllock: ./src/backend/access/transam/slru.c: * ctllock: LWLock to use to control access to the shared control structure. cur_lru_count: ./src/backend/access/transam/slru.c: * Notice that this next line forcibly advances cur_lru_count to a
... [1] https://www.postgresql.org/message-id/CAFiTN-uyiUXU__VwJAimZ%2B6jQbm1s4sYi6u4fXBD%3D47xVd%3Dthg%40mail.gmail.com Best regards, Alexander
check-patch-for-unicums.sh
Description: application/shellscript