Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf99f18c

Browse files
committed
[Doc]: update pg_pathman doc
1 parent0a51f9d commitf99f18c

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

‎doc/src/sgml/pgpathman.sgml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ CREATE EXTENSION pg_pathman;
140140
create_hash_partitions(relation REGCLASS,
141141
attribute TEXT,
142142
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)
144146
</programlisting>
145147
<para>
146148
Performs HASH partitioning for <literal>relation</literal> by
@@ -173,13 +175,18 @@ create_range_partitions(relation REGCLASS,
173175
</programlisting>
174176
<para>
175177
Performs RANGE partitioning for <literal>relation</literal> by
176-
partitioning key <literal>attribute</literal>.
178+
partitioning key <literal>attribute</literal>,
177179
<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.
183190
</para>
184191
<programlisting>
185192
create_partitions_from_range(relation REGCLASS,
@@ -273,6 +280,14 @@ merge_range_partitions(partition1 REGCLASS, partition2 REGCLASS)
273280
<literal>partition2</literal> is removed.
274281
</para>
275282
<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>
276291
append_range_partition(p_relation REGCLASS,
277292
partition_name TEXT DEFAULT NULL,
278293
tablespace TEXT DEFAULT NULL)
@@ -299,7 +314,9 @@ add_range_partition(relation REGCLASS,
299314
</programlisting>
300315
<para>
301316
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.
303320
</para>
304321
<programlisting>
305322
drop_range_partition(partition TEXT, delete_data BOOLEAN DEFAULT TRUE)
@@ -349,6 +366,16 @@ drop_partitions(parent REGCLASS,
349366
<sect3 id="additional-parameters">
350367
<title>Additional parameters</title>
351368
<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>
352379
set_enable_parent(relation REGCLASS, value BOOLEAN)
353380
</programlisting>
354381
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp