timescaledb/test/sql/ddl_single.sql
Matvey Arye e20edf890c Add better error checking for index creation.
This PR adds more regression tests for index creation and tests for more
user-errors. Significantly, it checks for the presence of both the time
and spaced-partition columns in unique indexes. This is needed because
Timescale cannot guarantee uniqueness if colliding rows don't land in the
same chunk. Fixes #29.
2017-05-03 13:21:32 -04:00

17 lines
409 B
SQL

\o /dev/null
\ir include/create_single_db.sql
\o
\ir include/ddl_ops_1.sql
SELECT * FROM PUBLIC."Hypertable_1";
EXPLAIN (costs off) SELECT * FROM PUBLIC."Hypertable_1";
SELECT * FROM _timescaledb_catalog.default_replica_node;
\ir include/ddl_ops_2.sql
\d+ PUBLIC."Hypertable_1"
\d+ "_timescaledb_internal"."_hyper_1_root"
\d+ _timescaledb_internal._hyper_1_1_0_1_data
SELECT * FROM PUBLIC."Hypertable_1";