psycopg3 Questions
1
I have a Python project managed with Poetry.
I want to install either psycopg[binary] or psycopg[c] via
$ poetry install -E pgbinary
or
$ poetry install -E pgc
These extras should be mutually exc...
Casabonne asked 12/6 at 9:43
1
Solved
I see references to both psycopg2 and psycopg3, but no clear guidance wrt a roadmap for transitioning between the two. I see that over time there is a large body of SO questions regarding psycopg2....
5
Solved
I have installed the psycopg2 with this command in my package folder :
pip install --target ./package psycopg2 # Or
pip install -t ./package psycopg2
now psycopg2 module is in my package and I hav...
Carnahan asked 16/3, 2022 at 7:56
2
I need to upgrade the following code to some equivalent code based on psycopg version 3:
import psycopg2
from sqlalchemy import create_engine
engine = create_engine('postgresql+psycopg2://', creat...
Garnettgarnette asked 3/9, 2022 at 23:55
2
I installed pyscopg3 on my venv using pip install psycopg[binary] as per the documentation but I still get an import error:
Exception has occurred: ImportError
no pq wrapper available.
Attempts mad...
2
In Python is library psycopg and with that I can do queries.
I have an array with texts and I just iterate over them and run query to find this text in postgres. But some time the query takes so mu...
Roadrunner asked 29/12, 2022 at 21:58
0
How can I pass a list to an IN statement in a query using psycopg's named arguments?
Example:
cur.execute("""
SELECT name
FROM users
WHERE id IN (%(ids)s)
"""...
1
I've been asked to migrate a program from psycopg2 to psycopg3. In this program they use
with connection.cursor(cursor_factory=RealDictCursor) as cursor:
to obtain a dictionary that's later turned...
Foredate asked 22/11, 2022 at 8:25
4
Solved
I am building a simple DB interface in Python (3.9.9) and I am using psycopg (3.0.7) to connect to my Postgres (14.1) database. Until recently, the development of this app took place on Linux, but ...
1
© 2022 - 2024 — McMap. All rights reserved.