Загрузка видео...

Не удалось загрузить видео

На главную

This SQL query looks like it should fail immediately. Instead, it runs and quietly returns the wrong result. Why doesn’t the database complain?

11,376 просмотров • 8 месяцев назад •via X (Twitter)

Комментарии: 0

Нет доступных комментариев

Здесь появятся комментарии из оригинального поста

Похожие видео

Another insane Jev use case! Traditional database filters need precise, predefined conditions. But many questions are semantic: - Is this article mainly about software engineering? - Which topic best describes it? - How technically deep does it appear? These usually require moving rows into application code, invoking a model, parsing its output, and writing the result back. pg-jev is an open-source Postgres extension that exposes Jev through SQL functions. - jev() works inside WHERE - jev_prob() returns a probability - jev_choice() selects a label - jev_score() ranks rows across ordered levels. It needs no vector column or embedding index. Under the hood, pg-jev batches rows, sends them to Jev, and returns typed answers that SQL can filter, sort, group, and combine with exact predicates. The recording below runs it against real Hacker News stories stored in Postgres. It first shows the rows, then asks Jev to find software-engineering stories, classify them by topic, and rank them by technical depth. The final query reports requests, tokens, cost, and cache hits from the database session. GitHub repo: (don't forget to star it ⭐) Postgres keeps the data and controls the query, while Jev handles the part SQL cannot express as a deterministic condition. If you want to understand what Jev is doing under the hood, I also wrote a hands-on guide to building a Jev-style model with open models, entirely locally. Read it below.

Avi Chawla

299,377 просмотров • 20 дней назад

A DEVELOPER FOUND SEVEN WAYS TO TAKE DOWN A PRODUCTION DATABASE THAT ALL LOOK EXACTLY LIKE NORMAL, INNOCENT CODE AND ALMOST EVERY TEAM IS SHIPPING AT LEAST ONE OF THEM RIGHT NOW 17 minutes from Josh Berkus, one of the people who actually maintains PostgreSQL, walking through the quiet mistakes that turn a healthy database into a 3am outage. -> The moment it lands, you realize none of these are exotic attacks. They're ordinary-looking decisions -- a query that locks a table, a connection that never closes, a setting no one ever questioned -- that work perfectly until the day they don't, and then they take everything down with them. The scary part isn't that the database breaks. It's how normal the code looks right up until it does. A query that runs in 5ms on your laptop and 5 minutes on prod. A migration that silently locks the whole table. A connection pool that runs dry the moment real traffic shows up. Every one of them passed review. Writing SQL that runs was never the hard part -> writing SQL that survives production is. And now that an AI agent is generating and firing queries at your real database faster than anyone can read them, every one of those seven landmines is one autocomplete away -- and the only person who can stop it is the one who already knows where they're buried. Your database doesn't go down because someone attacked it. It goes down because something that looked completely normal finally caught up with it. Save and Watch it today. You'll see the next outage coming before it lands ↓

slash1s

22,268 просмотров • 4 месяцев назад