TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Shouldiuseajsonbfield.com

2 点作者 frenchie4111超过 3 年前

3 条评论

smt88超过 3 年前
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 未加载
themodelplumber超过 3 年前
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...
buremba超过 3 年前
Then let me know what else should I use for schemaless data
评论 #29452921 未加载