diff options
| author | Jeff Davis | 2025-12-16 23:32:41 +0000 |
|---|---|---|
| committer | Jeff Davis | 2025-12-16 23:32:41 +0000 |
| commit | 87b2968df0f866aaccb6ba69adf284e3c4a79454 (patch) | |
| tree | 83669f96e2198bc8dda0666e7e8b0805c77f95a9 /src/common/string.c | |
| parent | 7f007e4a044a713df5320fca09621d6ba8e632ba (diff) | |
downcase_identifier(): use method table from locale provider.
Previously, libc's tolower() was always used for lowercasing
identifiers, regardless of the database locale (though only characters
beyond 127 in single-byte encodings were affected). Refactor to allow
each provider to supply its own implementation of identifier
downcasing.
For historical compatibility, when using a single-byte encoding, ICU
still relies on tolower().
One minor behavior change is that, before the database default locale
is initialized, it uses ASCII semantics to downcase the
identifiers. Previously, it would use the postmaster's LC_CTYPE
setting from the environment. While that could have some effect during
GUC processing, for example, it would have been fragile to rely on the
environment setting anyway. (Also, it only matters when the encoding
is single-byte.)
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com
Diffstat (limited to 'src/common/string.c')
0 files changed, 0 insertions, 0 deletions
