pg database new account, assign permissions, delete account

- switching to the administrator account (postgres), new ordinary account 
the CREATE  the USER test_phq the WITH PASSWORD ' PCMS ' ;
 - Switch to the specified database public (yuding), the database level permissions given 
the GRANT  ALL  PRIVILEGES  the ON  DATABASE yuding the TO test_phq;
 - - switch to the specified database public (yuding), given full access to all the tables 
the GRANT  aLL  pRIVILEGES  the ON  aLL tABLES     the iN  SCHEMA  public  the tO test_phq;
 - switch to the specified database public (yuding), given full access sequence all 
the GRANT  aLL  pRIVILEGES  ON  ALLSequences the IN  SCHEMA  public  the TO test_phq;
 - Switch to the specified database public (yuding), delete the common account 
The REASSIGN OWNED BY test_phq the TO Postgres;
 the DROP OWNED BY test_phq;
 the DROP  the USER test_phq;

 

Guess you like

Origin www.cnblogs.com/penghq/p/12120922.html