Skip to main content
Version: 2.0.0 (latest)

3.14. Conversions

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

ch3.conversion-dialog.general1234

General
#FieldDescription
1Source encoding

The source encoding of the conversion.

2Target encoding

The target encoding of the conversion.

3Default conversion

Marks the conversion as the default one for the involved encodings. This attribute also allows the conversion to be used in the translation of the communication between the client and the server; for that, two conversions must be defined, one from encoding A to B and another from B to A.

4Conversion function

Specifies the function that performs the character conversion. This function must have the signature void function(integer, integer, cstring, internal, integer). For PostgreSQL 14 or later, the function can also have a sixth parameter of type boolean and return integer.

References​

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