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: tsl/test/expected/chunk_utils_internal.out
+22-15Lines changed: 22 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1138,6 +1138,13 @@ SELECT indexname, tablename FROM pg_indexes WHERE indexname = 'hyper_constr_mid_
1138
1138
(1 row)
1139
1139
1140
1140
DROP INDEX hyper_constr_mid_idx;
1141
+
\i include/chunk_utils_internal_orderedappend.sql
1142
+
-- This file and its contents are licensed under the Timescale License.
1143
+
-- Please see the included NOTICE for copyright information and
1144
+
-- LICENSE-TIMESCALE for a copy of the license.
1145
+
-- TESTS for hypertable_osm_range_update_function
1146
+
-- orderedappend (needs hypertable_osm_range_update to update catalog range)
1147
+
-- (so that ordered append will work with OSM chunks)
1141
1148
-- TEST for hypertable_osm_range_update function
1142
1149
-- test range of dimension slice for osm chunk for different datatypes
1143
1150
CREATE TABLE osm_int2(time int2 NOT NULL);
@@ -1171,7 +1178,7 @@ SELECT table_name FROM create_hypertable('osm_date','time');
1171
1178
(1 row)
1172
1179
1173
1180
SELECT table_name FROM create_hypertable('osm_ts','time');
1174
-
WARNING: column type "timestamp without time zone" used for "time" does not follow best practices
1181
+
psql:include/chunk_utils_internal_orderedappend.sql:21: WARNING: column type "timestamp without time zone" used for "time" does not follow best practices
1175
1182
table_name
1176
1183
------------
1177
1184
osm_ts
@@ -1252,9 +1259,9 @@ WHERE c.hypertable_id = :htid AND cc.chunk_id = c.id AND ds.id = cc.dimension_sl
1252
1259
\set ON_ERROR_STOP 0
1253
1260
-- both range_start and range_end must be NULL, or non-NULL
INSERT INTO test_chunkapp VALUES ('2020-01-03 02:00'::timestamptz, 3);
1357
-
ERROR: Cannot insert into tiered chunk range of public.test_chunkapp - attempt to create new chunk with range [Fri Jan 03 00:00:00 2020 PST Sat Jan 04 00:00:00 2020 PST] failed
1364
+
psql:include/chunk_utils_internal_orderedappend.sql:100: ERROR: Cannot insert into tiered chunk range of public.test_chunkapp - attempt to create new chunk with range [Fri Jan 03 00:00:00 2020 PST Sat Jan 04 00:00:00 2020 PST] failed
1358
1365
\set ON_ERROR_STOP 1
1359
1366
SELECT ts_undo_osm_hook();
1360
1367
ts_undo_osm_hook
@@ -1468,9 +1475,9 @@ SELECT * FROM test_chunkapp WHERE time < '2023-01-01' ORDER BY 1;
1468
1475
\set ON_ERROR_STOP 0
1469
1476
-- test adding constraint directly on OSM chunk is blocked
1470
1477
ALTER TABLE test_chunkapp_fdw_child ADD CHECK (a > 0); -- non-dimensional
1471
-
ERROR: operation not supported on OSM chunk tables
1478
+
psql:include/chunk_utils_internal_orderedappend.sql:127: ERROR: operation not supported on OSM chunk tables
1472
1479
ALTER TABLE test_chunkapp_fdw_child ADD CHECK (time > '1600-01-01'::timestamptz); -- dimensional
1473
-
ERROR: operation not supported on OSM chunk tables
1480
+
psql:include/chunk_utils_internal_orderedappend.sql:128: ERROR: operation not supported on OSM chunk tables
INSERT INTO test2 VALUES ('2020-01-01'::timestamptz, 1);
1498
1505
ALTER TABLE test2 SET (timescaledb.compress);
1499
-
WARNING: there was some uncertainty picking the default segment by for the hypertable: You do not have any indexes on columns that can be used for segment_by and thus we are not using segment_by for compression. Please make sure you are not missing any indexes
1500
-
NOTICE: default segment by for hypertable "test2" is set to ""
1501
-
NOTICE: default order by for hypertable "test2" is set to ""time" DESC"
1506
+
psql:include/chunk_utils_internal_orderedappend.sql:138: WARNING: there was some uncertainty picking the default segment by for the hypertable: You do not have any indexes on columns that can be used for segment_by and thus we are not using segment_by for compression. Please make sure you are not missing any indexes
1507
+
psql:include/chunk_utils_internal_orderedappend.sql:138: NOTICE: default segment by for hypertable "test2" is set to ""
1508
+
psql:include/chunk_utils_internal_orderedappend.sql:138: NOTICE: default order by for hypertable "test2" is set to ""time" DESC"
1502
1509
SELECT compress_chunk(show_chunks('test2'));
1503
1510
compress_chunk
1504
1511
------------------------------------------
@@ -1511,13 +1518,13 @@ FROM _timescaledb_catalog.hypertable ht, _timescaledb_catalog.hypertable cht
1511
1518
WHERE ht.table_name = 'test2' and cht.id = ht.compressed_hypertable_id \gset
ERROR: could not find time dimension for hypertable _timescaledb_internal._compressed_hypertable_18
1521
+
psql:include/chunk_utils_internal_orderedappend.sql:145: ERROR: could not find time dimension for hypertable _timescaledb_internal._compressed_hypertable_18
1515
1522
\set ON_ERROR_STOP 1
1516
1523
-- test wrong/incompatible data types with hypertable time dimension
psql:include/chunk_utils_internal_orderedappend.sql:157: ERROR: invalid time argument type "bigint"
1538
1545
\set ON_ERROR_STOP 1
1539
1546
-- test dimension slice tuple visibility
1540
1547
\c :TEST_DBNAME :ROLE_SUPERUSER
@@ -1557,9 +1564,9 @@ ROLLBACK;
1557
1564
-- should show 0 10 as range
1558
1565
\set ON_ERROR_STOP 0
1559
1566
INSERT INTO osm_slice_update VALUES (1);
1560
-
ERROR: Cannot insert into tiered chunk range of public.osm_slice_update - attempt to create new chunk with range [0 10] failed
1567
+
psql:include/chunk_utils_internal_orderedappend.sql:178: ERROR: Cannot insert into tiered chunk range of public.osm_slice_update - attempt to create new chunk with range [0 10] failed
1561
1568
INSERT INTO osm_slice_update VALUES (1);
1562
-
ERROR: Cannot insert into tiered chunk range of public.osm_slice_update - attempt to create new chunk with range [0 10] failed
1569
+
psql:include/chunk_utils_internal_orderedappend.sql:179: ERROR: Cannot insert into tiered chunk range of public.osm_slice_update - attempt to create new chunk with range [0 10] failed
0 commit comments