Insert PostGIS Object (e.g. ST_GeomFromText) from row variables in plpgsql script
问题 I have two tables src_pos and dest_pos. The src_pos stores positions with longitude, latitude and altitude, while the dest_pos stores PosGIS Geometry object. Now I want to move a bunch of data from src_pos to dest_pos with following plpgsql script. But it failed, because row vaiable (e.g. row_data.longitude) cannot be interpreted correctly. How can I overcome this problem!? --create language 'plpgsql'; drop function createPosition(); create function createPosition() returns integer AS $$