Site icon Database Tutorials

How To Change PostgreSQL User While Connected To The Database

After connecting to the database in PostgreSQL, you may want to change the user you are connected to.

You may want to read the article entitled “How To Connect To Database On PostgreSQL” for how to connect to PostgreSQL.

Change Postgresql User

You can switch to the testuser user from the current user with the command below.

 

What is current user?

You can find the user you are connected to with the command below.

Exit mobile version