Questions tagged [py-postgresql]

py-postgresql is Python 3 driver for connecting to PostgreSQL database servers.

py-postgresql is Python 3 driver for connecting to PostgreSQL database servers. See http://python.projects.postgresql.org for more information.

6 questions
7
votes
1 answer

psql can connect to a unix domain socket, but py-postgresql with the same parameters gets 'Permission denied'

Problem description: My system user is milosz, which is mapped to the PostgreSQL user project_great in pg_ident.conf. I am using peer authentication to connect to a PostgreSQL database over a unix domain socket. This connection method works when…
Milosz
  • 2,924
  • 3
  • 22
  • 24
3
votes
1 answer

py-postgresql multithread problems

I discovered that under heavy load my pyramid web app throws py-postgresql exceptions like postgresql.exceptions.ProtocolError. Some search revealed, that py-postgresql is not thread-safe and one connection can not be used by several threads…
2
votes
3 answers

Unable to open a connection to PostgreSQL from Python3

I'm running into a weird problem where I'm unable to connect to PostgreSQL from a Python 3.2 install. I'm running Fedora 15 and have installed Python3 and PostgerSQL9 from the Fedora repositories using yum. Does anyone have any ideas on why I'm…
thetaiko
  • 7,816
  • 2
  • 33
  • 49
1
vote
1 answer

Py-postgresql: WHERE param = None not working

I am using python3.6 and py-postgresql==1.2.1. I have the following statement: db.prepapre("SELECT * FROM seasons WHERE user_id=$1 AND season_id=$2 LIMIT 1), where season_id can be NULL. I want to be able to be able to get the latest record with a…
ypicard
  • 3,593
  • 3
  • 20
  • 34
0
votes
2 answers

Memory efficient way of fetching postgresql uniqueue dates?

I have a database with roughly 30 million entries, which is a lot and i don't expect anything but trouble working with larger database entries. But using py-postgresql and the .prepare() statement i would hope i could fetch entries on a "yield"…
Torxed
  • 22,866
  • 14
  • 82
  • 131
0
votes
1 answer

Using py-postgresql with encrypted password

in python I can connect a PostgreSQL database with the following code: db = postgresql.open(“pq://$user:$pass@$host:$port/$dbname”) But in the above line I have to enter the plaintext password and then py-postgresql will hash it to compare with the…
user1067671
  • 231
  • 1
  • 5
  • 10