@@ -140,7 +140,9 @@ CREATE EXTENSION pg_pathman;
140
140
create_hash_partitions(relation REGCLASS,
141
141
attribute TEXT,
142
142
partitions_count INTEGER,
143
- partition_data BOOLEAN DEFAULT TRUE)
143
+ partition_data BOOLEAN DEFAULT TRUE,
144
+ partition_names TEXT[] DEFAULT NULL,
145
+ tablespaces TEXT[] DEFAULT NULL)
144
146
</programlisting>
145
147
<para>
146
148
Performs HASH partitioning for <literal>relation</literal> by
@@ -173,13 +175,18 @@ create_range_partitions(relation REGCLASS,
173
175
</programlisting>
174
176
<para>
175
177
Performs RANGE partitioning for <literal>relation</literal> by
176
- partitioning key <literal>attribute</literal>.
178
+ partitioning key <literal>attribute</literal>,
177
179
<literal>start_value</literal> argument specifies initial value,
178
- <literal>interval</literal> sets the range of values in a single
179
- partition, <literal>count</literal> is the number of premade
180
- partitions (if not set then pathman tries to determine it based
181
- on attribute values). Partition creation callback is invoked for
182
- each partition if set beforehand.
180
+ <literal>p_interval</literal> sets the default range for auto
181
+ created partitions or partitions created with
182
+ <literal>append_range_partition()</literal> or
183
+ <literal>prepend_range_partition()</literal>
184
+ (if <literal>NULL</literal> then auto partition creation
185
+ feature will not work), <literal>p_count</literal> is the
186
+ number of premade partitions (if not set then
187
+ <literal>pg_pathman</literal> tries to determine it based
188
+ on attribute values). Partition creation callback is invoked
189
+ for each partition if set beforehand.
183
190
</para>
184
191
<programlisting>
185
192
create_partitions_from_range(relation REGCLASS,
@@ -273,6 +280,14 @@ merge_range_partitions(partition1 REGCLASS, partition2 REGCLASS)
273
280
<literal>partition2</literal> is removed.
274
281
</para>
275
282
<programlisting>
283
+ merge_range_partitions(partitions REGCLASS[])
284
+ </programlisting>
285
+ <para>
286
+ Merge several adjacent RANGE partitions (partitions must be specified
287
+ in ascending or descending order). All the data will be accumulated in
288
+ the first partition.
289
+ </para>
290
+ <programlisting>
276
291
append_range_partition(p_relation REGCLASS,
277
292
partition_name TEXT DEFAULT NULL,
278
293
tablespace TEXT DEFAULT NULL)
@@ -299,7 +314,9 @@ add_range_partition(relation REGCLASS,
299
314
</programlisting>
300
315
<para>
301
316
Create new RANGE partition for <literal>relation</literal> with
302
- specified range bounds.
317
+ specified range bounds. If <literal>start_value</literal>
318
+ or <literal>end_value</literal> are NULL then corresponding
319
+ range bound will be infinite.
303
320
</para>
304
321
<programlisting>
305
322
drop_range_partition(partition TEXT, delete_data BOOLEAN DEFAULT TRUE)
@@ -349,6 +366,16 @@ drop_partitions(parent REGCLASS,
349
366
<sect3 id="additional-parameters">
350
367
<title>Additional parameters</title>
351
368
<programlisting>
369
+ set_interval(relation REGCLASS, value ANYELEMENT)
370
+ </programlisting>
371
+ <para>
372
+ Update RANGE partitioned table interval. Note that interval must not
373
+ be negative and it must not be trivial, i.e. its value should be
374
+ greater than zero for numeric types, at least 1 microsecond for
375
+ <literal>TIMESTAMP</literal> and at least 1 day
376
+ for <literal>DATE</literal>.
377
+ </para>
378
+ <programlisting>
352
379
set_enable_parent(relation REGCLASS, value BOOLEAN)
353
380
</programlisting>
354
381
<para>