Last Updated on
This post shows how to log in as another user to pgAdmin 4 accessible via a web browser.
Let us say that we are new to PostgreSQL and made it through the installation process without any issue. We also installed pgAdmin 4 and used the Postgres (user) login role credentials.
Thereafter, we created another superuser login role.
CREATE ROLE mydev LOGIN PASSWORD 'password' SUPERUSER VALID UNTIL '2025-1-1 00:00';
Then we decided to use mydev to log in instead of postgres role. But we are unable to change the “connection settings” because the fields related to connections are not editable.
Log in as a different user
To log in as a different user, we need to create another “server” – basically, connection configuration.
The bottom line is to simply create another “server” in the pgAdmin 4 with another name to avoid name-conflict with existing “servers”.