I have a partitioned table and another two tables for each partition
CREATE TABLE measurement (
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
CREATE TABLE measurement_y2016 PARTITION OF measurement
FOR VALUES FROM ('2016-01-01') TO ('2017-01-01');
CREATE TABLE measurement_y2017 PARTITION OF measurement
FOR VALUES FROM ('2017-01-01') TO ('2018-01-01');
I would ask if this is the only way to work with partitioned table, create a table for each partition.
If my table has 100 partitions, then there will be 100 tables for this single partitioned table.
Is it possible to create partitioned table for Postgres like Mysql or Oracle, one table is good.
alter table add partition ...
a 100 times instead. – a_horse_with_no_name