Fireship · @fireship
I replaced my entire tech stack with Postgres...
Uploaded March 4, 2025 · Length 8:13
Summary
Replacing a tech stack with PostgreSQL, exploring 11 ways to use it for web development, and building a full-stack application.
- postgres tech stack
- web development with postgres
- full stack application
- sql vs nosql
- postgres extensions
- serverless postgres
- postgres cron
- in-memory cache database
- vector database
- tech search engine
- graphql postgres
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
modern web development sucks we have
- 0:01
amazing tools that solve every problem
- 0:03
and technically it's never been easier
- 0:05
to build a billion dooll failed app idea
- 0:07
the problem is that by the time you
- 0:09
deploy it you end up paying 20 different
- 0:11
ycb startups to use their fancy shovels
- 0:13
you think you need an in-memory cache
- 0:15
database to handle your low to five
- 0:16
users you need a cron service you need
- 0:18
authentication performance monitoring
- 0:20
analytics serverless functions and the
- 0:22
list goes on it's no coincidence that
- 0:24
America's homeless population started to
- 0:25
rise immediately after the release of
- 0:27
nextjs in 2016 but what if I told you
- 0:30
you could throw all of these shovels in
- 0:31
the incinerator and use nothing but
- 0:33
postgressql yes the relational database
- 0:36
to achieve 90% of your web development
- 0:38
needs in today's video we'll look at 11
- 0:40
useful unorthodox and just plain weird
- 0:43
ways to use postgress by the end of it
- 0:45
we will have built a full stack
- 0:46
application using nothing but an open
- 0:48
source database but first of all what
- 0:50
makes postgress special and why not use
- 0:52
something like MySQL or SQL light well
- 0:54
out of the box postgress provides
- 0:55
Advanced Data types like binary Json
- 0:58
arrays key value stores and even
- 1:00
geometric types to Define shapes but
- 1:02
more importantly it's extensible and you
- 1:04
can even create your own custom data
- 1:05
types over the years this has led to a
- 1:07
massive ecosystem of extensions where
- 1:09
developers have given it all kinds of
- 1:11
crazy new features it's just like
- 1:12
modding a game where you take something
- 1:14
that sucks like Civilization 7 and
- 1:16
install a bunch of mods to make it
- 1:17
playable now before we get into the
- 1:18
first example I first want to warn you
- 1:20
that just because you can do something
- 1:22
in postgress doesn't mean you should
- 1:23
before you go and cancel all your shovel
- 1:25
subscriptions don't forget to think
- 1:26
critically and make sure you use the
- 1:28
right tool for the job one of the great
- 1:29
debates among web developers is SQL
- 1:31
versus nosql and one of the key selling
- 1:33
points for no SQL is that you can work
- 1:35
with unstructured data like objects with
- 1:37
Dynamic data that might be different for
- 1:39
each record you can't do that in SQL
- 1:41
because every table has a fixed schema
- 1:43
well actually that's not true because
- 1:45
postgress supports binary Json in this
- 1:47
query you'll notice how we create a
- 1:48
table with a Json B type and then insert
- 1:50
some values into it as raw Json strings
- 1:53
so pretty cool and believe it or not we
- 1:55
can actually query this data now we can
- 1:56
use a select statement followed by a
- 1:58
wear clause and then this syntax to


