Re: Wanted: jsonb on-disk representation documentation
| От | Tom Lane |
|---|---|
| Тема | Re: Wanted: jsonb on-disk representation documentation |
| Дата | |
| Msg-id | 2918.1399490857@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Wanted: jsonb on-disk representation documentation (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Wanted: jsonb on-disk representation documentation
|
| Список | pgsql-hackers |
And while I'm looking at it ...
The jsonb_ops storage format for values is inherently lossy, because it
cannot distinguish the string values "n", "t", "f" from JSON null or
boolean true, false respectively; nor does it know the difference between
a number and a string containing digits. This appears to not quite be a
bug because the consistent functions force recheck for all queries that
care about values (as opposed to keys). But if it's documented anywhere
I don't see where. And in any case, is it a good idea? We could fairly
easily change things so that these cases are guaranteed distinguishable.
We're using an entire byte to convey one bit of information (key or
value); I'm inclined to redefine the flag byte so that it tells not just
that but which JSON datatype is involved.
regards, tom lane
В списке pgsql-hackers по дате отправления: