Archives for Data Base

Quickly copy a PostgreSQL database

Often I need to create copies of databases so I can test a new stored procedure or if what I’m doing could get in the way of other developers. The easiest way I’ve found to make a personal clone of a PostgreSQL database is by command line using psql, pg_dump and pg_restore. First back up [...]

PostgreSQL with Python using Psycopg

The business intelligence suite I manage at work is built on PostgreSQL and Python. I work on the code that sits between the database and the internet/front-end to move data accross layers. From the start of the project I used the PyGreSQL module, see this post for info, so my scripts could interface with the database. One [...]

PostgreSQL with Python using PyGreSQL

New Ubuntu boxes wont have PostgreSQL unless specified at OS installation. Here is the official guide for installation and set up of PostgreSQL database. If your using a gui then for convenience sake its worth getting ‘pgadmin3‘. sudo apt-get install postgresql pgadmin3 Most of my work with Postgre uses ‘pgdb’ from the PyGreSQL module. Its DB-API compliant which is [...]