# 创建数据库 testdb
create database testdb;
# 创建用户 testuser
create user testuser with password '123456';
# 授权
grant all on database testdb to testuser;
# 修改数据库owner
alter database testdb owner to testuser;
* 切换用户登录
# 创建schema,命名为schema01
create schema schema01;
# 设置数据库默认schema
alter database testdb set search_path to schema01;