[postgis-users] PLPGSQL, parametrizing a column name and a GEOMETRY

Sebastian E. Ovide sebastian.ovide at gmail.com
Fri Dec 3 03:59:43 PST 2010


Hi All,

I'm creating a PLPGSQL which has 2 parameters: a geometry and a table name.

The query is something like UPDATE table_name SET FIELD=geometry.

I've tried to use EXECUTE like this

EXECUTE 'UPDATE '||quote_ident(table_name)||' SET
FIELD='||geometry::geometry

but I'm getting an error in the geometry: (HINT:  Could not choose a best
candidate operator. You might need to add explicit type casts.)

any ideas ?

-- 
Sebastian E. Ovide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101203/7b5d5269/attachment.html>


More information about the postgis-users mailing list