Character set used for client communication.
At a glance
| Property | Value |
|---|---|
| Parameter | client_encoding |
| Category | Client Defaults |
| Default | UTF8 |
| Value type | boolean / enum / numeric |
| Change scope | Per-session (SET) |
What it does
The character set the server uses to talk to the client; it transparently converts to/from the database encoding.
How to apply a change
Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.
Inspect the current value and source with SHOW client_encoding; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'client_encoding';.
Tuning guidance
Match your application; UTF8 end-to-end avoids mojibake. Set via the client/driver rather than globally where possible.