Re: WIP Patch: Add a function that returns binary JSONB as a bytea
От | Tom Lane |
---|---|
Тема | Re: WIP Patch: Add a function that returns binary JSONB as a bytea |
Дата | |
Msg-id | 19694.1540987368@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | WIP Patch: Add a function that returns binary JSONB as a bytea (Kevin Van <kevinvan@shift.com>) |
Ответы |
Re: WIP Patch: Add a function that returns binary JSONB as a bytea
|
Список | pgsql-hackers |
Kevin Van <kevinvan@shift.com> writes: > This patch adds a new function that allows callers to receive binary jsonb. > This change was proposed in the discussion here: > https://www.postgresql.org/message-id/CAOsiKEL7%2BKkV0C_hAJWxqwTg%2BPYVfiGPQ0yjFww7ECtqwBjb%2BQ%40mail.gmail.com > and the primary motivation is to reduce database load by skipping jsonb to > string conversion (with the expectation that the application can parse > binary jsonb). I dunno, I do not think it's a great idea to expose jsonb's internal format to the world. We intentionally did not do that when the type was first defined --- that's why its binary I/O format isn't already like this --- and I don't see that the tradeoffs have changed since then. The format is complex, and specific to Postgres' needs, and we might wish to change it in future. regards, tom lane
В списке pgsql-hackers по дате отправления: