26
27

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.

Amazon RDS for PostgreSQLで日本語を使うときにやったこと

Last updated at Posted at 2015-02-13

タイムゾーンがUTCなのでAsia/Tokyo に変更

デフォルトのパラメータグループをコピーして、タイムゾーンを日本にしたパラメータグループを新たに作る
設定後、reboot必要です。
参考:
http://recipe.kc-cloud.jp/archives/6533

CollateとCTypeのデフォルトが en_US.UTF-8 なので変更

あとから日本語データの order byの順番とかが何かおかしくて気づくやつ。
DBの作成が必要です。
もし運用開始しちゃってたら一旦ダンプとってから。

CREATE DATABASE newdb WITH template template0 encoding 'utf8' lc_collate 'ja_JP.UTF-8' lc_ctype 'ja_JP.UTF-8';

もし運用するDB名が決まってたらリネーム

\c postgres
drop database maindb; # 最初に作られてたやつ消すとか
alter database newdb rename to maindb;
\c maindb
26
27
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
26
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?