[postgis-users] sync geometry with attributes
Markus Schaber
schabi at logix-tt.com
Mon May 26 12:27:40 PDT 2008
Hi, Bruce,
Bruce Rindahl <rindahl at lrcwe.com> wrote:
> I think triggers may not be the answer here. If you define the trigger
> as updating the geometry whenever the attributes change then if you
> change the geometry the trigger will always reset the geometry to the
> old value. The same thing happens if the trigger goes the other way. I
> think what ever you use to update the geometry needs to also update the
> attributes.
A trigger has both the old and the new row, so it can decide whether
the geometry or the attributes have changed, and update the other one.
It can even just pass the data along when both are changed, assuming
that the application will do the correct thing in this case.
Regards,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
More information about the postgis-users
mailing list