[postgis-users] no union allowed in update?
Biddy
newskatze at riomhphost.net
Thu Jul 15 06:36:32 PDT 2010
Hi everyone,
I am trying to do the following in plpgsql:
UPDATE lidarmpts set latlongalt =
ST_Union(ST_GeomFromEWKT('SRID=4326;MULTIPOINT(' || lidarline.latitude
|| ' ' || lidarline.longitude || ' ' || lidarline.elevation || ')' ))
WHERE lidarline.rawlidarpts_id = counter;
The error I get is like:
ERROR: cannot use aggregate function in UPDATE
LINE 1: UPDATE lidarmpts set latlongalt = ST_Union(ST_GeomFromEWKT('...
^
QUERY: UPDATE lidarmpts set latlongalt =
ST_Union(ST_GeomFromEWKT('SRID=4326;MULTIPOINT(' || $1 || ' ' || $2
|| ' ' || $3 || ')' )) WHERE $4 = $5
CONTEXT: PL/pgSQL function "fill_multipoint" line 10 at SQL statement
Now, the thing is that I had this snipped of code from before when I
did stuff in Java and it was working perfectly fine.
However, now in plpgsql it has decided that I cannot do unions anymore
in an update.
What's behind this?
How can I still update my multipoint?
All help is greatly appreciated,
cheers,
B.
More information about the postgis-users
mailing list