Incorrect collation settings in PostgreSQL database

Job ordering and extract from folders might work incorrectly when using a PostgreSQL database

If you are using a PostgreSQL database, your data might perform erratically if the collation feature is not enabled. To check the collation feature and configure it if necessary, perform the following steps:
  1. From PostgreSQL command line, run the following command to check whether the collation feature is enabled:
    \l
  2. Verify the output and check the Collate column:
                                     List of databases
       Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
    -----------+----------+----------+-------------+-------------+-----------------------
     dwc       | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
     fips1     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
     postegre  | postgres | UTF8     | C           | en_US.UTF-8 |
     postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
     template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
     template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
    
    If the Collate column contains a value different from C, the data is incorrect.
  3. To resolve the problem, stop WebSphere Application Server Liberty, as described in Application server - starting and stopping.
  4. Run the following command to update the database and set the collation feature:
    update pg_database set datcollate='C', datctype='ucs_baisc.UTF-8' where datname='TWS';
  5. Run the following command to re-index the database:
    REINDEX database "TWS";
  6. Start WebSphere Application Server Liberty, as described in Application server - starting and stopping.
The collation feature is now enabled and the database works correctly. If you were performing an upgrade, you can return to the upgrade procedure: