Lesson 2.3
Data types and JSONB
Postgres has rich types, and JSONB for the genuinely unstructured remainder. Reaching for JSONB too early throws away every guarantee above.
12mIntermediate8,818 students

Sign in to watch this lesson
Browsing is free. Create an account to play videos and track your progress.
Overview
Postgres has rich types, and JSONB for the genuinely unstructured remainder. Reaching for JSONB too early throws away every guarantee above.
What this lesson covers
- Pick precise types for time, money, and identifiers
- Use JSONB for genuinely variable data only
- Index inside a JSONB column when you must query it
This lesson sits in Schema Design, part of PostgreSQL for Developers. It assumes what came before it and leads directly into the next lesson in the module.
In this lesson you will:
- Pick precise types for time, money, and identifiers
- Use JSONB for genuinely variable data only
- Index inside a JSONB column when you must query it
Pro Tip
JSONB is for data whose shape you genuinely cannot know. It is not a shortcut past schema design.