Full Stack Developer
It is made alive by PostgreSQL Global Development Group, a different group of many companies and individual contributors who made this possible. It is mainly run on Linux/Unix platform.
You will find PostgreSQL, also known as Postgres. This is an object-relational database management system, And it uses SQL (Structured query language) as its main query language. DBMS is a combination of applications, different utilities, and libraries. Over the years, there are no. database management systems out there. The object-relational database specifies large, shared databases.
An Ubuntu 18.04 Linux system
Access to a command-line/terminal window (Ctrl+Alt+T)
A user account with sudo privileges
To install from the official repository, you first need to add it to your system.
Import the GPG repository key with the commands:
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
Then, add the PostgreSQL repository by typing:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ 'lsb_release -cs'-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
After adding the official PostgreSQL repository, make sure to update the package list. Doing this ensures you install the latest PostgreSQL package.
sudo apt-get update
To install PostgreSQL and the PostgreSQL contribs package (which provides additional features), use the following command:
sudo apt-get install postgresql postgresql-contrib
By default, the software creates a postgres user, once you successfully install the database system. This user account has the default ‘postgres’ role.
To establish a connection with the newly set-up database, log into the postgres account with:
sudo su - postgres
Now open a postgress prompt using the command:
Accessing Postgres through terminal.
If you are connected to PostgreSQL and want to see details of the connection, use the command:
The output displays information on the database name, the account you are logged in, the socket path, and port number.
Subscribe to get latest updates