You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ In the context of this extension, a **Saga** represents the complete history of
24
24
## Temporal Tables with Foreign Keys example
25
25
26
26
A simplified example to illustrate the concept.
27
-
A temporal table has `valid_from` and `valid_until` columns, which define a `[)` period (inclusive start, exclusive end), aligning with PostgreSQL's native range types.
27
+
A temporal table has `valid_from` and `valid_until` columns, which define a `[)` period (inclusive start, exclusive end), aligning with PostgreSQL's native range types. While `DATE` is used in these examples for simplicity, any data type that can form a range is supported, including `TIMESTAMPTZ`, `TIMESTAMP`, `INTEGER`, `BIGINT`, and `NUMERIC`.
28
28
29
29
### Entity Identifiers
30
30
@@ -178,8 +178,9 @@ CREATE TABLE legal_unit (
178
178
id SERIAL NOT NULL,
179
179
legal_ident VARCHAR NOT NULL,
180
180
name VARCHAR NOT NULL,
181
-
valid_from TIMESTAMPTZ,
182
-
valid_until TIMESTAMPTZ,
181
+
status TEXT, -- e.g., 'active', 'inactive'
182
+
valid_from DATE,
183
+
valid_until DATE,
183
184
valid_to DATE -- Optional: for human-readable inclusive end dates
184
185
-- Note: A primary key on temporal tables is often not on the temporal columns
0 commit comments