diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-02-21 12:21:17 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-02-21 12:21:17 +0100 |
commit | 329304c9012b2ac6d906afeb18062f9080dceef9 (patch) | |
tree | 77532f3281bbd7f3b6abc577d64331a3992a11a6 /src/backend/access/gist/gistutil.c | |
parent | 41336bf085599892b37ecfeace1576d9ae9a599a (diff) | |
download | postgresql-329304c9012b2ac6d906afeb18062f9080dceef9.tar.gz postgresql-329304c9012b2ac6d906afeb18062f9080dceef9.zip |
Support text position search functions with nondeterministic collations
This allows using text position search functions with nondeterministic
collations. These functions are
- position, strpos
- replace
- split_part
- string_to_array
- string_to_table
which all use common internal infrastructure.
There was previously no internal implementation of this, so it was met
with a not-supported error. This adds the internal implementation and
removes the error.
Unlike with deterministic collations, the search cannot use any
byte-by-byte optimized techniques but has to go substring by
substring. We also need to consider that the found match could have a
different length than the needle and that there could be substrings of
different length matching at a position. In most cases, we need to
find the longest such substring (greedy semantics), but this can be
configured by each caller.
Reviewed-by: Euler Taveira <euler@eulerto.com>
Discussion: https://www.postgresql.org/message-id/flat/582b2613-0900-48ca-8b0d-340c06f4d400@eisentraut.org
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions