le-phare / le-phare.github.io

The Faros site
https://faros.lephare.com
4 stars 2 forks source link

requirements: default PostgreSQL collation to fr_FR, setup servers' locale to fr_FR.UTF-8 #131

Closed lucasmirloup closed 5 months ago

lucasmirloup commented 8 months ago

Problem

We discovered that several of our servers' PostgreSQL sort values in a case-sensitive manner, like this :

when we would like them to sort these values case-insensitively, like this :

Explanation

These servers' locale have not been configured, and are using a default locale (C for example).

At the creation of a PostgreSQL database, if no default collation is provided, the server's locale is used instead. If the server's locale uses case-sensitive sorting, like the C locale for example, PostgreSQL will sort values in a case-sensitive manner.

Once the database is created, the only way to change it is to re-create a new database using another collation, or to set the collation on each column using ALTER TABLE.

Solution

Add to the Faros requirements :

lucasmirloup commented 8 months ago

Cc @franck-lephare @jeremytirel @thislg @pierreboissinot @caillaudv

pierreboissinot commented 8 months ago

@lucasmirloup let's add a server requirement AND db requirement.

We should add these requirements to each checklist.

thislg commented 8 months ago

I think fr_FR.UTF-8 is fine, but en_US.UTF-8 is also acceptable.

pierreboissinot commented 5 months ago

@thislg @lucasmirloup , @MorganVERNIERS assigned.

pierreboissinot commented 5 months ago

@MorganVERNIERS 3 checks:

note: the database server may be on a different server thant php-fpm