mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 18:13:18 +08:00
- Directory structure now matches common practices - Regression tests now run with pg_regress via the PGXS infrastructure. - Unit tests do not integrate well with pg_regress and have to be run separately. - Docker functionality is separate from main Makefile. Run with `make -f docker.mk` to build and `make -f docker.mk run` to run the database in a container.
31 lines
748 B
SQL
31 lines
748 B
SQL
\set ON_ERROR_STOP 1
|
|
\set VERBOSITY verbose
|
|
\set SHOW_CONTEXT never
|
|
|
|
\ir include/create_clustered_db.sql
|
|
|
|
\set ECHO ALL
|
|
\c meta
|
|
SELECT add_cluster_user('postgres', NULL);
|
|
|
|
SELECT set_meta('meta' :: NAME, 'localhost');
|
|
SELECT add_node('Test1' :: NAME, 'localhost');
|
|
|
|
SELECT add_node('test2' :: NAME, 'localhost');
|
|
|
|
\c Test1
|
|
|
|
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');
|
|
|
|
\C test2
|
|
\dt "test_schema".*
|
|
|
|
--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".*
|