Top "Psycopg2" questions

Psycopg is a PostgreSQL adapter for Python programming language.

How can I get affected row count from psycopg2 connection.commit()?

Currently, I have the following method to execute INSERT/UPDATE/DELETE statements using psycopg2 in Python: def exec_statement(_cxn, _…

python psycopg2
Create a Postgres database using python

I want to create Postgres database using Python. con = psql.connect(dbname='postgres', user=self.user_name, host='', password=…

python postgresql psycopg2
Trouble installing psycopg2 on CentOS

I'm trying to install psycopg2 on CentOS, I followed everything on this tutorial from "On with it: Installing Python 2.6" all …

python postgresql installation centos psycopg2
Execute .sql schema in psycopg2 in Python

I have a PostgreSQL schema stored in .sql file. It looks something like: CREATE TABLE IF NOT EXISTS users ( id …

python postgresql schema psycopg2
Psycopg2, Postgresql, Python: Fastest way to bulk-insert

I'm looking for the most efficient way to bulk-insert some millions of tuples into a database. I'm using Python, PostgreSQL …

python postgresql psycopg2
How to quote a string value explicitly (Python DB API/Psycopg2)

For some reasons, I would like to do an explicit quoting of a string value (becoming a part of constructed …

python sql django psycopg2
error installing psycopg2, library not found for -lssl

I run sudo pip install psycopg2 and I get a bunch of output that looks like: cc -DNDEBUG -g -fwrapv …

python postgresql psycopg2
Passing table name as a parameter in psycopg2

I have the following code, using pscyopg2: sql = 'select %s from %s where utctime > %s and utctime < %s …

python sql postgresql sql-injection psycopg2
psycopg2 TypeError: not all arguments converted during string formatting

I'm trying execute a simple query, but getting this error no matter how I pass the parameters. Here is the …

python trac psycopg2
psycopg2 installation error - Library not loaded: libssl.dylib

I try to install psycopg2 in a virtualenv using pip, the compilation looks ok, it says "Successfully installed psycopg2", but …

python virtualenv psycopg2