Skip to main content

All Questions

Tagged with
-1 votes
0 answers
55 views

Python says it has inserted row into DB, but it hasn't

I am working on a simple auth system for one of my projects. I have a PostgreSQL database with 2 tables, "public"."app_users" and "public"."active_logins" The ...
Hugo Haaxman's user avatar
-2 votes
2 answers
87 views

Fastest way to convert results from tuple of tuples to 2D numpy.array

I'm training my AI model with a huge data set, so that it's impossible to preload all the data into memory at the beginning. I'm currently using psycopg2 to load data from a Postgresql DB during ...
Leon's user avatar
  • 2,107
1 vote
0 answers
62 views

UnicodeDecodeError using PostgreSQL DB for DRF project on Windows

I'm working on a team project on DRF, which uses PostgreSQL-based DB, my local PostgreSQL version is 17. The problem is that all of my colleagues have Ubuntu OS on their devices (and the project ...
TiimeIrre's user avatar
  • 253
0 votes
0 answers
40 views

How to use peewee for `COPY FROM` with `FORMAT BINARY`?

I'm trying to load sparse vectors into a table managed by PostgreSQL. For simplicity, let's suppose that the table has only two fields: a vector ID and the vector itself (which is the result of ...
TopCoder2000's user avatar
1 vote
0 answers
52 views

Optimizing Django ORM for Hybrid Queries (PostgreSQL + Vector Similarity Search)

I'm implementing a RAG (Retrieval-Augmented Generation) system that requires combining traditional Django ORM filtering with vector similarity searches. The specific workflow needs to: First filter ...
MD Abdur Rahim's user avatar
0 votes
1 answer
51 views

Can't inspect database when using sqlalchemy

I have a postgres database inside a docker container. I compose it up with this docker-compose.yaml: services: db: container_name: postgres image: postgres:latest restart: always ...
franjefriten's user avatar
0 votes
0 answers
63 views

Optimize INSERT from staging table into spatial table

Background: I use airflow to orchestrate an ETL process which moves data from snowflake to s3 and from s3 to Postgres. The entire process moves around 80 million rows of data from snowflake to ...
Olek's user avatar
  • 69
0 votes
1 answer
67 views

Querying data iteratively, is there a better way of doing this?

I'm trying to gather data using a set of IDs from one dataset and querying them against a PostgreSQL table using psycopg2 in Python. Here is the code: for i in range(0, len(ids_df), 2000): print(f&...
jp207's user avatar
  • 194
-1 votes
1 answer
53 views

my odoo database failed to initailize after running the python odoo command

C:\Program Files\Odoo 18.0.20250401\server>python odoo-bin -r myuser -w 1234567890 -d myuser_database ERROR: couldn't create the logfile directory. Logging to the standard output. 2025-04-03 11:17:...
Oluwasemilore's user avatar
1 vote
1 answer
68 views

How Can I Match Percentile Results in Postgres and Pandas?

I am making calculations in the database and want to validate results against Pandas' calculations. I want to calculate the 25th, 50th and 75th percentile. The end use is a statistical calculation so ...
Python_Learner's user avatar
0 votes
0 answers
58 views

Connect to postgresql using Python from a remote desktop/cloud PC environment

Setup a scene here. It is bit long. apology Three independent postgresql DBs in a highly secured enterprise environment in terms of data privacy and DB access. Test Postgresql DB can be accessed from ...
UpLevel's user avatar
  • 13
0 votes
0 answers
33 views

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in Django connection with PostgreSQL in Docker

I am trying to connect my Django application to PostgreSQL running in a Docker container, but when I execute python manage.py runserver or python manage.py makemigrations, I get the following error: ...
Gustavo Luis Serpa's user avatar
2 votes
2 answers
158 views

How to automatically update extra column in sqlalchemy association table?

I have a postgresql database setup with sqlalchemy, joined table inheritance and a many-to-many association table with an extra column position, i.e. assessments and tasks are related via the ...
colidyre's user avatar
  • 4,800
2 votes
1 answer
74 views

Comments on columns in Postgres table is Null

I added comments in my postgres table using this method, statement ran successfully. COMMENT ON TABLE statements IS 'Table storing bank transaction data imported from statements sheet'; COMMENT ON ...
Kundan's user avatar
  • 610
0 votes
1 answer
96 views

Using same code to access database in different containers

I'm developing a small telegram bot+mini app in python that will access postgres database. I've already written some basic code for interacting with db for bot and it seems that mini app will be very ...
Pixol20's user avatar

15 30 50 per page
1
2 3 4 5
861