I am trying to expand the boundaries of the polygon table, which are ST_Buffers with a radius of 5 km, and dump them into another table. The first table contains about 10 million polygons. Table containing a polygon:
CREATE TABLE poly_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) );
Here is the table I want to create:
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'));
But whenever I run the insert statement, I get this error:
ERROR: array size exceeds the maximum allowed (1073741823)
Can someone tell me what I am doing wrong?
source
share