Пропустить навигацию
JSON columns in Postgres can be flexible, but too much flexibility can be risky as you might…
0:00 / 6:25

JSON columns in Postgres can be flexible, but too much flexibility can be risky as you might…

Tyler Shukert

@dshukertjr19 тыс. подписчиков

Открыть в X
155 отметок «Нравится»СкачатьОригинальный пост

17 480 просмотров

JSON columns in Postgres can be flexible, but too much flexibility can be risky as you might accidentally end up with malformed data. You can prevent this using the pg_jsonschema extension to easily define a schema for your JSON and JSONB columns!

6 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Ethan Davies

    @DaviesTechAI

    I'm all for using JSON schemas to enforce data consistency. In my experience, it's a great way to maintain data quality, especially when working with complex JSON data structures.

    2 отметки «Нравится»

  • Фото профиля Kyle @ KyTech

    @KyTechInc

    I’ve been curious about JSON columns. I have a couple use cases that would be solved with it. But is it seen as inefficient in cases of large datasets or large json sets? Cause I assume it’s like an index on an index when queried?

    1 отметка «Нравится»

  • Фото профиля Michael

    @clubhi

    The performance of no schema with the rigidness of a schema

    1 отметка «Нравится»

  • Фото профиля Noël

    @cipotenoel

    I came across this video at the perfect time, thanks!

    1 отметка «Нравится»

  • Фото профиля abelardoit🐦

    @AbelardoIT

    Is not enough to store a string (json) in a text column?

  • Фото профиля Tyler Shukert

    @dshukertjr

    Using a JSONB column allows you to filter the data using the properties of the column, and also allows you to index the column, so you can efficiently query the data. In addition to that, if you only want a certain property of the column and not the entire thing, you can do that too!

    1 отметка «Нравится»