|
| 1 | +<!-- doc/src/sgml/pathman.sgml --> |
| 2 | + |
| 3 | +<sect1 id="pathman" xreflabel="pathman"> |
| 4 | + <title>pathman</title> |
| 5 | + |
| 6 | + <indexterm zone="pathman"> |
| 7 | + <primary>pathman</primary> |
| 8 | + </indexterm> |
| 9 | + |
| 10 | + <para> |
| 11 | + The <filename>pathman</filename> module provides functions ... |
| 12 | + </para> |
| 13 | + |
| 14 | + <sect2> |
| 15 | + <title>Pathman Concepts</title> |
| 16 | + |
| 17 | + <para> |
| 18 | + ... |
| 19 | + </para> |
| 20 | + </sect2> |
| 21 | + |
| 22 | + <sect2> |
| 23 | + <title>Functions</title> |
| 24 | + |
| 25 | + <para> |
| 26 | + The functions provided by the <filename>pathman</filename> module |
| 27 | + are shown in <xref linkend="pathman-func-table">. |
| 28 | + </para> |
| 29 | + |
| 30 | + <table id="pathman-func-table"> |
| 31 | + <title><filename>pathman</filename> Functions</title> |
| 32 | + <tgroup cols="3"> |
| 33 | + <thead> |
| 34 | + <row> |
| 35 | + <entry>Function</entry> |
| 36 | + <entry>Description</entry> |
| 37 | + </row> |
| 38 | + </thead> |
| 39 | + |
| 40 | + <tbody> |
| 41 | + <row> |
| 42 | + <entry><function>create_hash_partitions(text, text, integer)</function><indexterm><primary>create_hash_partitions</primary></indexterm></entry> |
| 43 | + <entry> |
| 44 | + Creates child partitions for HASH partitioning and trigger on insert. Arguments specifies parent relation name, attribute name and number of desired partitions. |
| 45 | + </entry> |
| 46 | + </row> |
| 47 | + |
| 48 | + <row> |
| 49 | + <entry><function>create_range_partitions(text, text, anyelement, anyelement, integer)</function><indexterm><primary>create_range_partitions</primary></indexterm></entry> |
| 50 | + <entry> |
| 51 | + Creates child partitions for RANGE partitioning and trigger on insert. Arguments specifies parent relation name, attribute name, start value, interval and number of premade partitions. |
| 52 | + </entry> |
| 53 | + </row> |
| 54 | + |
| 55 | + <row> |
| 56 | + <entry><function>create_range_partitions(text, text, anyelement, interval, integer)</function><indexterm><primary>create_range_partitions</primary></indexterm></entry> |
| 57 | + <entry> |
| 58 | + Same as above but suited for date or timestamp based partitioning. |
| 59 | + </entry> |
| 60 | + </row> |
| 61 | + |
| 62 | + <row> |
| 63 | + <entry><function>partition_data(text)</function><indexterm><primary>partition_data</primary></indexterm></entry> |
| 64 | + <entry> |
| 65 | + Copy data from parent table to partitions. |
| 66 | + </entry> |
| 67 | + </row> |
| 68 | + |
| 69 | + <row> |
| 70 | + <entry><function>disable_partitioning(text)</function><indexterm><primary>disable_partitioning</primary></indexterm></entry> |
| 71 | + <entry> |
| 72 | + Disables pathman for specified relation and removes the trigger. |
| 73 | + </entry> |
| 74 | + </row> |
| 75 | + |
| 76 | + <row> |
| 77 | + <entry><function>split_range_partition(text, anyelement)</function><indexterm><primary>split_range_partition</primary></indexterm></entry> |
| 78 | + <entry> |
| 79 | + Splits the RANGE partition by the specified value. |
| 80 | + </entry> |
| 81 | + </row> |
| 82 | + |
| 83 | + <row> |
| 84 | + <entry><function>split_range_partition(text, anyelement)</function><indexterm><primary>split_range_partition</primary></indexterm></entry> |
| 85 | + <entry> |
| 86 | + Merge two adjacent RANGE partitions. |
| 87 | + </entry> |
| 88 | + </row> |
| 89 | + |
| 90 | + </tbody> |
| 91 | + </tgroup> |
| 92 | + </table> |
| 93 | + </sect2> |
| 94 | + |
| 95 | + <sect2> |
| 96 | + <title>Examples</title> |
| 97 | + |
| 98 | + <para> |
| 99 | + ... |
| 100 | +<programlisting> |
| 101 | +CREATE TABLE words AS SELECT word FROM |
| 102 | + ts_stat('SELECT to_tsvector(''simple'', bodytext) FROM documents'); |
| 103 | +</programlisting> |
| 104 | + </para> |
| 105 | + |
| 106 | + <note> |
| 107 | + <para> |
| 108 | + ... |
| 109 | + </para> |
| 110 | + </note> |
| 111 | + </sect2> |
| 112 | + |
| 113 | + |
| 114 | + <sect2> |
| 115 | + <title>Authors</title> |
| 116 | + |
| 117 | + <para> |
| 118 | + Ildar Musin <email>i.musin@postgrespro.ru</email>, Moscow, Postgres Professional Ltd., Russia |
| 119 | + </para> |
| 120 | + <para> |
| 121 | + This module is sponsored by Postgres Professional Ltd., Moscow, Russia. |
| 122 | + </para> |
| 123 | + </sect2> |
| 124 | + |
| 125 | +</sect1> |