1-- This file and its contents are licensed under the Apache License 2.0. 2-- Please see the included NOTICE for copyright information and 3-- LICENSE-APACHE for a copy of the license. 4 5-- these table definitions have been adjusted from 6-- table defintions of the postgres test suite 7 8CREATE TABLE INT2_TBL(f1 int2, ts timestamptz NOT NULL DEFAULT '2000-01-01'); 9SELECT table_name FROM create_hypertable('int2_tbl','ts'); 10 11INSERT INTO INT2_TBL(f1) VALUES ('0 '); 12INSERT INTO INT2_TBL(f1) VALUES (' 1234 '); 13INSERT INTO INT2_TBL(f1) VALUES (' -1234'); 14-- largest and smallest values 15INSERT INTO INT2_TBL(f1) VALUES ('32767'); 16INSERT INTO INT2_TBL(f1) VALUES ('-32767'); 17 18 19CREATE TABLE INT4_TBL(f1 int4, ts timestamptz NOT NULL DEFAULT '2000-01-01'); 20SELECT table_name FROM create_hypertable('int4_tbl','ts'); 21 22INSERT INTO INT4_TBL(f1) VALUES (' 0 '); 23INSERT INTO INT4_TBL(f1) VALUES ('123456 '); 24INSERT INTO INT4_TBL(f1) VALUES (' -123456'); 25-- largest and smallest values 26INSERT INTO INT4_TBL(f1) VALUES ('2147483647'); 27INSERT INTO INT4_TBL(f1) VALUES ('-2147483647'); 28 29 30CREATE TABLE INT8_TBL(q1 int8, q2 int8, ts timestamptz NOT NULL DEFAULT '2000-01-01'); 31SELECT table_name FROM create_hypertable('int8_tbl','ts'); 32 33INSERT INTO INT8_TBL VALUES(' 123 ',' 456'); 34INSERT INTO INT8_TBL VALUES('123 ','4567890123456789'); 35INSERT INTO INT8_TBL VALUES('4567890123456789','123'); 36INSERT INTO INT8_TBL VALUES(+4567890123456789,'4567890123456789'); 37INSERT INTO INT8_TBL VALUES('+4567890123456789','-4567890123456789'); 38 39 40CREATE TABLE FLOAT8_TBL(f1 float8, ts timestamptz NOT NULL DEFAULT '2000-01-01'); 41SELECT table_name FROM create_hypertable('float8_tbl','ts'); 42 43INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 '); 44INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 '); 45INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); 46INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); 47INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); 48 49CREATE TABLE TEXT_TBL (f1 text, ts timestamptz NOT NULL DEFAULT '2000-01-01'); 50SELECT table_name FROM create_hypertable('text_tbl','ts'); 51 52INSERT INTO TEXT_TBL VALUES ('doh!'); 53INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor'); 54 55CREATE TABLE a (aa TEXT); 56CREATE TABLE b (bb TEXT) INHERITS (a); 57CREATE TABLE c (cc TEXT) INHERITS (a); 58CREATE TABLE d (dd TEXT) INHERITS (b,c,a); 59 60INSERT INTO a(aa) VALUES('aaa'); 61INSERT INTO a(aa) VALUES('aaaa'); 62INSERT INTO a(aa) VALUES('aaaaa'); 63INSERT INTO a(aa) VALUES('aaaaaa'); 64INSERT INTO a(aa) VALUES('aaaaaaa'); 65INSERT INTO a(aa) VALUES('aaaaaaaa'); 66 67INSERT INTO b(aa) VALUES('bbb'); 68INSERT INTO b(aa) VALUES('bbbb'); 69INSERT INTO b(aa) VALUES('bbbbb'); 70INSERT INTO b(aa) VALUES('bbbbbb'); 71INSERT INTO b(aa) VALUES('bbbbbbb'); 72INSERT INTO b(aa) VALUES('bbbbbbbb'); 73 74INSERT INTO c(aa) VALUES('ccc'); 75INSERT INTO c(aa) VALUES('cccc'); 76INSERT INTO c(aa) VALUES('ccccc'); 77INSERT INTO c(aa) VALUES('cccccc'); 78INSERT INTO c(aa) VALUES('ccccccc'); 79INSERT INTO c(aa) VALUES('cccccccc'); 80 81INSERT INTO d(aa) VALUES('ddd'); 82INSERT INTO d(aa) VALUES('dddd'); 83INSERT INTO d(aa) VALUES('ddddd'); 84INSERT INTO d(aa) VALUES('dddddd'); 85INSERT INTO d(aa) VALUES('ddddddd'); 86INSERT INTO d(aa) VALUES('dddddddd'); 87 88CREATE TABLE onek ( 89 unique1 int4, 90 unique2 int4, 91 two int4, 92 four int4, 93 ten int4, 94 twenty int4, 95 hundred int4, 96 thousand int4, 97 twothousand int4, 98 fivethous int4, 99 tenthous int4, 100 odd int4, 101 even int4, 102 stringu1 name, 103 stringu2 name, 104 string4 name 105); 106 107SELECT table_name FROM create_hypertable('onek','unique2',chunk_time_interval:=1000); 108\copy onek FROM 'data/onek.data' 109 110CREATE TABLE tenk1 ( 111 unique1 int4, 112 unique2 int4, 113 two int4, 114 four int4, 115 ten int4, 116 twenty int4, 117 hundred int4, 118 thousand int4, 119 twothousand int4, 120 fivethous int4, 121 tenthous int4, 122 odd int4, 123 even int4, 124 stringu1 name, 125 stringu2 name, 126 string4 name 127); 128 129SELECT table_name FROM create_hypertable('tenk1','unique2',chunk_time_interval:=1000); 130\copy tenk1 FROM 'data/tenk.data' 131 132CREATE TABLE tenk2 ( 133 unique1 int4, 134 unique2 int4, 135 two int4, 136 four int4, 137 ten int4, 138 twenty int4, 139 hundred int4, 140 thousand int4, 141 twothousand int4, 142 fivethous int4, 143 tenthous int4, 144 odd int4, 145 even int4, 146 stringu1 name, 147 stringu2 name, 148 string4 name 149); 150 151SELECT table_name FROM create_hypertable('tenk2','unique2',chunk_time_interval:=1000); 152INSERT INTO tenk2 SELECT * FROM tenk1; 153 154