我试图解散多边形表的边界,这些多边形是ST_Buffers,半径为5km,并将它们转储到另一个表中.第一个表包含大约1000万个多边形. 包含多边形的表是: CREATE TABLE poly_5km(gid serial PRIMARY KEY, buffe
包含多边形的表是:
CREATE TABLE poly_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) );
这是我要创建的表:
CREATE TABLE buffer_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) ); INSERT INTO buffer_5km(gid,bufferType,the_geog) VALUES (1,'test',(SELECT (ST_Dump(ST_Multi(ST_Union(ST_MakeValid(poly_5km.the_geog::geometry))))).geom::geography FROM poly_5km WHERE poly_5km.bufferType= 'test'));
但每当我运行insert语句时,我都会收到此错误:
ERROR: array size exceeds the maximum allowed (1073741823)
谁能告诉我我做错了什么?
您正在尝试存储超过1GB的长值. PostgreSQL对象 has 1GB limits – 您无法更改它.此限制在32或64位平台上相同.所以你必须改变算法或粒度.