Sign in

PostgreSQL Hero

@postgresqlhero.bsky.social
279 followers 2.1K following 281 posts

Want to learn about PostgreSQL? You are in the good place! 🔗 postgresqlhero.alexisbouchez.com

PostsRepliesMedia
PostgreSQL Hero @postgresqlhero.bsky.social · 13/12/2025
youtu.be/63PnJkdxCLg
youtu.be
The best website to become a PostgreSQL expert
YouTube video by Alexis Bouchez
0431
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
Michael Stonebraker, the creator of PostgreSQL, also created Ingres. Ingres was sold. Got acquired. Became proprietary. So he made POSTGRES - to never let that happen again. 30+ years later, it's still free. Still community-owned. Still thriving. 🐘
071
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: The PostgreSQL version numbering used to be X.Y.Z (like 9.6.24). In 2017 they switched to X.Y (like 10.0, 11.0...). Why? Because people kept thinking 9.5 and 9.6 were minor updates. They weren't - they were massive releases. 🐘
161
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: Instagram ran on PostgreSQL when they were acquired by Facebook for $1 billion. 3 engineers. 30 million users. PostgreSQL. They didn't need to 'scale to NoSQL'. Postgres handled it. 🐘📸
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL releases a new major version every year like clockwork. They've done this since 2017. Every fall, a new major version drops. No drama. No delays. Just consistent, boring reliability. That's the elephant way. 🐘
031
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: Apple ships PostgreSQL with every Mac. It's been bundled with macOS since 10.7 Lion (2011). Next time someone says 'I've never used Postgres' - if they have a Mac, they technically have. 🐘🍎
021
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL was the first database to implement MVCC (Multi-Version Concurrency Control). This lets readers never block writers and writers never block readers. Oracle later 'invented' the same thing. PostgreSQL had it in 1999. 🐘
021
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL is older than MySQL. PostgreSQL: 1996 MySQL: 1995 (barely) But POSTGRES (the project) started in 1986 - making the underlying technology a decade older. The old elephant has seen things. 🐘
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL has been open source since 1996 and has NEVER been owned by a corporation. It's maintained by a global community of volunteers and companies who contribute. No single company can buy it, fork it, or kill it. True open source. 🐘
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL's elephant mascot is named 'Slonik'. The name comes from the Russian word for 'little elephant' (слоник). Why an elephant? Because elephants never forget - just like PostgreSQL never loses your data. 🐘
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
TIL: PostgreSQL was originally called POSTGRES (no SQL). It was created at UC Berkeley in 1986 by Michael Stonebraker. The 'SQL' was added in 1996 when SQL support was added. The name is a play on 'Ingres' - Stonebraker's previous database. Post-Ingres → Postgres 🐘
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 05/12/2025
FUN FACT: postgresqlhero.vercel.app runs a full PostgreSQL database directly in your browser using PGlite. No server. No backend. Just WASM magic under 3MB. Learn SQL for free without us paying a cent for infrastructure 🐘
PGlite homepage - Embeddable Postgres in WebAssembly
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
A SQL query walks into a bar, walks up to two tables and asks... "Can I join you?"
092
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
One simple trick to speed up your queries 👇
SQL code: DELETE FROM bad_habits WHERE type = using IN with subqueries
071
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Every MySQL user eventually...
PostgreSQL meme
071
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
PostgreSQL fans be like 🐘
PostgreSQL meme
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Top N per group? LATERAL JOIN. The most underrated SQL feature.
SQL code snippet
061
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Division by zero? NULLIF handles it. Returns NULL instead of crashing.
SQL code snippet
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Subqueries are unreadable. CTEs are not. Use WITH.
SQL code snippet
052
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Need a comma-separated list from SQL? STRING_AGG. No app code needed.
SQL code snippet
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
INSERT or UPDATE? Both. ON CONFLICT DO UPDATE = upsert in one atomic query.
SQL code snippet
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Need a list of dates? Don't loop. generate_series() is your friend.
SQL code snippet
042
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
COUNT with conditions? Use FILTER. One query. Multiple counts. No subqueries.
SQL code snippet
161
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
INSERT and get the ID back. One query. Stop doing 2 round trips to your database.
SQL code snippet
051
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
PostgreSQL's secret weapon: DISTINCT ON Get the latest row per group in one query. No window functions needed.
SQL code snippet
041
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 04/12/2025
Stop writing CASE WHEN for null checks. COALESCE exists.
SQL code snippet
041
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
python's ecosystem is unmatched
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
once you go typescript you can't go back
111
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
once you go typescript you can't go back
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
once you go typescript you can't go back
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
011
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
typescript is just javascript that respects you
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
types are documentation that doesn't lie
001
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
"we need a document database" you need JSONB. you already have it.
111
Reposted by PostgreSQL Hero
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
the local LLM + RAG + SQL agent combo is incredibly powerful. have you tried pointing it at pg_stat_statements? great for natural language query analysis
011
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
"we need a document database" you need JSONB. you already have it.
111
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
You don't need Redis for everything. PostgreSQL's LISTEN/NOTIFY exists.
110
PostgreSQL Hero @postgresqlhero.bsky.social · 06/12/2025
PostgreSQL can do full-text search, geospatial queries, time-series data, and graph traversals. Meanwhile, you're reaching for 4 different databases.
000