-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(current_history): Fixed lower range not being set correctly when … (
#75) * fix(current_history): Fixed lower range not being set correctly when including current version in history. Moved mitigate_update_conflicts to be a VAR like other ARG variables. Updated tests to reflect new change * Matching original extension functionality to raise ERROR if start and end timestamp ranges are the same * Updated no checks function with new changes * Updated system time tests to set timestamp on each transaction and closely mirror original extension tests * tweak to test to check less than too * updated comments
- Loading branch information
1 parent
956f27a
commit 4f0d730
Showing
10 changed files
with
143 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
CREATE TABLE invalid_system_period (sys_period bigint); | ||
CREATE TRIGGER versioning_trigger | ||
BEFORE INSERT OR UPDATE OR DELETE ON invalid_system_period | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, NULL); | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, false); | ||
INSERT INTO invalid_system_period DEFAULT VALUES; | ||
ERROR: system period column "sys_period" of relation "invalid_system_period" is not a range but type bigint | ||
CREATE TABLE invalid_system_period2 (sys_period tstzrange); | ||
ALTER TABLE invalid_system_period2 DROP COLUMN sys_period; | ||
CREATE TRIGGER versioning_trigger | ||
BEFORE INSERT OR UPDATE OR DELETE ON invalid_system_period2 | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, NULL); | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, false); | ||
INSERT INTO invalid_system_period2 DEFAULT VALUES; | ||
ERROR: column "sys_period" of relation "invalid_system_period2" does not exist | ||
CREATE TABLE invalid_system_period3 (sys_period tstzrange[]); | ||
CREATE TRIGGER versioning_trigger | ||
BEFORE INSERT OR UPDATE OR DELETE ON invalid_system_period3 | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, NULL); | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, false); | ||
INSERT INTO invalid_system_period3 DEFAULT VALUES; | ||
ERROR: system period column "sys_period" of relation "invalid_system_period3" is not a range but an array | ||
CREATE TABLE invalid_system_period4 (sys_period tsrange); | ||
CREATE TRIGGER versioning_trigger | ||
BEFORE INSERT OR UPDATE OR DELETE ON invalid_system_period4 | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, NULL); | ||
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', NULL, false); | ||
INSERT INTO invalid_system_period4 DEFAULT VALUES; | ||
ERROR: system period column "sys_period" of relation "invalid_system_period4" is not a range of timestamp with timezone but of type timestamp without time zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.