forked from timescale/timescaledb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CAgg migration with timestamp without timezone
It was a leftover from the original implementation where we didn't add tests for time dimension using `timestamp without timezone`. Fixed it by dealing with this datatype and added regression tests. Fixes timescale#4956
- Loading branch information
1 parent
6ad2824
commit ebdac12
Showing
16 changed files
with
1,729 additions
and
359 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- This file and its contents are licensed under the Timescale License. | ||
-- Please see the included NOTICE for copyright information and | ||
-- LICENSE-TIMESCALE for a copy of the license. | ||
|
||
\set IS_DISTRIBUTED FALSE | ||
\set IS_TIME_DIMENSION TRUE | ||
\set TIME_DIMENSION_DATATYPE TIMESTAMPTZ | ||
|
||
\ir include/cagg_migrate_common.sql |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- This file and its contents are licensed under the Timescale License. | ||
-- Please see the included NOTICE for copyright information and | ||
-- LICENSE-TIMESCALE for a copy of the license. | ||
|
||
------------------------------------ | ||
-- Set up a distributed environment | ||
------------------------------------ | ||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER | ||
|
||
\set DATA_NODE_1 :TEST_DBNAME _1 | ||
\set DATA_NODE_2 :TEST_DBNAME _2 | ||
\set DATA_NODE_3 :TEST_DBNAME _3 | ||
|
||
\ir include/remote_exec.sql | ||
|
||
SELECT node_name, database, node_created, database_created, extension_created | ||
FROM ( | ||
SELECT (add_data_node(name, host => 'localhost', DATABASE => name)).* | ||
FROM (VALUES (:'DATA_NODE_1'), (:'DATA_NODE_2'), (:'DATA_NODE_3')) v(name) | ||
) a; | ||
|
||
GRANT USAGE ON FOREIGN SERVER :DATA_NODE_1, :DATA_NODE_2, :DATA_NODE_3 TO PUBLIC; | ||
|
||
\set IS_DISTRIBUTED TRUE | ||
\set IS_TIME_DIMENSION TRUE | ||
\set TIME_DIMENSION_DATATYPE TIMESTAMPTZ | ||
|
||
\ir include/cagg_migrate_common.sql | ||
|
||
-- cleanup | ||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER; | ||
DROP DATABASE :DATA_NODE_1; | ||
DROP DATABASE :DATA_NODE_2; | ||
DROP DATABASE :DATA_NODE_3; |
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