postgres: Support creating partitioned tables
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.9k
- Forks
- 734
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 8
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TableCreateStatement API linked in the issue and compare it with PostgreSQL's partitioning documentation. Define how it should represent partitioned table creation and partition creation, then verify that the generated SQL matches the two examples in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100