1.Windows系统搜索SQL Shell(psql),运行
2.以下,到输入密码之前都直接回车使用默认值
Server [localhost]:
Database [postgres]:
Port [5432]:
UserName [postgres]:
Client Encodeing [SJIS]:
3.输入密码:默认的话应该是postgres
显示postgres=# 就可以输入sql命令了
4.做成Role
CREATE ROLE xxxrole LOGIN
ENCRYPTED PASSWORD 'xxxrole'
NOSUPERUSER NOINHERIT CREATEDB NOCREATEROLE;
5.做成Database
CREATE DATABASE xxxdb
WITH OWNER = xxxrole
ENCODING = 'UTF8'
TABLESPACE = pg_default;
网友评论