aboutsummaryrefslogtreecommitdiff
path: root/src/tools/pgindent
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-02-10 10:03:37 -0500
committerAndres Freund <andres@anarazel.de>2025-02-10 10:03:37 -0500
commitac00ff1c96081ea4981f1001209b4719f5cd82ac (patch)
treefe3ac31f437d92f052e680dbb74b80f04ec2a396 /src/tools/pgindent
parent5dc1e42b4fa6a4434afa7d7cdcf0291351a7b873 (diff)
downloadpostgresql-ac00ff1c96081ea4981f1001209b4719f5cd82ac.tar.gz
postgresql-ac00ff1c96081ea4981f1001209b4719f5cd82ac.zip
Add test of various escape functions
As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094
Diffstat (limited to 'src/tools/pgindent')
-rw-r--r--src/tools/pgindent/typedefs.list3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 9a3bee93dec..656ecd919de 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -3709,6 +3709,9 @@ pam_handle_t
parallel_worker_main_type
parse_error_callback_arg
partition_method_t
+pe_test_config
+pe_test_escape_func
+pe_test_vector
pendingPosition
pending_label
pgParameterStatus