You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performs HASH partitioning for `relation` by partitioning expression `expr`. The `partitions_count` parameter specifies the number of partitions to create; it cannot be changed afterwards. If `partition_data` is `true` then all the data will be automatically copied from the parent table to partitions. Note that data migration may took a while to finish and the table will be locked until transaction commits. See `partition_table_concurrently()` for a lock-free way to migrate data. Partition creation callback is invoked for each partition if set beforehand (see `set_init_callback()`).
115
115
116
116
```plpgsql
117
-
create_range_partitions(relation REGCLASS,
118
-
expr TEXT,
119
-
start_value ANYELEMENT,
120
-
p_interval ANYELEMENT,
121
-
p_count INTEGER DEFAULT NULL
122
-
partition_data BOOLEAN DEFAULT TRUE)
123
-
124
-
create_range_partitions(relation REGCLASS,
125
-
expr TEXT,
126
-
start_value ANYELEMENT,
127
-
p_interval INTERVAL,
128
-
p_count INTEGER DEFAULT NULL,
129
-
partition_data BOOLEAN DEFAULT TRUE)
130
-
```
131
-
Performs RANGE partitioning for `relation` by partitioning expression `expr`, `start_value` argument specifies initial value, `p_interval` sets the default range for auto created partitions or partitions created with `append_range_partition()` or `prepend_range_partition()` (if `NULL` then auto partition creation feature won't work), `p_count` is the number of premade partitions (if not set then `pg_pathman` tries to determine it based on expression's values). Partition creation callback is invoked for each partition if set beforehand.
117
+
create_range_partitions(relation REGCLASS,
118
+
expression TEXT,
119
+
start_value ANYELEMENT,
120
+
p_interval ANYELEMENT,
121
+
p_count INTEGER DEFAULT NULL
122
+
partition_data BOOLEAN DEFAULT TRUE)
123
+
124
+
create_range_partitions(relation REGCLASS,
125
+
expression TEXT,
126
+
start_value ANYELEMENT,
127
+
p_interval INTERVAL,
128
+
p_count INTEGER DEFAULT NULL,
129
+
partition_data BOOLEAN DEFAULT TRUE)
130
+
131
+
create_range_partitions(relation REGCLASS,
132
+
expression TEXT,
133
+
bounds ANYARRAY,
134
+
partition_names TEXT[] DEFAULT NULL,
135
+
tablespaces TEXT[] DEFAULT NULL,
136
+
partition_data BOOLEAN DEFAULT TRUE)
137
+
```
138
+
Performs RANGE partitioning for `relation` by partitioning expression `expr`, `start_value` argument specifies initial value, `p_interval` sets the default range for auto created partitions or partitions created with `append_range_partition()` or `prepend_range_partition()` (if `NULL` then auto partition creation feature won't work), `p_count` is the number of premade partitions (if not set then `pg_pathman` tries to determine it based on expression's values). The `bounds` array can be built using `generate_range_bounds()`. Partition creation callback is invoked for each partition if set beforehand.
139
+
140
+
```plpgsql
141
+
generate_range_bounds(p_start ANYELEMENT,
142
+
p_interval INTERVAL,
143
+
p_count INTEGER)
144
+
145
+
generate_range_bounds(p_start ANYELEMENT,
146
+
p_interval ANYELEMENT,
147
+
p_count INTEGER)
148
+
```
149
+
Builds `bounds` array for `create_range_partitions()`.
0 commit comments