Postgres Only Needs Two Types
Postgres has lots of types, but you really only need 2 CREATE TABLE product { id SERIAL PRIMARY KEY, data JSONB DEFAULT '{}', }
A code screenshot jokes that despite PostgreSQL supporting many data types, a developer supposedly only needs SERIAL for IDs and JSONB for everything else. It is a reaction to overly flexible or minimalist database design, especially when someone stores most data in JSON.
code screenshot / скриншот кодаsocial media post / публикация в соцсетиtext / текстdatabase table definition / определение таблицы базы данныхSQL keywords / ключевые слова SQLproduct table / таблица productserial ID field / поле serial IDprimary key / первичный ключJSONB field / поле JSONBempty JSON object / пустой JSON-объектdark background / тёмный фонprofile avatar / аватар профиля
- @dev_meme / 6592 2025-03-29
- Type
- image
- Size
- 800×576 · 50.5 KiB
- Mood
- sarcastic
- Language
- en
- Added