0

Postgres: What is difference between "Locking Account" and "Alter Account valid until"?

ALTER USER john VALID UNTIL 'Jan 31 2030';

and 

ALTER ROLE john LOCK TIME 'Jan 31 2030';
ALTER ROLE john ACCOUNT LOCK 'Jan 31 2030';

Note: The USER, ROLE are kind of similar (CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE) Kinda Confusing.

Krishna
  • 501
  • 1
  • 8
  • 17
  • 2
    The difference is, that [there is no](https://www.postgresql.org/docs/current/sql-alterrole.html) `account lock` in Postgres –  Mar 17 '20 at 06:37
  • But is says ACCOUNT LOCK stuff, https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/user-guides/database-compatibility-for-oracle-developers-guide/11/Database_Compatibility_for_Oracle_Developers_Guide.1.035.html – Krishna Mar 17 '20 at 14:52
  • That's an extension provided by the commercial version of EnterpriseDB? Are you using that? –  Mar 17 '20 at 15:47

0 Answers0