pgsql: Support Unicode full case mapping and conversion.

2025-01-17 Thread Jeff Davis
Support Unicode full case mapping and conversion. Generate tables from Unicode SpecialCasing.txt to support more sophisticated case mapping behavior: * support case mappings to multiple codepoints, such as "ß" uppercasing to "SS" * support conditional case mappings, such as the "final sigma"

pgsql: Support PG_UNICODE_FAST locale in the builtin collation provider

2025-01-17 Thread Jeff Davis
Support PG_UNICODE_FAST locale in the builtin collation provider. The PG_UNICODE_FAST locale uses code point sort order (fast, memcmp-based) combined with Unicode character semantics. The character semantics are based on Unicode full case mapping. Full case mapping can map a single codepoint to m

pgsql: vacuumdb: Fix comment for vacuum_one_database().

2025-01-17 Thread Nathan Bossart
vacuumdb: Fix comment for vacuum_one_database(). Since commit e0c2933a76, vacuum_one_database() always uses a catalog query to discover the tables to process, but this comment still notes the special case for which we used a catalog query before that commit. Let's just remove that note. Also, co

pgsql: Add documentation about calling version-1 C functions from C.

2025-01-17 Thread Tom Lane
Add documentation about calling version-1 C functions from C. This topic wasn't really covered before, so fill in some details. Author: Florents Tselai Reviewed-by: Pavel Stehule Reviewed-by: Tom Lane Discussion: https://postgr.es/m/90853055-5bbd-493d-91e5-721677c7c...@gmail.com Branch --

pgsql: Fix parsing of qualified relation names in RETURNING.

2025-01-17 Thread Dean Rasheed
Fix parsing of qualified relation names in RETURNING. Given a qualified refname, refnameNamespaceItem() will search for a matching namespace item by relation OID, rather than by name. Commit 80feb727c8 broke this by adding additional namespace items for OLD and NEW in the RETURNING list, which hav

pgsql: Speed up hex_encode with bytewise lookup

2025-01-17 Thread John Naylor
Speed up hex_encode with bytewise lookup Previously, hex_encode looked up each nibble of the input separately. We now use a larger lookup table containing the two-byte encoding of every possible input byte, resulting in a 1/3 reduction in encoding time. Reviewed by Tom Lane, Michael Paquier, Nath

pgsql: Remove flex version checks

2025-01-17 Thread Peter Eisentraut
Remove flex version checks Remove the flex version checks from configure and meson. The cutoff versions are all so ancient that this is no longer relevant, and what the actual cutoff should be is a bit fuzzy. This also removes the ancient behavior that configure would also accept a "lex" program