client_encoding

A parameter for setting the client-side encoding

client_encoding is a configuration parameter for setting the client-side encoding (character set).

client_encoding was added in PostgreSQL 6.4.

Usage

client_encoding can be used to set or retrieve the current client encoding.

Alternative ways of retrieving the client encoding:

Change history

Examples

Basic usage example for client_encoding:

postgres=# SHOW client_encoding;
 client_encoding 
-----------------
 UTF8
(1 row)

Attempting to set an invalid encoding:

postgres=# SET client_encoding = 'klingon';
ERROR:  invalid value for parameter "client_encoding": "klingon"

Categories

GUC configuration item, Locale and character set handling

See also

pg_client_encoding(), server_encoding