2020-09-17 20:16:18 +02:00
|
|
|
# List of filename patterns to exclude from pgindent runs
|
|
|
|
#
|
|
|
|
# These contain assembly code that pgindent tends to mess up.
|
|
|
|
src/include/storage/s_lock\.h$
|
|
|
|
src/include/port/atomics/
|
|
|
|
#
|
|
|
|
# This contains C++ constructs that confuse pgindent.
|
|
|
|
src/include/jit/llvmjit\.h$
|
|
|
|
#
|
Automatically generate node support functions
Add a script to automatically generate the node support functions
(copy, equal, out, and read, as well as the node tags enum) from the
struct definitions.
For each of the four node support files, it creates two include files,
e.g., copyfuncs.funcs.c and copyfuncs.switch.c, to include in the main
file. All the scaffolding of the main file stays in place.
I have tried to mostly make the coverage of the output match what is
currently there. For example, one could now do out/read coverage of
utility statement nodes, but I have manually excluded those for now.
The reason is mainly that it's easier to diff the before and after,
and adding a bunch of stuff like this might require a separate
analysis and review.
Subtyping (TidScan -> Scan) is supported.
For the hard cases, you can just write a manual function and exclude
generating one. For the not so hard cases, there is a way of
annotating struct fields to get special behaviors. For example,
pg_node_attr(equal_ignore) has the field ignored in equal functions.
(In this patch, I have only ifdef'ed out the code to could be removed,
mainly so that it won't constantly have merge conflicts. It will be
deleted in a separate patch. All the code comments that are worth
keeping from those sections have already been moved to the header
files where the structs are defined.)
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/c1097590-a6a4-486a-64b1-e1f9cc0533ce%40enterprisedb.com
2022-07-09 08:52:19 +02:00
|
|
|
# These are generated files with incomplete code fragments that
|
|
|
|
# confuse pgindent.
|
|
|
|
src/backend/nodes/\w+\.funcs\.c$
|
|
|
|
src/backend/nodes/\w+\.switch\.c$
|
|
|
|
#
|
2020-09-17 20:16:18 +02:00
|
|
|
# This confuses pgindent, and it's a derived file anyway.
|
|
|
|
src/backend/utils/fmgrtab\.c$
|
|
|
|
#
|
2020-09-22 17:32:10 +02:00
|
|
|
# pgindent might mangle entries in this that match typedef names.
|
|
|
|
# Since it's a derived file anyway, just exclude it.
|
|
|
|
src/backend/utils/fmgrprotos\.h$
|
|
|
|
#
|
2020-09-17 20:16:18 +02:00
|
|
|
# kwlist_d files are made by gen_keywordlist.pl. While we could insist that
|
|
|
|
# they match pgindent style, they'd look worse not better, so exclude them.
|
|
|
|
kwlist_d\.h$
|
|
|
|
#
|
Improve performance of Unicode {de,re}composition in the backend
This replaces the existing binary search with two perfect hash functions
for the composition and the decomposition in the backend code, at the
cost of slightly-larger binaries there (35kB in libpgcommon_srv.a). Per
the measurements done, this improves the speed of the recomposition and
decomposition by up to 30~40 times for the NFC and NFKC conversions,
while all other operations get at least 40% faster. This is not as
"good" as what libicu has, but it closes the gap a lot as per the
feedback from Daniel Verite.
The decomposition table remains the same, getting used for the binary
search in the frontend code, where we care more about the size of the
libraries like libpq over performance as this gets involved only in code
paths related to the SCRAM authentication. In consequence, note that
the perfect hash function for the recomposition needs to use a new
inverse lookup array back to to the existing decomposition table.
The size of all frontend deliverables remains unchanged, even with
--enable-debug, including libpq.
Author: John Naylor
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/CAFBsxsHUuMFCt6-pU+oG-F1==CmEp8wR+O+bRouXWu6i8kXuqA@mail.gmail.com
2020-10-23 04:05:46 +02:00
|
|
|
# These are generated by the scripts from src/common/unicode/. They use
|
2020-10-11 12:09:01 +02:00
|
|
|
# hash functions generated by PerfectHash.pm whose format looks worse with
|
|
|
|
# pgindent.
|
Improve performance of Unicode {de,re}composition in the backend
This replaces the existing binary search with two perfect hash functions
for the composition and the decomposition in the backend code, at the
cost of slightly-larger binaries there (35kB in libpgcommon_srv.a). Per
the measurements done, this improves the speed of the recomposition and
decomposition by up to 30~40 times for the NFC and NFKC conversions,
while all other operations get at least 40% faster. This is not as
"good" as what libicu has, but it closes the gap a lot as per the
feedback from Daniel Verite.
The decomposition table remains the same, getting used for the binary
search in the frontend code, where we care more about the size of the
libraries like libpq over performance as this gets involved only in code
paths related to the SCRAM authentication. In consequence, note that
the perfect hash function for the recomposition needs to use a new
inverse lookup array back to to the existing decomposition table.
The size of all frontend deliverables remains unchanged, even with
--enable-debug, including libpq.
Author: John Naylor
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/CAFBsxsHUuMFCt6-pU+oG-F1==CmEp8wR+O+bRouXWu6i8kXuqA@mail.gmail.com
2020-10-23 04:05:46 +02:00
|
|
|
src/include/common/unicode_norm_hashfunc\.h$
|
2020-10-11 12:09:01 +02:00
|
|
|
src/include/common/unicode_normprops_table\.h$
|
|
|
|
#
|
2020-09-17 20:16:18 +02:00
|
|
|
# Exclude ecpg test files to avoid breaking the ecpg regression tests
|
|
|
|
# (but include files at the top level of the ecpg/test/ directory).
|
|
|
|
src/interfaces/ecpg/test/.*/
|
|
|
|
#
|
|
|
|
# src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/
|
|
|
|
# are excluded because those files are imported from an external project,
|
|
|
|
# rather than maintained locally, and they are machine-generated anyway.
|
2010-04-01 16:44:39 +02:00
|
|
|
/snowball/libstemmer/
|
2020-09-17 20:16:18 +02:00
|
|
|
#
|
|
|
|
# These files are machine-generated by code not under our control,
|
|
|
|
# so we shouldn't expect them to conform to our style.
|
|
|
|
# (Some versions of dtrace build probes.h files that confuse pgindent, too.)
|
|
|
|
src/backend/utils/probes\.h$
|
|
|
|
src/include/pg_config\.h$
|
|
|
|
src/pl/plperl/ppport\.h$
|
|
|
|
src/pl/plperl/SPI\.c$
|
|
|
|
src/pl/plperl/Util\.c$
|
|
|
|
#
|
|
|
|
# Exclude any temporary installations that may be in the tree.
|
2018-10-29 11:39:44 +01:00
|
|
|
/tmp_check/
|
|
|
|
/tmp_install/
|
2020-09-22 17:32:10 +02:00
|
|
|
# ... and for paranoia's sake, don't touch git stuff.
|
|
|
|
/\.git/
|