Skip to content

Commit

Permalink
Added an additional test to check current row ranges are set correctl…
Browse files Browse the repository at this point in the history
…y doing an update and removed a redundant delete test
  • Loading branch information
kieranswhite committed Nov 1, 2024
1 parent afd1230 commit 1718ce3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ SELECT a, c, upper(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER
4 | |
(2 rows)

SELECT a, c, lower(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER BY a, sys_period;
a | c | ?column?
---+---+----------
3 | |
4 | | t
(2 rows)

SELECT a, "b b" FROM versioning WHERE lower(sys_period) = CURRENT_TIMESTAMP ORDER BY a, sys_period;
a | b b
---+-----
Expand Down Expand Up @@ -148,11 +155,6 @@ SELECT a, c, upper(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER
5 | | t
(4 rows)

SELECT a, "b b" FROM versioning WHERE lower(sys_period) = CURRENT_TIMESTAMP ORDER BY a, sys_period;
a | b b
---+-----
(0 rows)

END;
DROP TABLE versioning;
DROP TABLE versioning_history;
4 changes: 2 additions & 2 deletions test/sql/versioning_including_current_version_in_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SELECT a, "b b", lower(sys_period) = CURRENT_TIMESTAMP FROM versioning ORDER BY

SELECT a, c, upper(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER BY a, sys_period;

SELECT a, c, lower(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER BY a, sys_period;

SELECT a, "b b" FROM versioning WHERE lower(sys_period) = CURRENT_TIMESTAMP ORDER BY a, sys_period;

COMMIT;
Expand Down Expand Up @@ -82,8 +84,6 @@ SELECT * FROM versioning;

SELECT a, c, upper(sys_period) = CURRENT_TIMESTAMP FROM versioning_history ORDER BY a, sys_period;

SELECT a, "b b" FROM versioning WHERE lower(sys_period) = CURRENT_TIMESTAMP ORDER BY a, sys_period;

END;

DROP TABLE versioning;
Expand Down

0 comments on commit 1718ce3

Please sign in to comment.