PostgreSQL for Developers
LESSON 2.3

Data types and JSONB

Learn key techniques and workflows in PostgreSQL for Developers.

12m
intermediate
8,818 students

Overview

Postgres has rich types, and JSONB for the genuinely unstructured remainder. Reaching for JSONB too early throws away every guarantee above.

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.

Resources