postgresql/contrib
Michael Paquier 59f47fb98d unaccent: Add support for quoted translated characters
As reported in bug #18057, the extension unaccent removes in its rule
file whitespace characters that are intentionally specified when
building unaccent.rules from UnicodeData.txt, causing an incorrect
translation for some characters like numeric symbols.  This is caused by
the fact that all whitespaces before and after the origin and target
characters are all discarded (this limitation is documented).

This commit makes possible the use of quotes around target characters,
so as whitespaces can be considered part of target characters.  Some
target characters use a double quote, these require an extra double
quote.

The documentation is updated to show how to use quoted areas,
generate_unaccent_rules.py is updated to generate unaccent.rules and a
couple of tests are added for numeric symbols.  While working on this
patch, I have implemented a fake rule file to test the parsing logic
implemented, which is not included here as it would just consume extra
cycles in the tests, and it requires the manipulation of an installation
tree to be able to work correctly.

As this requires a change of format in unaccent.rules, this cannot be
backpatched, unfortunately.  The idea to use double quotes as escaped
characters comes from Tom Lane.

Reported-by: Martin Schlossarek
Author: Michael Paquier
Discussion: https://postgr.es/m/18057-62712cad01bd202c@postgresql.org
2023-09-20 12:29:36 +09:00
..
adminpack Use "data directory" not "current directory" in error messages. 2023-03-16 12:04:08 -04:00
amcheck Remove some more "snapshot too old" vestiges. 2023-09-08 17:12:12 +12:00
auth_delay Fix copy-pasto in contrib/auth_delay/meson.build variable name. 2023-04-02 09:31:10 -07:00
auto_explain Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
basebackup_to_shell Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
basic_archive Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
bloom Remove the "snapshot too old" feature. 2023-09-05 19:53:43 +12:00
bool_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
btree_gin Update copyright for 2023 2023-01-02 15:00:37 -05:00
btree_gist Allow some exclusion constraints on partitions 2023-07-12 09:25:17 +02:00
citext Remove read-only server settings lc_collate and lc_ctype 2023-06-07 16:57:06 +02:00
cube Handle \v as a whitespace character in parsers 2023-07-06 08:16:24 +09:00
dblink Refactor some code related to wait events "BufferPin" and "Extension" 2023-07-03 11:01:02 +09:00
dict_int Update copyright for 2023 2023-01-02 15:00:37 -05:00
dict_xsyn Update copyright for 2023 2023-01-02 15:00:37 -05:00
earthdistance Doc: improve commentary about providing our own definitions of M_PI. 2023-01-08 16:25:33 -05:00
file_fdw Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
fuzzystrmatch Ensure Soundex difference() function handles empty input sanely. 2023-05-16 10:53:42 -04:00
hstore Handle \v as a whitespace character in parsers 2023-07-06 08:16:24 +09:00
hstore_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
hstore_plpython In hstore_plpython, avoid crashing when return value isn't a mapping. 2023-04-27 11:55:06 -04:00
intagg Update copyright for 2023 2023-01-02 15:00:37 -05:00
intarray Remove unnecessary pfree() in g_intbig_compress(). 2023-07-13 13:07:51 -04:00
isn Rework pg_input_error_message(), now renamed pg_input_error_info() 2023-02-28 08:04:13 +09:00
jsonb_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_plpython Update copyright for 2023 2023-01-02 15:00:37 -05:00
lo Update copyright for 2023 2023-01-02 15:00:37 -05:00
ltree Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
ltree_plpython Update copyright for 2023 2023-01-02 15:00:37 -05:00
oid2name Mark options as deprecated in usage output 2023-03-02 14:36:37 +01:00
pageinspect pageinspect: Fix gist_page_items() with included columns 2023-05-19 12:37:58 +09:00
passwordcheck Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_buffercache Add pg_buffercache_usage_counts() to contrib/pg_buffercache. 2023-04-07 14:25:53 -04:00
pg_freespacemap Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_prewarm Refactor some code related to wait events "BufferPin" and "Extension" 2023-07-03 11:01:02 +09:00
pg_stat_statements Fix tracking of temp table relation extensions as writes 2023-09-13 19:14:09 -07:00
pg_surgery Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
pg_trgm Update contrib/trgm_regexp's memory management. 2023-04-08 22:09:17 +12:00
pg_visibility Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_walinspect Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
pgcrypto Improve const use in zlib-using code 2023-08-07 09:34:38 +02:00
pgrowlocks Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgstattuple Update copyright for 2023 2023-01-02 15:00:37 -05:00
postgres_fdw postgres_fdw: Fix test for parameterized foreign scan. 2023-08-30 17:15:00 +09:00
seg Handle \v as a whitespace character in parsers 2023-07-06 08:16:24 +09:00
sepgsql Catalog not-null constraints 2023-08-25 13:31:24 +02:00
spi Update copyright for 2023 2023-01-02 15:00:37 -05:00
sslinfo Revert "Add notBefore and notAfter to SSL cert info display" 2023-07-20 17:18:12 +02:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Update copyright for 2023 2023-01-02 15:00:37 -05:00
tcn Update copyright for 2023 2023-01-02 15:00:37 -05:00
test_decoding Catalog not-null constraints 2023-08-25 13:31:24 +02:00
tsm_system_rows Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsm_system_time Update copyright for 2023 2023-01-02 15:00:37 -05:00
unaccent unaccent: Add support for quoted translated characters 2023-09-20 12:29:36 +09:00
uuid-ossp New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
vacuumlo Update copyright for 2023 2023-01-02 15:00:37 -05:00
xml2 Update copyright for 2023 2023-01-02 15:00:37 -05:00
Makefile Remove the "snapshot too old" feature. 2023-09-05 19:53:43 +12:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
meson.build Remove the "snapshot too old" feature. 2023-09-05 19:53:43 +12:00

README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.