[postgis-users] postgis type size

Jian He hejian.mark at gmail.com
Mon Apr 11 06:53:02 PDT 2022


select pg_column_size(st_geomfromtext('multipoint(-1 1,0 0,2 3)')); --104.

select pg_column_size( st_geomfromtext('point(-1 1)')); --return 32.

select st_geomfromtext('multipoint zm(-1 1 3 4 , 0 0 1 2, 2 3 1 2)');
select pg_column_size(st_geomfromtext('multipoint zm(-1 1 3 4 , 0 0 1
2, 2 3 1 2)')); --return 168.

select st_geomfromtext('multipoint z(-1 1 3, 0 0 1, 2 3 1)');

select pg_column_size(st_geomfromtext('multipoint z(-1 1 3, 0 0 1, 2 3
1)')); --return 136.

from the above query result, seems in postgis the column size is quite
large.

In postgresql(outside postgis),  there is  a data type paddling. If less
than 8 byte then it will padding.
What about postgis data type, is there also a padding thing?

So if pg_column_size return the correct result of data type size, then 8 kb
per page cannot store much column. Generally how many columns can i store?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220411/2602f2b1/attachment.html>


More information about the postgis-users mailing list