Search Postgresql Archives

Re: How to get the size of JSONB in bytes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 15, 2015 at 9:54 PM, Dmitry Savenko <ds@xxxxxxxxxxxx> wrote:

and now it works! I think they should add casting to 'bytea' directly,
such workarounds shouldn't be necessary.

Casting to bytea and counting the bytes is just as hackey, IMO.  If this use-case wants to be officially supported the type itself should define what "length/size" means and a function should be provided to extract that value.  I have the impression that the content length is already part of the stored data so really only the function would be needed.  I haven't given it that much thought, and zero present research, so I may be mis-remembering old threads.

​David J.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux