[postgis-users] UPDATE a value using trigger and ST_Contains

Andy Colson andy at squeakycode.net
Thu Feb 21 18:56:54 PST 2013


On 02/21/2013 08:53 PM, Andy Colson wrote:
>>
>>
>>    select t1.gid from t1 where ST_Contains(t1.the_geom,ST_Centroid(NEW.the_geom)) info NEW."munic_id";
>
>
> oops.  s/info/into/
>
> -Andy
>

double oops.  The into goes first:

select t1.gid into NEW."munic_id" from t1 where ST_Contains(t1.the_geom,ST_Centroid(NEW.the_geom));

I really hope I eventually get this right :-)

-Andy


More information about the postgis-users mailing list