rake db:create encoding error with postgresql

前端 未结 5 877
日久生厌
日久生厌 2021-01-30 02:41

I\'m importing an existing rails project that I was working on into my new arch linux system, I already installed all gems and postgresql correctly, but I having some issues whe

5条回答
  •  我在风中等你
    2021-01-30 03:03

    You can change postgres template1 to be UTF by doing the following as posted here:

    UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
    DROP DATABASE template1;
    CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
    UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
    \c template1
    VACUUM FREEZE;
    UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1';
    

提交回复
热议问题