Character Sets and Collations of the Client Connection
When data containing character set attributes is transmitted between the server and client, encoding conversion is automatically performed. After receiving an SQL statement from a client, the server converts the character set of the SQL statement from the client character set client_encoding to the database character set server_encoding. Before the query result data is sent to the client, the data is encoded and converted to the client_encoding character set of the client.
System parameters:
- server_encoding
Character set specified during database creation. For details, see CREATE DATABASE.
- client_encoding
Character set of the client, which can be modified using the SET NAMES statement. For details, see SET. For details about the parameter, see client_encoding in "Configuring GUC Parameters > GUC Parameters > Locale and Formatting" in Administrator Guide.
- character_set_connection
Default character set of string constants for which no character sets are specified in SQL statements. For details about the parameter, see character_set_connection in "Configuring GUC Parameters > GUC Parameters > Locale and Formatting" in Administrator Guide.
- collation_connection
Default collation of string constants for which no collations are specified in SQL statements. For details about the parameter, see collation_connection in "Configuring GUC Parameters > GUC Parameters > Locale and Formatting" in Administrator Guide.
- character_set_results
Character set of the returned result. For details about the parameter, see character_set_results in "Configuring GUC Parameters > GUC Parameters > Locale and Formatting" in Administrator Guide.
-
For an expression that converts a non-character type object to a character type, the result character set and collation are character_set_connection and collation_connection, respectively.
-
By default, the character set and collation number of a binding parameter of the character type are the values of character_set_connection and collation_connection, respectively.
-
During character data conversion, the character encoding is verified. If the character encoding does not meet the requirements, an error message is displayed.
-
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot