From 53341c70fcb8888b040230e28bbe5deb1b1773ce Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 26 Sep 2020 11:45:57 +0100 Subject: Change the locale codeset representation From the normalized one, to the one actually contained within glibc. Recent versions of glibc also contain symlinks linking the normalized codeset to the locales with the .UTF-8 ending, but older ones do not. Maybe handling codeset normalisation for queries would be good, but the locale values ending in .UTF-8 are more compatible and allow the code to be simplified. For querying, maybe there should be a locales table which handles different representations. --- sqitch/deploy/change_locale_values.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sqitch/deploy/change_locale_values.sql (limited to 'sqitch/deploy') diff --git a/sqitch/deploy/change_locale_values.sql b/sqitch/deploy/change_locale_values.sql new file mode 100644 index 0000000..9069c61 --- /dev/null +++ b/sqitch/deploy/change_locale_values.sql @@ -0,0 +1,11 @@ +-- Deploy guix-data-service:change_locale_values to pg + +BEGIN; + +UPDATE lint_checker_descriptions SET locale = REPLACE(locale, '.utf8', '.UTF-8'); +UPDATE package_metadata_tsvectors SET locale = REPLACE(locale, '.utf8', '.UTF-8'); +UPDATE package_descriptions SET locale = REPLACE(locale, '.utf8', '.UTF-8'); +UPDATE package_synopsis SET locale = REPLACE(locale, '.utf8', '.UTF-8'); +UPDATE lint_warning_messages SET locale = REPLACE(locale, '.utf8', '.UTF-8'); + +COMMIT; -- cgit v1.2.3