[postgis-users] Update Error

Obe, Regina robe.dnd at cityofboston.gov
Tue Aug 5 19:59:56 PDT 2008


ST_GeomFromText takes the form ST_GeomFromText('POINT(' || raw.x || ' ' || raw.y || ')', 102249)

Anyrate for point geometries its more efficient to use ST_MakePoint  so something like


UPDATE recent
SET xypoint = ST_SetSRID(ST_MakePoint(raw.x, raw.y),102249)        
from raw
where recent.casenum=raw.casenum;

Hope that helps,
Regina


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net on behalf of Donald Ijams
Sent: Tue 8/5/2008 6:00 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Update Error
 
When I attempt to update a geometry column from a field in another table 
with:

UPDATE recent
SET xypoint = ST_GeomFromText((raw.x, raw.y),102249)        
from raw
where recent.casenum=raw.casenum;

I get:

*SQL error:*

ERROR:  function st_geomfromtext(record, integer) does not exist
LINE 3: xypoint = ST_GeomFromText((raw.x, raw.y),102249)  
                  ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.


Probably something simple, but I'm not seeing it.

Don






-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080805/61d5ef9c/attachment.html>


More information about the postgis-users mailing list