timescaledb/test/sql/insert.sql
Robin Thomas 72f754a576 use PostgreSQL's own hash_any function as default partfunc;
remove all murmur3-related source code. Alter regression tests
to reflect new hash values for inputs, and a slightly different
set of input data to ensure that sufficient chunks and partitions
are tested. Some changes to .sh scripts in sql/setup that seem
to be used only to power the "unit tests", which I cannot
yet run successfully.
2017-04-29 18:31:44 -04:00

23 lines
873 B
SQL

\ir include/insert_two_partitions.sql
\d+ "_timescaledb_internal".*
SELECT *
FROM "_timescaledb_internal"._hyper_1_0_replica order by "timeCustom", device_id;
SELECT * FROM _timescaledb_catalog.chunk;
SELECT * FROM _timescaledb_catalog.chunk_replica_node;
SELECT * FROM _timescaledb_catalog.partition_replica;
SELECT * FROM "two_Partitions" ORDER BY "timeCustom", device_id;
SELECT * FROM ONLY "two_Partitions";
CREATE TABLE error_test(time timestamp, temp float8, device text NOT NULL);
SELECT create_hypertable('error_test', 'time', 'device', 2);
INSERT INTO error_test VALUES ('Mon Mar 20 09:18:20.1 2017', 21.3, 'dev1');
\set ON_ERROR_STOP 0
-- generate insert error
INSERT INTO error_test VALUES ('Mon Mar 20 09:18:22.3 2017', 21.1, NULL);
\set ON_ERROR_STOP 1
INSERT INTO error_test VALUES ('Mon Mar 20 09:18:25.7 2017', 22.4, 'dev2');
SELECT * FROM error_test;