|
ALTER USERNameALTER USER — Modifies user account informationALTER USER username [ WITH PASSWORD 'password' ] [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ] [ VALID UNTIL 'abstime' ] Inputs
Outputs
DescriptionALTER USER is used to change the attributes of a user's Postgres account. Only a database superuser can change privileges and password expiration with this command. Ordinary users can only change their own password. Use CREATE USER to create a new user and DROP USER to remove a user. UsageChange a user password: ALTER USER davide WITH PASSWORD 'hu8jmn3';Change a user's valid until date ALTER USER manuel VALID UNTIL 'Jan 31 2030';Change a user's valid until date, specifying that his authorisation should expire at midday on 4th May 1998 using the time zone which is one hour ahead of UTC ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';Give a user the ability to create other users and new databases. ALTER USER miriam CREATEUSER CREATEDB; CompatibilitySQL92There is no ALTER USER statement in SQL92. The standard leaves the definition of users to the implementation. |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |