This is exactly how I version data. I use a trigger function in
PostgreSQL to detect column changes and insert the OLD.<geometry column>
with the OLD.<pkey_column> to another table (try <table name>_history.
The target table has columns with default values for recording the
date/time and user that performed the transaction.
create function tr_geom_trans() returns trigger as $$
BEGIN
insert into mytable_history (table_id, old_geom, mod_date, mod_user)
SELECT OLD.oid, OLD.the_geom, now(), current_user;
return NEW;
END;
$$
language "plpgsql" volatile
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Brian Sanjeewa Rupasinghe
Sent: Monday, January 05, 2009 5:44 AM
To: [email protected]
Subject: [postgis-users] problem with topology
I have a land parcel (polygon) stored in postGIS with a ceratin
feature ID, say FID = 100. I want to split this polygon into two
building topology for new two polygons, and sending the original polygon
(i.e FID = 100) into history with the use of a trigger. Is it possible?
Polygon split is done by
a GIS software that is connected to PostGIS.
SANJEEWA
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users