@@ -133,7 +133,7 @@ SET pg_pathman.enable = t;</programlisting>
133
133
<para><emphasis role="strong">Contents</emphasis></para>
134
134
<para><link linkend="pg-pathman-choosing-partitioning-strategies">Choosing Partitioning Strategies</link></para>
135
135
<para><link linkend="pg-pathman-running-non-blocking-data-migration">Running Non-Blocking Data Migration</link></para>
136
- <para><link linkend="pg-pathman-partitioning-by-expression">Partitioning by Expression</link></para>
136
+ <para><link linkend="pg-pathman-partitioning-by-expression">Partitioning by a Single Expression</link></para>
137
137
<para><link linkend="pg-pathman-partitioning-by-comp-key">Partitioning by Composite Key</link></para>
138
138
<para>
139
139
As your database grows, indexing mechanisms may become inefficient
@@ -243,7 +243,7 @@ replace_hash_partition(old_partition REGCLASS,
243
243
when you insert data outside of the already covered range.</para>
244
244
<programlisting>
245
245
create_range_partitions(relation REGCLASS,
246
- expression TEXT,
246
+ expression TEXT,
247
247
start_value ANYELEMENT,
248
248
p_interval ANYELEMENT | INTERVAL,
249
249
p_count INTEGER DEFAULT NULL,
@@ -354,10 +354,11 @@ SELECT stop_concurrent_part_task(relation REGCLASS);
354
354
</para></tip>
355
355
</sect3>
356
356
<sect3 id="pg-pathman-partitioning-by-expression">
357
- <title>Partitioning by Expression</title>
357
+ <title>Partitioning by a Single Expression</title>
358
358
<para>
359
359
For both range and hash partitioning strategies, <filename>pg_pathman</filename>
360
- supports partitioning by expression that returns a single scalar value. The partitioning expression
360
+ supports partitioning by expression that returns a single scalar value.
361
+ The partitioning expression
361
362
can reference a table column, as well as calculate the partitioning key
362
363
based on one or more column values.
363
364
</para>
@@ -500,14 +501,14 @@ create type test_key as (year float8, month float8);
500
501
To enable automatic partition naming, run the <literal>create_naming_sequence()</literal>
501
502
function passing the table name as an argument:
502
503
<programlisting>
503
- select create_naming_sequence('test');
504
+ SELECT create_naming_sequence('test');
504
505
</programlisting>
505
506
</para>
506
507
<para>
507
508
Register the <structname>test</structname> table with
508
509
<filename>pg_pathman</filename>, specifying the partitioning key you are going to use:
509
510
<programlisting>
510
- select add_to_pathman_config('test',
511
+ SELECT add_to_pathman_config('test',
511
512
'( extract(year from logdate),
512
513
extract(month from logdate) )::test_key',
513
514
NULL);
@@ -516,7 +517,7 @@ select add_to_pathman_config('test',
516
517
<para>Create a partition that includes all the data in the range of ten years,
517
518
starting from January of the current year:
518
519
<programlisting>
519
- select add_range_partition('test',
520
+ SELECT add_range_partition('test',
520
521
(extract(year from current_date), 1)::test_key,
521
522
(extract(year from current_date + '10 years'::interval), 1)::test_key);
522
523
</programlisting>
0 commit comments