This extension implements a logic and data manipulation engine based on Allen’s Interval Algebra and C.J. Date’s extended relational operators. These features enable expressive temporal reasoning and manipulation of complex, nested relational data structures.
- Allen’s Interval Algebra Provides 15 basic temporal interval operations used to compare time intervals. These are essential for reasoning about temporal data in scheduling, planning, and history-aware systems
- Extended Relational Operators (C.J. Date)
Inspired by the work of C.J. Date, operators for representation of the collapsed (
PACK) and expanded (UNPACK) form of a relation with an attribute of interval type are realized Also implemented operatorsU_MINUS,U_EQUALS,U_INTERSECTandU_UNION, which are generalizations over standard operators.
- A Rust toolchain:
rustc,cargo, andrustfmt. The recommended way to get these is from https://rustup.rs † gitlibclang11 or greater (for bindgen)- Debian-likes:
apt install libclang-devorapt install clang - RHEL-likes:
yum install clang - Windows: download installers from https://github.com/llvm/llvm-project/releases
- Debian-likes:
- C compiler
- Linux and MacOS: GCC or Clang if
cshimfeature is enabled, and no need if thecshimfeature is disabled - Windows: MSVC or Clang
- Linux and MacOS: GCC or Clang if
- PostgreSQL's build dependencies ‡
- Debian-likes:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
- Debian-likes:
cargo install --locked cargo-pgrx
cargo pgrx initcargo pgrx install -pg-config {PATH_TO_PG_CONFIG}cargo pgrx runCREATE EXTENSION pg_temporal;SELECT eq(daterange('2023-01-01', '2023-01-10'), daterange('2023-01-01', '2023-01-10'));Run unit and integration tests:
cargo pgrx testPull requests and feedback are welcome! Please feel free to file issues or join the discussion.