Replace py-postgresql with psycopg2