summaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-03-05 13:02:43 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-03-05 13:02:43 -0500
commita382997ee07a8550f4ea23b5a542b046268a273c (patch)
tree240e0c50edf1257f7370babc3709cc41eb89695f /src/tutorial/funcs.c
parentda5f032a8350a77aeed4f9d459633055f0adb645 (diff)
Fix to_char() to use ASCII-only case-folding rules where appropriate.
formatting.c used locale-dependent case folding rules in some code paths where the result isn't supposed to be locale-dependent, for example to_char(timestamp, 'DAY'). Since the source data is always just ASCII in these cases, that usually didn't matter ... but it does matter in Turkish locales, which have unusual treatment of "i" and "I". To confuse matters even more, the misbehavior was only visible in UTF8 encoding, because in single-byte encodings we used pg_toupper/pg_tolower which don't have locale-specific behavior for ASCII characters. Fix by providing intentionally ASCII-only case-folding functions and using these where appropriate. Per bug #7913 from Adnan Dursun. Back-patch to all active branches, since it's been like this for a long time.
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions