我正在尝试使用 PostGIS 模板将一些数据输入到 PostgreSQL 8.4 数据库中。我无法UPDATE
多边形:
> UPDATE my_table SET coords = POINT(1, 1)
UPDATE 0 1
> UPDATE my_table SET box = POLYGON(((1, 1), (2, 3), (3, 3), (1, 1)))
ERROR: function polygon(record) does not exist
> UPDATE my_table SET box = POLYGON((1, 1), (2, 3), (3, 3), (1, 1))
ERROR: function polygon(record, record, record, record) does not exist
> UPDATE my_table SET box = POLYGON(1, 1, 2, 3, 3, 3, 1, 1)
ERROR: function polygon(numeric, numeric, numeric, numeric, numeric, numeric, numeric, numeric) does not exist
> UPDATE my_table SET box = ((1, 1), (2, 3), (3, 3), (1, 1))
ERROR: column "box" is of type polygon but expression is of type record
如何插入多边形?请注意,数据已经存在于表中,并用NULL
字段代替了空间数据。我需要UPDATE
,不是INSERT
,但这不应该有所作为。