0

I am using cimg/postgres as my database image.

  - image: cimg/postgres:11.12
    environment:
      POSTGRES_HOST_AUTH_METHOD: trust
      POSTGRES_DB: XXXX
      POSTGRES_USER: XXXX

Then I'd like to use icu collation, so I specified in my database.yml

  adapter: postgresql
  ctype: ja-x-icu
  collation: ja-x-icu

I ran ci with this setting, but the error occurs as below;

PG::WrongObjectType: ERROR:  invalid locale name: "ja-x-icu"

I thought that icu collation is available in cimg/postgres becuase --with-icu is written in the Dockerfile, but actually it does not work.
https://github.com/CircleCI-Public/cimg-postgres/blob/main/15.0/Dockerfile#L68

Question:
・How can I use icu collation with cimg/postgres (in my rails application)?

Thank you in advance.

0

1 Answer 1

0

You cannot use ICU collations as database or cluster collations in PostgreSQL versions before v15.

Sign up to request clarification or add additional context in comments.

4 Comments

thanks! then, can I use icu collation with the image cimg/postgres:15.0? I still get the same error: invalid locale name: "ja-x-icu" when I use it.
Perhaps PostgreSQL was built without ICU support? Try to create a container with the C locale, connect to it and query pg_collation.
thanks! I checked pg_collation by running SELECT * FROM pg_collation and ja-x-icu does exist.
No idea then. Perhaps you should get the exact initdb command that is being run and add it to the question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.