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
46 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

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,710 points
147 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,130 points
77 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,290 points
544 views
0 votes
1 answer

What are the ways to get the count of records in a table

To count the number of records in ...READ MORE

answered Sep 26, 2018 in Database by Sahiti
• 6,290 points
120 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22, 2019 in Database by Nitesh
80 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
55 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
63 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,130 points
616 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
120 views
0 votes
2 answers

MySQL "Could not create connection to database serve" error

When I am trying to connect netbeans ...READ MORE

answered Apr 14, 2019 in Database by anonymous

edited Apr 15, 2019 by Kalgi 4,220 views