Chapter 3 Migrating Functions --- This chapter explains how to migrate SQL functions. ### 3.1 CONVERT **Description** CONVERT converts a string from one character set to another. **Functional differences** - **Oracle database** - The string is converted from the character set identified in the third argument to the character set identified in the second argument. - **PostgreSQL** - The string is converted from the character set identified in the second argument to the character set identified in the third argument. **Migration procedure** Use the following procedure to perform migration: 1. Search for the keyword CONVERT and identify where it is used. 2. Switch the second and third arguments. 3. Change the character sets in the second and third arguments to names that are valid under the PostgreSQL encoding system. **Migration example** The example below shows migration when strings are changed to the character set of the target database.
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|
Oracle database | PostgreSQL |
---|---|
|
|