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
Post a Comment