Switch to postgresql acoount

0 votes
How do I switch to PostgreSQL account? So basically, I have two accounts on my ubuntu system. On one of them, I have postgresql installed. How do I switch to that account?
Mar 22, 2019 in Database by Neel
785 views

1 answer to this question.

0 votes

Switch over to the postgres account on your server by typing:

sudo -i -u postgres

You can now access a Postgres prompt immediately by typing:

psql

This will log you into the PostgreSQL prompt, and from here you are free to interact with the database management system right away.

Exit out of the PostgreSQL prompt by typing:

\q
answered Mar 22, 2019 by Kyraa

Related Questions In Database

+1 vote
1 answer

How to migrate a PostgreSQL database into a SQLServer one?

Hello @kartik, The easier way to accomplish this. First ...READ MORE

answered May 13, 2020 in Database by Niroj
• 82,840 points
991 views
0 votes
1 answer

How to generate the statement CREATE TABLE for an existing table in postgreSQL?

Generate table creation statement for an existing ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
6,613 views
0 votes
1 answer

Ways to improve query performance using Index hunting

Index hunting help in improving query performance ...READ MORE

answered Aug 29, 2018 in Database by CodingByHeart77
• 3,750 points
2,302 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,250 points
1,268 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,268 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
844 views
0 votes
1 answer

Create new role - postgresql on ubuntu

If you are logged in as the postgres account, ...READ MORE

answered Mar 22, 2019 in Database by Danny
957 views
0 votes
1 answer

Reset a sequence in Oracle

You can try out something like this create ...READ MORE

answered Sep 24, 2018 in Database by DataKing99
• 8,250 points
4,971 views
0 votes
1 answer

What are the prerequisites to install PostgreSQL on Ubuntu?

Before you start installing postgreSQL, make sure ...READ MORE

answered Mar 22, 2019 in Database by Manoj
809 views
0 votes
3 answers

MySQL "Could not create connection to database serve" error

Pls check that you have MySQL server ...READ MORE

answered Jul 3, 2020 in Database by anonymous
29,899 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP