-
Notifications
You must be signed in to change notification settings - Fork 285
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
[Feature request] create_parent: add an offset in the partitions #339
Comments
Initially I thought the |
I think one issue with this that I'm still unsure of is do you need that offset just for the first partition or do you need that offset to continue forward? Like if the interval was 10, the child tables would normally be spaced like 0 Do you want that offset just for the first table like this? 1 Or for all going forward? 1 If you just want the first one, I honestly don't really see the need for it. While the table may have a lower boundary of 0, that doesn't mean it has to insert that zero value. If that was a concern just for that first child table, you could add a one-off constraint to that first child to prevent it. If it needs to be a permanent offset for the entire partition set, that I could possibly look into. |
My idea was add an offset, because if I want to start the partition, for example with ID 15 and an interval of 10 I would like to get: |
Ok. Just wanted some clarification. Thanks! |
For any question ask me, Thanks in advance |
Marking this as a feature to look into for 5.0. If I get a chance to look at it before then I will try. |
Hi,
I needed to create partitions by id, but the first partition starts for id 0 and I needed the first partition to be for id 1, so I suggest adding an offset in the create_parent function to select the first partition, this offset will be a parameter obtained by argument.
In the create_parent function, add a new variable integer called offset initialized to 0 to keep current use, then add the following code on line 576:
v_starting_partition_id := v_max - (v_max % v_id_interval);
v_starting_partition_id := v_starting_partition_id + offset;
FOR i IN 0..p_premake LOOP
The text was updated successfully, but these errors were encountered: