localized names of date do not work
the command date taking properly the locale, but vsql not. Version 7.1
[dbadmin@dbtest ~]$ locale LANG=es_AR.UTF-8 LC_CTYPE="es_AR.UTF-8" LC_NUMERIC="es_AR.UTF-8" LC_TIME="es_AR.UTF-8" LC_COLLATE="es_AR.UTF-8" LC_MONETARY="es_AR.UTF-8" LC_MESSAGES="es_AR.UTF-8" LC_PAPER="es_AR.UTF-8" LC_NAME="es_AR.UTF-8" LC_ADDRESS="es_AR.UTF-8" LC_TELEPHONE="es_AR.UTF-8" LC_MEASUREMENT="es_AR.UTF-8" LC_IDENTIFICATION="es_AR.UTF-8" LC_ALL=es_AR.UTF-8 [dbadmin@dbtest ~]$ date +"%A %B" miércoles enero [dbadmin@dbtest ~]$ vsql DW -c "SET LOCALE TO 'es_AR.utf-8'; select to_char('2015-01-07'::date, 'TMDay TMMonth');" INFO 2567: Canonical locale: 'es_AR' Standard collation: 'LES' Spanish (Argentina) español (Argentina) to_char ------------------- Wednesday January (1 row)
0
Comments
LOCALE doesn't have all the functionality in vertica, which is provided at OS level by it.
At OS level, LANG and other locale-related things also affect how dates are displayed, and money, and sort order of strings (collation), and more.
But in vertica scope of LOCALE is limited. SQL identifiers (such as table names and column names) can use UTF-8 Unicode characters & HP Vertica uses the locale to determine the behaviour of certain string functions. The locale also determines the collation for various SQL commands that require ordering and comparison, such as GROUP BY, ORDER BY, joins, and the analytic ORDER BY clause.
So I don't think you will get the desired results in case of date output from vsql in vertica.
Regards'
Abhishek