Home | Mirror | Search

第 2 章 Administration

目錄

1. User 用戶管理
1.1. SUPERUSER
1.2. 刪除用戶
2. Database
2.1. 刪除資料庫
3. Table
4. Backup / Restore
4.1. import
4.2. 大型資料庫

1. User 用戶管理

新建用戶

CREATE ROLE woodart LOGIN PASSWORD 'chen'
  NOINHERIT
   VALID UNTIL 'infinity';
		

1.1. SUPERUSER

CREATE ROLE dba LOGIN
  PASSWORD 'your password'
  SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
			

1.2. 刪除用戶

dropuser -h192.168.1.1 -p 5432 -i -e testuser
User "testuser" and any owned databases will be permanently deleted.
Are you sure? (y/n) y
			
comments powered by Disqus