Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
66 views

Find and conditionally sort all venues matching a filter provided by an API client in PostgreSQL

I have an API where users can retrieve a list of "venues". Every venue is a profile, but not every profile is a venue Venues can be "parents" of other venues (think hotel - floor -...
Felix ZY's user avatar
  • 103
3 votes
0 answers
58 views

Django migration script to add metadata

I made a simple django migration that adds two field to our Invoices model : first_payment and first_paying_month. ...
Taek's user avatar
  • 131
4 votes
0 answers
112 views

Interacting with PostgreSQL attachment and the file system

I have just migrated from Python 2 to Python 3. I have written the following script to fetch all records of a table, ir_attachment, from PostgreSQL. After fetching all the records I check following ...
Ibrahim Rahimi's user avatar
1 vote
1 answer
210 views

Reading employee data from a PostgreSQL database

I have developed this script to read employee_language table records of a PostgreSQL database using Python 2 (due to some OS limitation). I want to find duplicate ...
Ibrahim Rahimi's user avatar
3 votes
1 answer
59 views

Enforcing a constraint that a user may vote on each post at most once

I have the following table in a PostgreSQL database: ...
BigSpicyPotato's user avatar
3 votes
1 answer
69 views

Python script to find employees who are in one PostgreSQL table but not in another

I'm writing a python script and do database query to get the ids of employees who are in one table but are not in another. I'm using psycopg2 module for python 2 and PostgreSQL as database. After ...
Ibrahim Rahimi's user avatar
3 votes
0 answers
1k views

PL/pgSQL function to test if a word is contained within a phrase

I am using PostgreSQL 11.0 and I wrote a PL/pgSQL function to test if a word or phrase is contained within another phrase. This function is called several times within another function to extract some ...
Nina's user avatar
  • 131
1 vote
1 answer
163 views

slow JavaFx PostgreSQL CRUD app with complex object

I've created a JavaFX app to the data about Vessels, Employees and Jobs. The current version works but it is quite slow which I need to fix. I understand the root of my problems but I do not know how ...
CorellianAle's user avatar
3 votes
1 answer
59 views

Iterate between dates and INSERT values in a performant way

I have created a query that populates a datapoint with random values. The logic is simple: Iterate between the START and END dates and INSERT random values. I want from this query to be very ...
Superluminal's user avatar
2 votes
1 answer
616 views

Offset vs Cursor Pagination

I am trying to compare any performance gain(s) from moving a current offset-based pagination endpoint to a cursor based one. I have the following ruby code: ...
Anthony's user avatar
  • 439
2 votes
4 answers
2k views

C# SQL query builder to fill DataTable

I'm trying to optimize my code and in the process of doing that I made a class Query_builder that handles SQL queries. That class has couple of methods: ...
Marko Petričević's user avatar
0 votes
1 answer
56 views

Count buffered streets that intersect buffered points using PostGIS

PostgreSQL 9.5.1 with PostGIS 2.0 extension This first section creates an intersection (clip) of the streets from another polygon (MTC15), then it buffers the intersection: ...
Matt's user avatar
  • 141
2 votes
1 answer
231 views

Listing employees, categorized by license expiration date

I am working on a personal project and I have hit a wall. I know I am writing bad code and I really want to refactor the code below. The application has three tables on the same page. Each table ...
Benjamin's user avatar
2 votes
1 answer
803 views

Parsing data from big json field and geocode services then store to PostgreSQL using psycopg2 instead django-orm

This code works, but my boss told me that it's very bad code, and don't want to deploy it. It is my first time working as a programmer and I have at least 3 months of experience. ...
kAldown's user avatar
  • 131
2 votes
2 answers
2k views

Database migration script

I'm working on a database migration script written in python, which will take data from a MySQL database and insert them into a PostgreSQL database with a different Schema (different table structures, ...
lese's user avatar
  • 145

15 30 50 per page