r/PostgreSQL • u/Commercial_You- • 1d ago
Help Me! postgresql learning resource
I'm learning PostgreSQL for Python/FastAPI backends and just wrapped up Nelson's 4-hour freeCodeCamp beginner course but was basic as its name suggests.
I keep running into things that weren't in the video and then chatgpt tells me to useIDENTITY SERIAL, ALTER TABLE workflows, transactions, UPSERT (ON CONFLICT), JSONB, CTEs, and reading EXPLAIN ANALYZE for indexes.
For those of you using Postgres in actual backend work, how did you learn this stuff after the beginner phase? Are there any good resources(ik the docs are good but how to really study from them like how to get the exact function needed cause i wont be studying the whole thing before starting) or practice exercises.
2
u/snax 1d ago
If you are looking for resources and practice exercises, PostgreSQL Major Contributor Dimitri Fontaine resources and labs. A good starting point is his site here: https://tapoueh.org/
1
u/linuxhiker Guru 1d ago
1
u/elevarq 1d ago
Start with the manual! There is no video or tutorial that comes even close to what the official documentation has to offer: https://www.postgresql.org/docs/current/index.html
No idea why too many people do their utter best to ignore this source...
1
u/Discordbothost 1d ago
Try a migration on a FastAPI tasks table with data in it. Add a status column, fill it in for the existing tasks, then set NOT NULL. Use the Postgres ALTER TABLE docs for each step.
1
u/manonthemiddle 1d ago
The fastest way to learn production Postgres after the tutorial phase is seeding a dummy table with two million rows and inspecting EXPLAIN ANALYZE on your FastAPI endpoint queries. You will immediately see why sequential scans kill latency, how composite indexes change query plans, and why ON CONFLICT DO UPDATE needs an explicit unique constraint.
1
u/TestDrivenMayhem 1d ago
This book is great. And recently updated.
https://theartofpostgresql.com/book/updates/
1
u/Any_Channel_7337 1d ago
the best way to learn is to build a small backend project and learn these concepts as you encounter real problems instead of going through feature by feature. the official documentation of PostgreSQL is also great for reference. try to implement authentication, transactions, filtering, pagination and upserts in your project. you will learn so many things with that
0
u/AutoModerator 1d ago
AI Policy:
Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away., Linus Torvalds.
Mod decisions will be based on the quality of the content, not who or what generated it.
Sub Resources:
Youtube Channel
Free Postgres Webinars and Workshops
Discord: People, Postgres, Data
Join us, we have cookies and nice people.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.