p_interval - the time or integer range interval for each partition. #404
Replies: 2 comments 4 replies
-
There are currently no plans for other data types at this time unless there is a high demand for one in particular or someone submits a PR to fully support it. I will say it's unlikely for any data types other than number or time based ones will be accepted unless a use-case for ongoing maintenance requirements for such can be made. |
Beta Was this translation helpful? Give feedback.
-
If your goal is to actually partition by day, then I might suggest something else here. Create another column that is a If the queries you were running were using the numeric column as the condition for any date/time calculations to narrow the data, they would have to be rewritten to use that new column instead to take advantage of parition-prunning/constraint-exclusion. But you would likely see a marked improvement in read query performance as well. There might be a slight impact on write performance with an additional column and the trigger processing, but in this case I think it would likely not be very noticeable. Testing is recommended of course. Or maybe you could completely remove that YYYYMMDD prefix for the numeric field all together if the only reason you were adding it was to enable daily partitioning. Then you wouldn't need the trigger at all. Application would just need to process the row in a different manner. If you'd like to see about adding numeric support, I'd suggest looking at the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The pg_partman extension only accepts integer and date as partitioning columns. I would like to know if at some point other types of data will be accepted, such as numeric for example.
Beta Was this translation helpful? Give feedback.
All reactions