cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

List Report sorting with PostgreSQL DB - CAP

0 Likes
787

Hi CAP Experts

I am facing an issue when using PostgreSQL in my CAP application and trying to use sort from my List Report. It is giving me an error about the collation of my PostgreSQL database. Should I manually create the database and select collation? I am just wondering if this will be an issue when I would deploy my application to Could Foundry?

Error says: collation "en" for encoding "UTF8" does not exist

Accepted Solutions (0)

Answers (2)

Answers (2)

LuizGomes
Participant
0 Likes

How is the project configuration with @cap/cds 7. I have the same error in a project.

bob_den_os
Product and Topic Expert
Product and Topic Expert
0 Likes

The database service tries to identify which kind of collation is configured in the database. When no localized collation is configured in the database it ignores this. As it might not be required, which results in the error you described.

It would be required to ensure that one of the localized collations are configured for the database. Information on how to setup the localized collation can be found here. Our findings was that using ICU as localized collation was most reliable as it was always configured by default in our databases, but libc collation should also work as long as it is available. The database service will automatically use which ever one is available.

0 Likes

Hi Bob

Thank you for that info. In my local app, if I use npm start to run the app, then I do not get that error. However, if I use cds watch I get that error. In addition to that when I deployed the app to my trial account to test, I am getting the same error when I am sorting. Any idea what I could do so it works in BTP?


Best Regards

Chandan Singh