Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Double-Booking This Schema Is Built to Allow

Ask anyone who knows PostgreSQL how to stop two clients booking the same specialist at the same time, and the answer comes fast: an EXCLUDE constraint with btree_gist , one && on a tstzrange , done at the database level, no application code to trust. It’s the right answer to the question most people are asking. It’s the wrong answer to the one KRI , the booking SaaS I designed and built for…

When planning appointments for beauty professionals using a PostgreSQL database, it is crucial to prevent double bookings. The most common solution is to use an EXCLUDE constraint with btree_gist, specifying && on a tstzrange. This approach is effective at the database level, eliminating the need for additional application code.

However, the booking SaaS KRI designed for beauty businesses requires a different rule. The business needs to ensure that a client's booking does not overlap any live booking for that specialist, whether it originated from a client or the owner. This order-dependent rule cannot be satisfied by a simple UNIQUE or EXCLUDE constraint over the booking intervals.

Instead, KRI implements the client-facing guard within an application transaction. A database routine or trigger with appropriate locking could also be an alternative design, but using the application path consistently is essential.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A search daemon is a database server: 151 Manticore title matches

A search daemon is a database server: 151 Manticore title matches Manticore Search is a search engine that speaks a SQL-like query language and a MySQL-compatible protocol.

  • Manticore Search operates as a search daemon, functioning as a database server
  • 151 title matches found for "Manticore" by ZoomEye on October 14, 2026
  • Exposing the daemon's network access poses significant security risks

Building Adobe, Vecteezy and Dreamstime CSVs From One Folder of Assets

I still have the rejection email open in a tab from last March. I had generated a batch of 120 sticker assets, spent an evening building what I thought was a clean upload spreadsheet, pasted 120 rows…

  • Script "makemetadata.py" generates correct CSV headers for Adobe, Vecteezy, and Dreamstime.
  • Uploadtracker.py prevents duplicate submissions and maintains trust with reviewers.
  • Specific folder layout and minimal memory usage streamline the asset pipeline process.

Auditly: the shopkeeper talks, the ledger writes itself

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built My local kirana shop keeps its accounts in a paper khata.

  • Auditly simplifies Indian shopkeepers' paper ledgers by speech input.
  • Users speak transactions in Hindi/Hinglish, app converts to structured records.
  • Features include expense recording, review screen, and Hindi voice output.

More from Sunday 18 October →