Change Language in Vertica

Each host has a system setting for the Linux environment variable LANG.

LANG determines the locale category for native language, local customs, and coded character set in the absence of the LC_ALL and other LC_environment variables. LANG can be used by applications to determine which language to use for error messages and instructions, collating sequences, date formats, and so forth.

To change the LANG setting for the database administrator, edit /home/dbadmin/.profile on all cluster hosts and set the environment variable;

Example:
    export LANG=en_US.UTF-8
The LANG setting controls the following in Vertica:
  • OS-level errors and warnings. For example, "file not found" during COPY operations.
  • The LANG setting does not control the following:
  • Vertica-specific error and warning messages. These are always in English at this time.

    Collation of results returned by SQL issued to Vertica. This must be done using a database parameter instead.

    Set the locale: (if more than one node, set this in the .profile, .bashrc of the dbadmin user, or just set it as the system wide locale)

        export LC_ALL=pt_BR.UTF-8

    Start Vertica.

    On vsql:

        dbadmin= SELECT TO_CHAR(12343148.567890123, 'L999G999G999G999D999999');
        TO_CHAR
        ---------------------------
        R$ 12.343.148,567890