@@ -121,7 +121,7 @@ SET pg_pathman.enable = t;</programlisting>
121
121
<para><emphasis role="strong">Contents</emphasis></para>
122
122
<para><link linkend="pg-pathman-choosing-partitioning-strategies">Choosing Partitioning Strategies</link></para>
123
123
<para><link linkend="pg-pathman-running-non-blocking-data-migration">Running Non-Blocking Data Migration</link></para>
124
- <para><link linkend="pg-pathman-partitioning-by-expression">Partitioning by Expression</link></para>
124
+ <para><link linkend="pg-pathman-partitioning-by-expression">Partitioning by a Single Expression</link></para>
125
125
<para><link linkend="pg-pathman-partitioning-by-comp-key">Partitioning by Composite Key</link></para>
126
126
<para>
127
127
As your database grows, indexing mechanisms may become inefficient
@@ -231,7 +231,7 @@ replace_hash_partition(old_partition REGCLASS,
231
231
when you insert data outside of the already covered range.</para>
232
232
<programlisting>
233
233
create_range_partitions(relation REGCLASS,
234
- expression TEXT,
234
+ expression TEXT,
235
235
start_value ANYELEMENT,
236
236
p_interval ANYELEMENT | INTERVAL,
237
237
p_count INTEGER DEFAULT NULL,
@@ -342,10 +342,11 @@ SELECT stop_concurrent_part_task(relation REGCLASS);
342
342
</para></tip>
343
343
</sect3>
344
344
<sect3 id="pg-pathman-partitioning-by-expression">
345
- <title>Partitioning by Expression</title>
345
+ <title>Partitioning by a Single Expression</title>
346
346
<para>
347
347
For both range and hash partitioning strategies, <filename>pg_pathman</filename>
348
- supports partitioning by expression that returns a single scalar value. The partitioning expression
348
+ supports partitioning by expression that returns a single scalar value.
349
+ The partitioning expression
349
350
can reference a table column, as well as calculate the partitioning key
350
351
based on one or more column values.
351
352
</para>
@@ -488,14 +489,14 @@ create type test_key as (year float8, month float8);
488
489
To enable automatic partition naming, run the <literal>create_naming_sequence()</literal>
489
490
function passing the table name as an argument:
490
491
<programlisting>
491
- select create_naming_sequence('test');
492
+ SELECT create_naming_sequence('test');
492
493
</programlisting>
493
494
</para>
494
495
<para>
495
496
Register the <structname>test</structname> table with
496
497
<filename>pg_pathman</filename>, specifying the partitioning key you are going to use:
497
498
<programlisting>
498
- select add_to_pathman_config('test',
499
+ SELECT add_to_pathman_config('test',
499
500
'( extract(year from logdate),
500
501
extract(month from logdate) )::test_key',
501
502
NULL);
@@ -504,7 +505,7 @@ select add_to_pathman_config('test',
504
505
<para>Create a partition that includes all the data in the range of ten years,
505
506
starting from January of the current year:
506
507
<programlisting>
507
- select add_range_partition('test',
508
+ SELECT add_range_partition('test',
508
509
(extract(year from current_date), 1)::test_key,
509
510
(extract(year from current_date + '10 years'::interval), 1)::test_key);
510
511
</programlisting>
0 commit comments