Top "Psycopg2" questions

Psycopg is a PostgreSQL adapter for Python programming language.

Use binary COPY table FROM with psycopg2

I have tens of millions of rows to transfer from multidimensional array files into a PostgreSQL database. My tools are …

python postgresql bulkinsert binary-data psycopg2
psycopg2 equivalent of mysqldb.escape_string?

I'm passing some values into a postgres character field using psycopg2 in Python. Some of the string values contain periods, …

sql postgresql psycopg2
No module named 'psycopg2._psycopg': ModuleNotFoundError in AWS Lambda

I have created a deployment package for AWS Lambda with my python file and the dependencies including sqlalchemy and psycopg2. …

aws-lambda psycopg2 amazon-rds
Turn pandas dataframe into a file-like object in memory?

I am loading about 2 - 2.5 million records into a Postgres database every day. I then read this data with pd.…

pandas psycopg2
psycopg2.InterfaceError: connection already closed / pgr_astar

I am using psycopg2 to access a postgresql database from python. When I try to run the pgrouting function "pgr_…

python postgresql psycopg2 a-star pgrouting
Copying data from S3 to AWS redshift using python and psycopg2

I'm having issues executing the copy command to load data from S3 to Amazon's Redshift from python. I have the …

python psycopg2 amazon-redshift
ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/libpq.so.5)

I have to run a tornado webapp on a server using psycopg2 with postgresql as backend. I am working on …

postgresql psycopg2 glibc rhel libpq
PostgreSQL - how to run VACUUM from code outside transaction block?

I am using Python with psycopg2 and I'm trying to run a full VACUUM after a daily operation which inserts …

python sql postgresql psycopg2 vacuum
set transaction\query timeout in psycopg2?

Is there a way to set a timeout in psycopg2 for db transactions or for db queries? A sample use-case: …

heroku transactions timeout psycopg2
SQLAlchemy, Psycopg2 and Postgresql COPY

It looks like Psycopg has a custom command for executing a COPY: psycopg2 COPY using cursor.copy_from() freezes with …

postgresql sqlalchemy psycopg2