postgresql linux code example

Example 1: install postgresql ubuntu

sudo apt install postgresql postgresql-contrib

Example 2: désinstaller postgresql linux

sudo aptitude purge postgresql postgresql-common
sudo dpkg -P postgresql-8.4

sudo find / -name postgresql -exec rm -Rf {} \;
sudo find / -name pgsql -exec rm -Rf {} \;
sudo find / -name psql -exec rm -Rf {} \;

sudo userdel postgres

Example 3: how to run postgresql in linux

sudo service postgresql-9.3 initdb
sudo service postgresql-9.3 start

Example 4: linux psql

psql "dbname=dbhere host=hosthere user=userhere password=pwhere port=5432 sslmode=require"

Tags:

Sql Example