0 like 0 dislike
49 views

Please log in or register to answer this question.

0 like 0 dislike
answered by (210 points)  
selected by
 
Best answer

Change the password for a role:

ALTER ROLE daria WITH PASSWORD 'passwd123';

Change a password expiration date:

ALTER ROLE scott VALID UNTIL 'May 4 12:00:00 2015 +1';

Make a password valid forever:

ALTER ROLE luke VALID UNTIL 'infinity';

Give a role the ability to create other roles and new databases:

ALTER ROLE joelle CREATEROLE CREATEDB;

Give a role a non-default setting of the maintenance_work_mem parameter:

ALTER ROLE admin SET maintenance_work_mem = 100000;

Assign a role to a resource queue:

ALTER ROLE sammy RESOURCE QUEUE poweruser;

Give a role permission to create writable external tables:

ALTER ROLE load CREATEEXTTABLE (type='writable');

Alter a role so it does not allow login access on Sundays:

ALTER ROLE user3 DENY DAY 'Sunday';

Alter a role to remove the constraint that does not allow login access on Sundays:

ALTER ROLE user3 DROP DENY FOR DAY 'Sunday';

Related questions

0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
...