sea-orm
sea-orm copied to clipboard
postgres: Support creating partitioned tables
Hi!
The TableCreateStatement does not support creating partitioned tables.
- Create partitioned table statement
CREATE TABLE measurement (
city_id int not null,
logdate date not null,
) PARTITION BY RANGE (logdate);
- Create partition statement
CREATE TABLE measurement_y2006m02 PARTITION OF measurement
FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');
Reasoning:
- I see this feature request plus #1922 as the necessary features to make SeaORM + Postgres work well with huge amounts of data.
Sponsored some beer (:
Thanks
Thank you for the sponsorship. I am not sure where there is an issue for PARTITION BY RANGE on sea-query. I'll assess the difficult / effort needed.
Hi. You're welcome. I created a corresponding issue: https://github.com/SeaQL/sea-query/issues/722
I'm also interested in this. What are the blockers? And what would creating partitions with SeaORM in the meantime look like (I guess using .extra)?