CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 12 Aug 2025 21:14:33 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090409175144
location: https://web.archive.org/web/20090409175144/https://github.com/jasonk/postgresql-versioning/tree
server-timing: captures_list;dur=0.755036, exclusion.robots;dur=0.024348, exclusion.robots.policy;dur=0.010557, esindex;dur=0.011690, cdx.remote;dur=4042.045867, LoadShardBlock;dur=157.408653, PetaboxLoader3.datanode;dur=69.332272, PetaboxLoader3.resolve;dur=58.935599
x-app-server: wwwb-app203
x-ts: 302
x-tr: 4284
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app203; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 301
server: nginx
date: Tue, 12 Aug 2025 21:14:35 GMT
content-type: text/html; charset=utf-8
content-length: 124
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Thu, 09 Apr 2009 17:51:43 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090409175144/https://github.com/jasonk/postgresql-versioning/tree/master
x-archive-orig-x-runtime: 74ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 124
cache-control: max-age=1800
memento-datetime: Thu, 09 Apr 2009 17:51:44 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 09 Apr 2009 17:51:44 GMT", ; rel="memento"; datetime="Thu, 09 Apr 2009 17:51:44 GMT", ; rel="last memento"; datetime="Thu, 09 Apr 2009 17:51:44 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_9_20090409163853_crawl100-c/52_9_20090409174919_crawl101.arc.gz
server-timing: captures_list;dur=0.630606, exclusion.robots;dur=0.026647, exclusion.robots.policy;dur=0.010842, esindex;dur=0.012929, cdx.remote;dur=879.190089, LoadShardBlock;dur=338.860128, PetaboxLoader3.datanode;dur=242.557745, PetaboxLoader3.resolve;dur=303.420315, load_resource;dur=211.818179
x-app-server: wwwb-app203
x-ts: 301
x-tr: 1461
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 12 Aug 2025 21:14:36 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Thu, 09 Apr 2009 17:51:44 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 403ms
x-archive-orig-etag: "b9dc03e88bfa372a53086e79a19af11f"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 20079
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 09 Apr 2009 17:51:44 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 08 Apr 2009 08:53:32 GMT", ; rel="prev memento"; datetime="Wed, 08 Apr 2009 08:53:32 GMT", ; rel="memento"; datetime="Thu, 09 Apr 2009 17:51:44 GMT", ; rel="last memento"; datetime="Thu, 09 Apr 2009 17:51:44 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_9_20090409163853_crawl100-c/52_9_20090409174919_crawl101.arc.gz
server-timing: captures_list;dur=2.139369, exclusion.robots;dur=0.043500, exclusion.robots.policy;dur=0.015866, esindex;dur=0.016626, cdx.remote;dur=83.197644, LoadShardBlock;dur=346.692596, PetaboxLoader3.datanode;dur=170.359807, PetaboxLoader3.resolve;dur=357.288690, load_resource;dur=199.981999
x-app-server: wwwb-app203
x-ts: 200
x-tr: 704
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
jasonk's postgresql-versioning at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Simple data-versioning for PostgreSQL tables |
Homepage: | https://www.jasonohles.com/projects/postgresql-versioning |
Clone URL: |
git://github.com/jasonk/postgresql-versioning.git
Give this clone URL to anyone.
git clone git://github.com/jasonk/postgresql-versioning.git
|
name | age | message | |
---|---|---|---|
![]() |
COPYING | Fri Feb 20 08:20:09 -0800 2009 | Added licensing information [jasonk] |
![]() |
README | Fri Feb 20 08:20:09 -0800 2009 | Added licensing information [jasonk] |
![]() |
postgresql-versioning.sql | Loading commit data... ![]() |
-- PostgreSQL table versioning -- Copyright 2006, 2009 Jason Kohles <email@jasonkohles.com> -- https://www.jasonkohles.com/projects/postgresql-versioning/ This package is a collection of utilities for PostgreSQL which adds a simple 'data versioning' schema to a database. It was originally created as part of an AJAX powered web interface to a database, which allowed the front end to keep track of what version of the data it currently had loaded, and not need to request new data if the version number hadn't changed. ------------------------------------------------------------------------------- To use it, first make sure your database has the pgsql procedural language available: createlang plpgsql my_database Then apply the postgresql-versioning.sql file. psql my_database < postgresql-versioning.sql This will create a new schema named 'versioning' which contains the following items: * A table named 'tables' which contains one row for each table you choose to track versions for. It has a 'name' column which contains the table name, a 'version' column which contains a simple integer version number which is incremented whenever the data in that table changes, and an 'updated' column containing the timestamp of the last time the data was updated. * A function called 'update_table' which is called by the triggers on the tables you are tracking versions for. This function is responsible for updating the information in the 'tables' table. * A function called 'update_triggers' which automatically creates triggers for all the tables in your database. This function ignores the 'pg_catalog', 'pg_toast', and 'versioning' schemas, since it is assumed you don't want to version the system databases and if you tried to use these triggers on the 'versioning.tables' table, you would probably tear a hole in the space-time continuum, or at least create infinite loops of updates. ------------------------------------------------------------------------------- Once the versioning schema is available in your database, you have two options on how to use it. * You can use the update_triggers function to automatically setup the appropriate triggers on all of your tables (assuming you want to track versions for all of them). SELECT * FROM versioning.update_triggers(); The select will return a list of the tables the triggers were added to, so if you add tables later, you can simply run it again and it will just add the triggers where they are needed. * Alternately, you can add triggers yourself to the tables you want to track. CREATE TRIGGER table_version AFTER INSERT OR UPDATE OR DELETE ON my_table FOR EACH STATEMENT EXECUTE PROCEDURE versioning.update_table(); You could also use the code for the update_triggers function as a basis for creating your own automatic setup function which follows your rules for determining what tables to add the triggers to. ------------------------------------------------------------------------------- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <https://www.gnu.org/licenses/>.
This feature is coming soon. Sit tight!