We have a time series table which is partitionied with inheritance. We now want to migrate this to TimeScaleDB within the same database. Documentation says to either use pg_dump/COPY or CREATE with LIKE. We could neither get to work with inherited tables. Should we pg_dump/COPY all inherited tables into CSV files, concatenate then import?
CREATE TABLE events (
date TIMESTAMP,
event SMALLINT
);
CREATE TABLE events_2018_1 (
CHECK (date >= '2018-01-01 00:00:00' AND date < '2018-02-01 00:00:00')
)
INHERITS (events);
CREATE INDEX idx_events_date
ON events
USING BTREE (date);