TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Shouldiuseajsonbfield.com

2 pointsby frenchie4111over 3 years ago

3 comments

smt88over 3 years ago
This is wrong. Inexperienced devs should ignore this.<p>One of my products heavily uses jsonb fields for storing JSON strings from external systems. We have partners that store data as JSON, so we store it as JSON as a kind of untouched log (ELT instead of ETL, I suppose).<p>If you store a schema somewhere (in, say, JSON Schema format), then your jsonb isn&#x27;t schema-less when you parse it. Postgres may not understand the schema, but not all of your data transformation is going to happen in Postgres anyway.<p>Jsonb is also good for caching and logging things like REST request&#x2F;response bodies if you ever need to query those later.<p>So in short: if the I&#x2F;O format is JSON, then jsonb is appropriate.
评论 #29454581 未加载
themodelplumberover 3 years ago
Two kinds of people who read this: 1) Ah, good to know, this will prevent me from making mistakes 2) You&#x27;re telling me there&#x27;s _never_ a good reason...? Hmmm...
burembaover 3 years ago
Then let me know what else should I use for schemaless data
评论 #29452921 未加载