All Questions
Tagged with python postgresql
95 questions
1
vote
3
answers
199
views
ERROR: invalid byte sequence for encoding "UTF8": 0xdc 0x36
When running a \copy (either pgadmin or aws_s3.table_import_from_s3) of a 1.6GB file into an AWS Aurora Postgres-compatible database, I'm getting the following error:
ERROR: invalid byte sequence for ...
0
votes
0
answers
69
views
postgressql connection issues via python
I have a python code that runs simulations and writes the results to Postgres table. I have several machines on the network, But only the first one runs without any problems. other machines have ...
0
votes
1
answer
111
views
After upgrade Postgres python is the same version
I upgraded my postgres from 13.5 to 16.2 version (and the RHEL from 7.5 to 8.9).
The problem is, python was not upgraded.
I created procedure pyver():
CREATE OR REPLACE FUNCTION pyver ()
RETURNS TEXT
...
1
vote
0
answers
62
views
PostGres DB is read only in pgAdmin despite successful migration into it
I have an old MS Access Database that I want to migrate to a Postgres Db hosted in a Docker environment on a Windows Server.
I want to keep the MS Access Frontend, because it has some Forms and ...
1
vote
0
answers
651
views
Railway - problems with connecting to postgres in production
Django worked perfectly locally, but had errors in production (I was using the same postgres DB and configuration).
Django server, hosted on Railway gave me this:
Newtorking tab in Postgres settings ...
1
vote
0
answers
217
views
Writing large dataset from spark dataframe
We have a azure databricks job that retrieves some large dataset with pyspark. The dataframe has about 11 billion rows. We are currently writing this out to a postgresql DB (also in azure). Currently ...
0
votes
0
answers
71
views
Best way to set up tables for EOD stock database
Im a newbie with postgre, and the course I did focused on querying already existing databases, not creating a database from scratch.
Im aware that using csv tables might be the best way to go for ...
0
votes
0
answers
95
views
Postgresql: Does execute() or fetch() download result from remote?
When getting a query result from a remote server, does the execution of the query transmit the result to the local machine, or is it buffered on remote and only downloaded when fetching the result?
...
0
votes
0
answers
558
views
PostgreSQL Server shuts down automatically after python start
I am using the following code:
def start_postgresql_server():
status = subprocess.run(["pg_ctl", "-D", fr"C:/Program Files/PostgreSQL/14/data", "status"]...
0
votes
1
answer
225
views
Proper way of constructing database of historical datasets
I've been attempting to learn how to build a database of historical sports statistics using postgresql/sqlalchemy ORM the past few days and could really use some advice on approach. My use case seems ...
1
vote
1
answer
1k
views
postgres long running copy or batched inserts
I have lots of time-series data going into a postgres DB. The time series data comes into a message queue and is read by a consumer script and inserted into the database, the data is flowing ...
-1
votes
2
answers
414
views
Track row affected by a plpgSQL's DML from Python code block [closed]
I just wanted to know that how could I hold the value of a DML(affected rows) using python code.
Suppose a DML is affecting 10 rows so how will I print it using python.
db = psycopg2.connect(dbname=...
0
votes
2
answers
5k
views
Get column name and column type in the same query in the correct order using psycopg2
I have a postgresql database and I am querying it using psycopg2 and I need to get the data in the correct order as in table I have found different ways to get the column names from table and column ...
0
votes
1
answer
189
views
Advice for applying locks in my data processing pipeline
I currently have a Python program that enters rows into a Postgres table that essentially works as a list of data I need to process. These processes create on-disk files and trigger other behavior so ...
1
vote
0
answers
46
views
Migrations spreading to the wrong database (local environment)
I am working on one Flask project and one Ruby on Rails project, both using Postgres. When I migrate in Rails, the changes are implemented both in this database and in the database for the Flask ...