Skip to content

Instantly share code, notes, and snippets.

@Larivact
Last active January 13, 2016 13:14
Show Gist options
  • Save Larivact/4f2b634fb3f4fb022669 to your computer and use it in GitHub Desktop.
Save Larivact/4f2b634fb3f4fb022669 to your computer and use it in GitHub Desktop.

python -c "import psycopg2; print psycopg2.__version__"

http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.Diagnostics

sudo pip install psycopg2 --upgrade

Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
sudo apt-get install python-dev
sudo apt-get install postgresql-9.1
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev

http://initd.org/psycopg/docs/module.html#psycopg2.Error.diag

http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment