0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[postgresql] initdb で指定した文字コードとは違う文字コードでデータベースを作成する

Posted at

概要

postgresql 8.4 で createdb した際にエラーが出たのでメモ

エラー内容

$ createdb test -E UTF-8
createdb: データベースの生成に失敗しました: ERROR:  new encoding (UTF8) is incompatible with the encoding of the template database (EUC_JP)
HINT:  Use the same encoding as in the template database, or use template0 as template.

対応内容

createdb の際に template0 をテンプレートに指定するらしい

$ createdb test -E UTF8 --template=template0

OK

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?