postgresql資料庫編碼
發布時間: 2024-05-31 06:55:49
㈠ 怎樣讓 PostgreSQL 創建資料庫時默認為 UTF8 編碼
postgres=# \h create database
Command: CREATE DATABASE
Description: create a new database
Syntax:
CREATE DATABASE name
[ [ WITH ] [ OWNER [=] user_name ]
[ TEMPLATE [=] template ]
[ ENCODING [=] encoding ]
[ LC_COLLATE [=] lc_collate ]
[ LC_CTYPE [=] lc_ctype ]
[ TABLESPACE [=] tablespace ]
[ CONNECTION LIMIT [=] connlimit ] ]
--一個例子,指定字元集
CREATE DATABASE wapreader
WITH OWNER = wapreader
TEMPLATE = template0
ENCODING = 'UTF8'
TABLESPACE = tbs_wapreader;
熱點內容