AI

0001-01-01

The JOIN That Silently Loses Rows

The most common AI SQL mistake: a LEFT JOIN paired with a WHERE clause that filters on the right-side table, silently turning an outer join into an inner join and dropping the rows you asked for.

0001-01-01

COUNT(*) After a JOIN Counts Rows, Not Things

After a JOIN, COUNT(*) counts the rows in the intermediate result — which is not the same as counting the distinct entities you care about. The wrong number is plausible, which makes it dangerous.

0001-01-01

The Schema Decision AI Cannot Make

AI tools default to TEXT columns and application logic because they do not know what your database can express. Knowing PostgreSQL’s range types, exclusion constraints, and generated columns changes what you ask for — and what you get.