mirror of
https://github.com/postgres/postgres.git
synced 2026-02-18 01:59:53 -05:00
Newline is certainly not a digit, nor a word character, so it is
sensible that it should match these complemented character classes.
Previously, \D and \W acted that way by default, but in
newline-sensitive mode ('n' or 'p' flag) they did not match newlines.
This behavior was previously forced because explicit complemented
character classes don't match newlines in newline-sensitive mode;
but as of the previous commit that implementation constraint no
longer exists. It seems useful to change this because the primary
real-world use for newline-sensitive mode seems to be to match the
default behavior of other regex engines such as Perl and Javascript
... and their default behavior is that these match newlines.
The old behavior can be kept by writing an explicit complemented
character class, i.e. [^[:digit:]] or [^[:word:]]. (This means
that \D and \W are not exactly equivalent to those strings, but
they weren't anyway.)
Discussion: https://postgr.es/m/3220564.1613859619@sss.pgh.pa.us
|
||
|---|---|---|
| .. | ||
| brin | ||
| commit_ts | ||
| delay_execution | ||
| dummy_index_am | ||
| dummy_seclabel | ||
| plsample | ||
| snapshot_too_old | ||
| ssl_passphrase_callback | ||
| test_bloomfilter | ||
| test_ddl_deparse | ||
| test_extensions | ||
| test_ginpostinglist | ||
| test_integerset | ||
| test_misc | ||
| test_parser | ||
| test_pg_dump | ||
| test_predtest | ||
| test_rbtree | ||
| test_regex | ||
| test_rls_hooks | ||
| test_shm_mq | ||
| unsafe_tests | ||
| worker_spi | ||
| Makefile | ||
| README | ||
Test extensions and libraries ============================= src/test/modules contains PostgreSQL extensions that are primarily or entirely intended for testing PostgreSQL and/or to serve as example code. The extensions here aren't intended to be installed in a production server and aren't suitable for "real work". Furthermore, while you can do "make install" and "make installcheck" in this directory or its children, it is NOT ADVISABLE to do so with a server containing valuable data. Some of these tests may have undesirable side-effects on roles or other global objects within the tested server. "make installcheck-world" at the top level does not recurse into this directory. Most extensions have their own pg_regress tests or isolationtester specs. Some are also used by tests elsewhere in the tree. If you're adding new hooks or other functionality exposed as C-level API this is where to add the tests for it.