PostgreSQL event sourcing, this PostgreSQL extension can set up tables, triggers, and functions to keep track of changes in any table.
  • Rust 71.4%
  • PLpgSQL 20.3%
  • Nix 8.3%
Find a file
2024-09-28 15:37:52 +02:00
.cargo init rework 2024-05-04 17:01:03 +02:00
sql simplified users test table by removed salt and passhash 2024-09-27 21:40:38 +02:00
src moved composite key tests to their own module 2024-09-28 15:05:46 +02:00
templates documented tables and functions in the sql templates 2024-09-28 15:37:52 +02:00
.envrc README & nix set up (only for nix and markdown) 2024-07-28 23:23:21 +02:00
.gitignore fixed flake.nix 2024-08-17 11:26:59 +02:00
Cargo.lock crate updates and update to pg17 2024-09-27 18:56:20 +02:00
Cargo.toml crate updates and update to pg17 2024-09-27 18:56:20 +02:00
deny.toml updated flake with checks & updated crates 2024-09-07 22:13:15 +02:00
flake.lock flake.lock: Update 2024-09-27 18:43:36 +02:00
flake.nix updated flake with checks & updated crates 2024-09-07 22:13:15 +02:00
pges.control allow specifying schema for generated tables and functions 2024-07-28 19:18:08 +02:00
README.md documented tables and functions in the sql templates 2024-09-28 15:37:52 +02:00
taplo.toml updated flake with checks & updated crates 2024-09-07 22:13:15 +02:00

PostgreSQL event sourcing

This PostgreSQL extension can set up tables, triggers, and functions to keep track of changes in any table.

To-do

  • JSON diff & patch using [json_patch] and [serde_json]
  • First & last functions for getting the first or last value in aggregates
  • Extract keys, columns, and data types of a particular table
  • Features: Event sourcing
    • Dynamic setup for tables, triggers, and functions
      • Choose schema and timestamp columns
    • Reconstruct data by timestamp
    • Reconstruct data by number of steps back in time
    • Commit reconstructed data
    • Snapshots
      • Reconstruct data using snapshots by timestamp or steps back in time
  • Distribute extension? Container? Build pipeline?
  • Tests
    • Initialize and drop event sources
      • With composite keys
      • Without timestamp columns
    • Insert, update, and delete triggers
      • With composite keys
      • Without timestamp columns
    • Reconstruct data by timestamp
      • With composite keys
      • Without timestamp columns
    • Reconstruct data by number of steps back in time
      • With composite keys
      • Without timestamp columns
    • Commit reconstructed data
      • With composite keys
      • Without timestamp columns
    • Reconstruct data using snapshots
      • With composite keys
      • Without timestamp columns
    • DDL changes
  • Documentation
    • Contributing
    • Code coverage
    • PostgreSQL COMMENT for event source tables, triggers, and functions