Skip to main content
Version: 0.9.4

3.14. Conversions

Conversions are objects used to perform transformations between two different encodings. Alike cast objects, conversions are very basic objects but the conversion function is the main responsible for the task of converting a character from encoding A to B.

AttributeDescription
Source EncodingDefines the source encoding.
Target EncodingDefines the target encoding.
Conversion FunctionSpecify the function that performs the character conversion. This function must have the following signature: void function(integer, integer, cstring, internal, integer)
Default ConversionMarks the conversion as default for the involved encodings. Additionally, this attribute enables the conversion to be used in the translation of the communication between client and server. But in order to make this task, two conversion objects must be defined: one from encoding A to B and another from B to A.

References​

Conversion DDL

https://www.postgresql.org/docs/current/static/sql-createconversion.html