A column packed with labeled key-value pairs inside one field.

hstore holds a flexible key-value map in a column

When a model keeps sprouting loose attributes, hstore holds them in one row instead of a growing join chain. Every product grows settings nobody predicted — per-tenant flags, integration tokens, display preferences. Modeling each as a column means endless migrations; as a table, joins for trivia. hstore offers the middle path — one column carrying a flat string map — for attributes that are numerous, optional, and individually unimportant. ...

June 16, 2027 · 4 min · XB Field Notes