Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diffs on postgres data



On Fri, Feb 02, 2001 at 09:17:20PM +0900, Darren Cook wrote:
> Is there anything like cvs or diff for a postgres (or any SQL) database?
> 
> E.g. A table with 1000 records. Each week 5 records deleted, 10 get
> changed, and 100 new records get added. I want to be able to checkout a
> version of the database as it was at the beginning of any week in the
> past, but the further it is in the past the less often I'll need to do
> this. The table will always have an id column which is unique.
> 
> Darren

Are you sure you need diffs? It doesn't sound like you need anything more
complicated than weekly backups. Besides, unlike source code, you can
actually build version control into your tables by adding some required
columns--e.g. "last update," "creation date," "deletion date"--and
maintaining them. Or, if you don't feel like mucking about with your data
structure, you could save a snapshot of the table for a week, and do an outer
join of the snapshot against the current image to get the diffs.

-- 
Shimpei Yamashita                               http://www.shimpei.org/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links