Postgresql basic SQL Alternate Commands

How to connect with postgres CLI

su postgres
psql -U postgres -W Password

Postgress keywords in comparison to MySQL

database=# \l                       //show databases
database=# \c database              // use database
database=# \dt                      // show tables;
database=# \d table                 // describe table
database=# \x on                    //syntax enabled


PG_VERSION is the necessary data directory of that table pg_filenode.map is necessary

how to take backup in psql

export PGPASSWORD=`cat /etc/heplify-server.toml | grep DBPass | awk '{print $3}' | tr -d '"'`
pg_dump -U homer_user -h localhost -d homer_config -t users > /root/backup.sql

How to configure SSL

Go to this Link

Enjoy 😉

No comments:

Post a Comment

SIPp UAC Scenario to send RTP

Please install the latest sipp ( >=3.7.3 ) wget https://github.com/SIPp/sipp/releases/download/v3.7.3/sipp chmor +x sipp mv sipp /usr/bin...