错误:数组大小超出了允许的最大值(1073741823) [英] ERROR: array size exceeds the maximum allowed (1073741823)

查看:176
本文介绍了错误:数组大小超出了允许的最大值(1073741823)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试分解一个半径为5 km的ST_Buffers的多边形表的边界,并将其转储到另一个表中。第一个表包含大约一千万个多边形。
包含多边形的表是:

I'm trying to dissolve boundaries of a table of polygons which are ST_Buffers of 5km radius and dump them into another table. The first table contains around 10 million polygons. The table that contains the polygon is:

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语句时,都会出现此错误:

But whenever I run the insert statement, I'm getting this error:

ERROR:  array size exceeds the maximum allowed (1073741823)

有人可以告诉我我在做什么错吗?

Can anyone tell me what I'm doing wrong ?

推荐答案

您正在尝试存储更多内容超过1GB的价值。 PostgreSQL对象具有1GB的限制-您无法更改它。此限制在32或64位平台上相同。因此,您必须更改算法或粒度。

You are trying to store more than 1GB long value. PostgreSQL objects has 1GB limits - you cannot to change it. This limit is same on 32 or 64bit platforms. So you have to change algorithm or granularity.

这篇关于错误:数组大小超出了允许的最大值(1073741823)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆