timescaledb/test/sql/create_hypertable.sql
2017-02-22 12:16:48 +01:00

20 lines
522 B
SQL

\set ON_ERROR_STOP 1
\set VERBOSITY verbose
\set SHOW_CONTEXT never
\ir include/create_single_db.sql
\set ECHO ALL
\c single
create schema test_schema;
create table test_schema.test_table(time bigint, temp float8, device_id text);
\dt "test_schema".*
select * from create_hypertable('test_schema.test_table', 'time', 'device_id');
--test partitioning in only time dimension
create table test_schema.test_1dim(time timestamp, temp float);
select create_hypertable('test_schema.test_1dim', 'time');
\dt "test_schema".*