Immutable datastore library?

Поиск
Список
Период
Сортировка
От Guyren Howe
Тема Immutable datastore library?
Дата
Msg-id 995A4B35-51AD-471E-AF43-49A57B068E5D@gmail.com
обсуждение исходный текст
Ответы Re: Immutable datastore library?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: Immutable datastore library?  ("Mike Sofen" <msofen@runbox.com>)
Список pgsql-general
I would like to use Postgres as an immutable data store. A subject table would have a timestamp column, and that would
beadded to what would otherwise be the primary key. 

Trap updates and turn them into inserts. Have an associated _deleted table. Trap deletes and turn them into inserts of
theprimary key into that table. 

Create a view that only shows the non-deleted records with the most recent timestamps.

Stored procedure to do all that to a table. Event trigger to drop and re-create the view on changes to the table
columns.

I think that's about it. Seems an obvious and nice general-purpose thing to do. It also seems like something someone
mighthave already done, but googling "immutable postgres" pulls up things about writing functions. 

Does anyone know of a project that has already done this?

В списке pgsql-general по дате отправления:

Предыдущее
От: Edilmar LISTAS
Дата:
Сообщение: Problem changing default data_directory in PG 9.6 + CentOS6
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Immutable datastore library?