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;
热点内容