postgresql/src
Andres Freund 4ea3f5ef35 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
2025-02-10 10:03:40 -05:00
..
backend Translation updates 2025-02-10 15:18:02 +01:00
bin Specify the encoding of input to fmtId() 2025-02-10 10:03:40 -05:00
common Add pg_encoding_set_invalid() 2025-02-10 10:03:40 -05:00
fe_utils Fix handling of invalidly encoded data in escaping functions 2025-02-10 10:03:40 -05:00
include Specify the encoding of input to fmtId() 2025-02-10 10:03:40 -05:00
interfaces Fix handling of invalidly encoded data in escaping functions 2025-02-10 10:03:40 -05:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2025-02-10 15:18:02 +01:00
port Avoid breaking SJIS encoding while de-backslashing Windows paths. 2025-01-29 14:24:36 -05:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:08 -04:00
test Add test of various escape functions 2025-02-10 10:03:40 -05:00
timezone Update time zone data files to tzdata release 2025a. 2025-01-20 16:49:15 -05:00
tools Add test of various escape functions 2025-02-10 10:03:40 -05:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00