postgresql - How to get size of posgresql jsonb field? -


i have table jsonb field in table.

create table data.items (   id serial not null,   datab jsonb ) 

how size of field in query this:

select id, size(datab) data.items 

for number of bytes used store:

select id, pg_column_size(datab) data.items;

for number of elements on jsonb object:

select id, jsonb_array_length(datab) data.items;


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

python 2.7 - Lines in my code being skipped and I am not sure why -

python - multiprocessing pool with map -