pg_client_encoding()

A function which returns the current client encoding name

pg_client_encoding() is a system function returning the name of the client's current encoding.

pg_client_encoding() was added in PostgreSQL 7.2.

Usage

pg_client_encoding () → name

pg_client_encoding() returns the client's current encoding as a human-readable string. It is equivalent to:

Change history

Examples

Basic usage example for pg_client_encoding():

postgres=# SELECT pg_client_encoding();
 pg_client_encoding 
--------------------
 UTF8
(1 row)

Categories

Locale and character set handling, System catalogue

See also

client_encoding, server_encoding