直接上表的DDL
-- hypertable创建DDL:
CREATE TABLE public.snapshot (
"Student" text NOT NULL,
"Date" int8 NOT NULL,
"Time" text NOT NULL,
"Field" text NOT NULL,
"Value" text NULL,
CONSTRAINT snapshot_pk PRIMARY KEY ("Stock", "Date", "Time", "Field")
);
SELECT create_hypertable('public.snapshot', by_range('Date'));
ALTER TABLE public.snapshort SET (
timescaledb.compress
);
SELECT add_compression_policy('public.snapshot', compress_after => 1);
GitHubID:shiyi23
践行 活在当下 的理念