创建数据库和普通用户
create database test; create user abce with password 'xxxxxx'; grant all on database test to abce; alter user abce with valid until 'infinity'; revoke connect on database test from public;
查看用户权限
postgresql=#> \du 或者 select table_catalog, table_schema, table_name, privilege_type from information_schema.table_privileges where grantee = 'abce';