Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* 文字コードを指定して作成する [#p4daf038]
CREATE DATABASE foo_db ENCODING 'UTF8'
CREATE DATABASE bar_db ENCODING 'SJIS'
** template1のエンコーディングと違うエンコーディングを指...
ERROR: new encoding (UTF8) is incompatible with the enc...
上のようにエラーが起きる。この場合、以下のようにする。
CREATE DATABASE foo_db ENCODING 'UTF8' TEMPLATE template0
- TEMPLATEオプション付けて、template0を指定する
- template1はinitdbした時のエンコーディング
** 参考 [#jee01536]
- https://www.postgresql.org/docs/current/static/sql-crea...
- https://www.postgresql.org/docs/current/static/multibyt...
- https://www.dbonline.jp/postgresql/database/index2.html
終了行:
* 文字コードを指定して作成する [#p4daf038]
CREATE DATABASE foo_db ENCODING 'UTF8'
CREATE DATABASE bar_db ENCODING 'SJIS'
** template1のエンコーディングと違うエンコーディングを指...
ERROR: new encoding (UTF8) is incompatible with the enc...
上のようにエラーが起きる。この場合、以下のようにする。
CREATE DATABASE foo_db ENCODING 'UTF8' TEMPLATE template0
- TEMPLATEオプション付けて、template0を指定する
- template1はinitdbした時のエンコーディング
** 参考 [#jee01536]
- https://www.postgresql.org/docs/current/static/sql-crea...
- https://www.postgresql.org/docs/current/static/multibyt...
- https://www.dbonline.jp/postgresql/database/index2.html
ページ名: