Postgresql is an open source object relational database. It is often thought of as an alternative to MySQL.
In this post I’ll provide the steps required to install Postgresql on a developer laptop, assuming that work will be done in both SQL and Python.
You can learn more at:
Open a command prompt and enter the following commands.
sudo apt-get install postgresql postgresql-common postgresql-contrib \ postgresql-client postgresql-client-common \ pgsnap pgadmin3 pgpool2 ptop pgtune pgloader pgagent \ python-pygresql postgresql-plpython-9.1 python-psycopg2
You’ll see a list of additional packages that will be installed by default.
The following extra packages will be installed:
libossp-uuid16 libpgpool0 libpq5 libwxbase2.8-0 libwxgtk2.8-0 pgadmin3-data php5-cli php5-common php5-pgsql postgresql-9.1 postgresql-client-9.1 postgresql-contrib-9.1 python-support
Each of the installed packages are described below.
This is the core Postgresql object relational database server.
Add the ability to setup a cluster of Postgresql database servers.
Command line client for interacting with a Postgresql database, including the psql command.
Allows multiple clients to be installed as part of a Postgresql cluster.
Generates a Postgresql performance report in HTML format.
GUI tool to work with Postgresql. Personally, I prefer some of the commercial tools, such as Navicat on Linux or EMS SQL Manager on Windows.
Middleware between a Postgresql client and a Postgresql server that provides connection pooling, replication and load balancing, among other things.
CLI based performance monitoring tool that’s analogous to the Linux psql command
Automatically tunes the Postgresql configuration file postgresql.conf based on the system’s hardware.
Utility for loading flat files and CSV files into a Postgresql table.
Job scheduler for Postgresql.
Python module that allows you to query a Postgresql database from a python script. Basically, this is for python developers who need to query Postgresql.
Allows SQL developers to extend their SQL script by writing procedural functions in python.
Similar to python-pygresql, except that python-psycopg2 is designed for heavily threaded python scripts that create and destroy a large number of cursors, and execute a high volume of INSERTs and UPDATEs.