postgresql/contrib
Jeff Davis 7f007e4a04 ltree: fix case-insensitive matching.
Previously, ltree_prefix_eq_ci() used lowercasing with the default
collation; while ltree_crc32_sz() used tolower() directly. These were
equivalent only if the default collation provider was libc and the
encoding was single-byte.

Change both to use casefolding with the default collation.

Backpatch through 18, where the casefolding APIs were introduced. The
bug exists in earlier versions, but would require some adaptation.

A REINDEX is required for ltree indexes where the database default
collation is not libc.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Backpatch-through: 18
Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com
Discussion: https://postgr.es/m/01fc00fd66f641b9693d4f9f1af0ccf44cbdfbdf.camel@j-davis.com
2025-12-16 12:57:00 -08:00
..
amcheck Remove useless casts in format arguments 2025-12-09 07:33:08 +01:00
auth_delay Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
auto_explain Allow resetting unknown custom GUCs with reserved prefixes. 2025-08-01 16:52:11 -05:00
basebackup_to_shell Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
basic_archive Remove translation marker from libpq-be-fe-helpers.h. 2025-07-22 22:08:36 +09:00
bloom Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
bool_plperl Fix erroneous construction of functions' dependencies on transforms. 2025-04-07 13:31:37 -04:00
btree_gin Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
btree_gist Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
citext Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
cube Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
dblink Use CompactAttribute more often, when possible 2025-10-22 11:36:26 +13:00
dict_int Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
dict_xsyn Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
earthdistance Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
file_fdw Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
fuzzystrmatch Remove useless casting to same type 2025-12-02 10:09:32 +01:00
hstore Replace most StaticAssertStmt() with StaticAssertDecl() 2025-12-12 10:06:40 +01:00
hstore_plperl Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
hstore_plpython Remove circular #include's between plpython.h and plpy_util.h. 2025-04-27 11:43:02 -04:00
intagg Update copyright for 2025 2025-01-01 11:21:55 -05:00
intarray Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
isn Clean up int64-related format strings 2025-12-09 07:33:08 +01:00
jsonb_plperl Revise APIs for pushJsonbValue() and associated routines. 2025-12-07 11:51:33 -05:00
jsonb_plpython Revise APIs for pushJsonbValue() and associated routines. 2025-12-07 11:51:33 -05:00
lo Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
ltree ltree: fix case-insensitive matching. 2025-12-16 12:57:00 -08:00
ltree_plpython Remove circular #include's between plpython.h and plpy_util.h. 2025-04-27 11:43:02 -04:00
oid2name Update copyright for 2025 2025-01-01 11:21:55 -05:00
pageinspect pageinspect: use index_close() for GiST index relation 2025-12-15 10:28:28 +09:00
passwordcheck Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
pg_buffercache Use palloc_object() and palloc_array(), the last change 2025-12-11 14:29:12 +09:00
pg_freespacemap Prevent assertion failure in contrib/pg_freespacemap. 2025-03-27 13:20:23 -04:00
pg_logicalinspect Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
pg_overexplain Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
pg_prewarm Allow passing a pointer to GetNamedDSMSegment()'s init callback. 2025-12-15 14:27:16 -06:00
pg_stat_statements pg_stat_statements: Fix handling of duplicate constant locations 2025-10-29 12:35:02 +01:00
pg_surgery Fix some confusing uses of const 2025-10-30 11:20:04 +01:00
pg_trgm Use palloc_object() and palloc_array(), the last change 2025-12-11 14:29:12 +09:00
pg_visibility Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
pg_walinspect Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
pgcrypto Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
pgrowlocks Add missing Datum conversions 2025-08-08 22:06:57 +02:00
pgstattuple pgstattuple: Improve reports generated for indexes (hash, gist, btree) 2025-10-02 11:07:30 +09:00
postgres_fdw Use palloc_object() and palloc_array(), the last change 2025-12-11 14:29:12 +09:00
seg Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
sepgsql Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
spi Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
sslinfo Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
tcn Use stack allocated StringInfoDatas, where possible 2025-11-06 14:59:48 +13:00
test_decoding Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
tsm_system_rows Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
tsm_system_time Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
unaccent Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
uuid-ossp Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
vacuumlo Update copyright for 2025 2025-01-01 11:21:55 -05:00
xml2 Use more palloc_object() and palloc_array() in contrib/ 2025-12-05 16:40:26 +09:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
Makefile pg_overexplain: Additional EXPLAIN options for debugging. 2025-03-26 13:52:21 -04:00
meson.build pg_overexplain: Additional EXPLAIN options for debugging. 2025-03-26 13:52:21 -04:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00

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.