« Return to Thread: Re: [PostGIS] #180: History table example implementation

Re: [PostGIS] #180: History table example implementation

by PostGIS-4 :: Rate this Message:

Reply to Author | View in Thread

#180: History table example implementation
--------------------------+-------------------------------------------------
  Reporter:  pramsey      |       Owner:  pimpaa      
      Type:  enhancement  |      Status:  assigned    
  Priority:  medium       |   Milestone:  postgis 1.5.0
 Component:  postgis      |     Version:              
Resolution:               |    Keywords:              
--------------------------+-------------------------------------------------
Comment (by pimpaa):

 Hello everyone,

 I´ve came up with a solution for this ticket, altought there is room for
 improvent.

 How this works?

 Execute the SQL files in any PostGIS database.

 It will create the table historic_information on the public schema (need
 direction with this).

 execute the following sp to create a historic table of any type of
 geometry:
 select
 create_history_table(schema,table_to_log,primary_field,geometry_field,geometry_type,ndims,SRID);

 this will create the table foo_history on the same schema as the original
 table. i will create all the rules necessary to log the updates, inserts
 and deletes to the original table.

 in the history table we have a current version field, which will log which
 is the ID of the current version of that feature.

 I did not tested it out extensively.

 Thanks for all the help, and please give the usual comment and critics.

 George

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/180#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel

 « Return to Thread: Re: [PostGIS] #180: History table example implementation