Character encoding systems consist of a code that pairs each character from a character set with something else, such as a sequence of numbers or octets, to facilitate data transmission and storage. Greenplum Database supports a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as EUC (Extended UNIX Code), UTF-8, and Mule internal code. The server-side character set is defined during database initialization, UTF-8 is the default and can be changed. Clients can use all supported character sets transparently, but a few are not supported for use within the server as a server-side encoding. When loading or inserting data into Greenplum Database, Greenplum transparently converts the data from the specified client encoding into the server encoding. When sending data back to the client, Greenplum converts the data from the server character encoding into the specified client encoding.
Data files must be in a character encoding recognized by Greenplum Database. See the Greenplum Database Reference Guide for the supported character sets.Data files that contain invalid or unsupported encoding sequences encounter errors when loading into Greenplum Database.
On data files generated on a Microsoft Windows operating system, run the
dos2unixsystem command to remove any Windows-only characters before loading into Greenplum Database.
If you change the
ENCODINGvalue in an existing
gploadcontrol file, you must manually drop any external tables that were creating using the previous
gploaddoes not drop and recreate external tables to use the new
REUSE_TABLESis set to
Parent topic: Formatting Data Files
The client-side character encoding can be changed for a session by setting the server configuration parameter
SET client_encoding TO 'latin1';
Change the client-side character encoding back to the default value:
Show the current client-side character encoding setting: