<div dir="ltr"><div dir="ltr"><div><pre style="background-color:rgb(40,44,52);color:rgb(171,178,191);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(198,120,221);font-style:italic">select </span><span style="color:rgb(97,175,239)">pg_column_size</span>(st_geomfromtext(<span style="color:rgb(152,195,121)">'multipoint(-1 1,0 0,2 3)'</span>)); <span style="color:rgb(92,99,112);font-style:italic">--104.<br></span><span style="color:rgb(92,99,112);font-style:italic"><br></span><span style="color:rgb(198,120,221);font-style:italic">select </span><span style="color:rgb(97,175,239)">pg_column_size</span>( st_geomfromtext(<span style="color:rgb(152,195,121)">'point(-1 1)'</span>)); <span style="color:rgb(92,99,112);font-style:italic">--return 32.<br></span><span style="color:rgb(92,99,112);font-style:italic"><br></span><span style="color:rgb(198,120,221);font-style:italic">select </span>st_geomfromtext(<span style="color:rgb(152,195,121)">'multipoint zm(-1 1 3 4 , 0 0 1 2, 2 3 1 2)'</span>);<br><span style="color:rgb(198,120,221);font-style:italic">select </span><span style="color:rgb(97,175,239)">pg_column_size</span>(st_geomfromtext(<span style="color:rgb(152,195,121)">'multipoint zm(-1 1 3 4 , 0 0 1 2, 2 3 1 2)'</span>)); <span style="color:rgb(92,99,112);font-style:italic">--return 168.<br></span><span style="color:rgb(92,99,112);font-style:italic"><br></span><span style="color:rgb(198,120,221);font-style:italic">select </span>st_geomfromtext(<span style="color:rgb(152,195,121)">'multipoint z(-1 1 3, 0 0 1, 2 3 1)'</span>);<br><br><span style="color:rgb(198,120,221);font-style:italic">select </span><span style="color:rgb(97,175,239)">pg_column_size</span>(st_geomfromtext(<span style="color:rgb(152,195,121)">'multipoint z(-1 1 3, 0 0 1, 2 3 1)'</span>)); <span style="color:rgb(92,99,112);font-style:italic">--return 136.</span></pre></div><div>from the above query result, seems in postgis the column size is quite large. </div><div><br></div><div>In postgresql(outside postgis),  there is  a data type paddling. If less than 8 byte then it will padding. </div><div>What about postgis data type, is there also a padding thing? </div><div><br></div><div>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?</div><div><br></div><div><br></div></div></div>