How to use ALTER USER command in PostgreSQL

ALTER USER changes the attributes of a PostgreSQL user account. 

Examples

1.Change a user's password:
  ALTER USER davide WITH PASSWORD 'hu8jmn3';

2.Change the expiration date of the user's password:
  ALTER USER manuel VALID UNTIL 'Jan 31 2030';

3.Change a password expiration date, specifying that the password        should expire at midday on 4th May 2005 using the time zone which is    one hour ahead of UTC:
  ALTER USER chris VALID UNTIL 'May 4 12:00:00 2005 +1';

4.Make a password valid forever:
  ALTER USER fred VALID UNTIL 'infinity';

5.Give a user the ability to create other users and new databases:
  ALTER USER miriam CREATEUSER CREATEDB;

Comments

Popular posts from this blog

[FATAL] [DBT-10503] Template file is not specified

Resolving ORA-10635 and ORA-39171 Errors During BLOB Tablespace Maintenance

How to resolve RMAN-06035: wrong version of recover.bsq, expecting 11.2.0.4, found 11.2.0.2