mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 19:13:16 +08:00
This commit moves a lot of test setup logic to runner.sh. Also passes the right commands to the regression infrastructure to create appropriate users and run tests as a regular user.
12 lines
469 B
SQL
12 lines
469 B
SQL
-- Test that we can verify constraints on regular tables
|
|
CREATE TABLE test_hyper_pk(time TIMESTAMPTZ PRIMARY KEY, temp FLOAT, device INT);
|
|
CREATE TABLE test_pk(device INT PRIMARY KEY);
|
|
CREATE TABLE test_like(LIKE test_pk);
|
|
|
|
SELECT create_hypertable('test_hyper_pk', 'time');
|
|
|
|
\set ON_ERROR_STOP 0
|
|
-- Foreign key constraints that reference hypertables are currently unsupported
|
|
CREATE TABLE test_fk(time TIMESTAMPTZ REFERENCES test_hyper_pk(time));
|
|
\set ON_ERROR_STOP 1
|