SeaQL / SeaQL/sea-orm

postgres: Support creating partitioned tables

Open
#1,962 6 comments 1 reaction 0 assignees View on GitHub

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.

  1. Create partitioned table statement
CREATE TABLE measurement (
    city_id         int not null,
    logdate         date not null,
) PARTITION BY RANGE (logdate);
  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.