Installer can't create new database on PostgreSQL

Created on 2 June 2013, over 11 years ago
Updated 4 September 2023, over 1 year ago

giving a

The server reports the following message when attempting to create the database: SQLSTATE[42809]: Wrong object type: 7 ERROR: invalid locale name: "en_US_POSIX.utf8".

So Locale::getDefault() sometimes seems to return a locale that isn't supported at all on the machine. A lot of locale errors with PostgreSQL seem to stem from the locale not being installed on the machine. But en_US_POSIX which is a special case, that definitely can't work.

Didn't find exhaustive documentation about it apart from ICU Locale and PostgreSQL Character Set Support, so there might be even more character that might generally not be supported.

We could try to create the database and catch an exception if there is any, and if that's the case, then try again with 'en_US'. We should also change the locale detection and perhaps even try to determine whether the database will be local or remote.

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
PostgreSQL driverΒ  β†’

Last updated 11 days ago

No maintainer
Created by

Pancho UTC+2 πŸ‡ͺπŸ‡Ί EU

Live updates comments and jobs are added and updated live.
  • PostgreSQL

    Particularly affects sites running on the PostgreSQL database.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024