Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres: Support creating partitioned tables #1962

Open
gitmalong opened this issue Nov 7, 2023 · 3 comments
Open

postgres: Support creating partitioned tables #1962

gitmalong opened this issue Nov 7, 2023 · 3 comments

Comments

@gitmalong
Copy link
Sponsor

gitmalong commented Nov 7, 2023

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:

Sponsored some beer (:

Thanks

@tyt2y3
Copy link
Member

tyt2y3 commented Dec 1, 2023

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.

@gitmalong
Copy link
Sponsor Author

gitmalong commented Dec 1, 2023

Hi. You're welcome. I created a corresponding issue: SeaQL/sea-query#722

@delbonis
Copy link

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants