You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connecting to a postgresql cluster as the superuser azureuser on an Azure postgresql database.
Granting all privileges works:
template1=> create database test;
CREATE DATABASE
template1=> create user test;
CREATE ROLE
template1=> grant all privileges on database test to test;
GRANT
template1=> drop database test;
DROP DATABASE
but creating the database with owner test fails:
template1=> create database test owner test;
ERROR: must be member of role "test"
template1=> grant test to azureuser;
GRANT ROLE
template1=> create database test owner test;
CREATE DATABASE
verdi quicksetup currently creates the database with owner and grants all privileges
There is no need to grant privileges to the owner of an object (usually the user that created it), as the owner has all privileges by default. (The owner could, however, choose to revoke some of their own privileges for safety.)
I.e. I propose that we go the
template1=> create user test;
CREATE ROLE
template1=> grant test to azureuser;
GRANT ROLE
template1=> create database test owner test;
CREATE DATABASE
route.
Will open a PR for this.
The text was updated successfully, but these errors were encountered:
Connecting to a postgresql cluster as the superuser
azureuser
on an Azure postgresql database.Granting all privileges works:
but creating the database with owner
test
fails:verdi quicksetup
currently creates the database with owner and grants all privilegesaiida-core/aiida/manage/external/postgres.py
Lines 155 to 156 in 2c183fc
This is actually overkill: according to the postgres documentation
I.e. I propose that we go the
route.
Will open a PR for this.
The text was updated successfully, but these errors were encountered: