PostgreSQL`提示:在更新类型为POINT的列时,您需要重写或转换表达式

时间:2012-07-31 19:23:36

标签: database postgresql geospatial postgis postgresql-9.1

我正在使用PostgreSQL 9.1和PostGIS 2.0.1。

location的类型为point。类型latitudelongitude双精度。

为什么这是更新声明

update list_of_location SET location = ST_SetSRID(ST_MakePoint(longitude,latitude), 4326);

返回

LINE 1: update list_of_location SET location = ST_SetSRID(ST_MakePoint(longit...
                                               ^
HINT:  You will need to rewrite or cast the expression.

1 个答案:

答案 0 :(得分:2)

要使用PostGIS 2.0+,location应为geometry(Point,4326) point