You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -66,17 +66,32 @@ create_range_partitions(
66
66
start_value ANYELEMENT,
67
67
interval ANYELEMENT,
68
68
premake INTEGER)
69
-
```
70
-
Performs RANGE partitioning for`relation` by partitioning key`attribute`.`start_value` argument specifies initial value,`interval` sets the range of values in a single partition,`premake` is the number of premade partitions (the only one partition will be created if`premake` is 0).
71
-
```
69
+
72
70
create_range_partitions(
73
71
relation TEXT,
74
72
attribute TEXT,
75
73
start_value ANYELEMENT,
76
74
interval INTERVAL,
77
75
premake INTEGER)
78
76
```
79
-
Same as above but suitable for`DATE` and`TIMESTAMP` partitioning keys.
77
+
Performs RANGE partitioning for`relation` by partitioning key`attribute`.`start_value` argument specifies initial value,`interval` sets the range of values in a single partition,`premake` is the number of premade partitions.
78
+
79
+
```
80
+
create_partitions_from_range(
81
+
relation TEXT,
82
+
attribute TEXT,
83
+
start_value ANYELEMENT,
84
+
end_value ANYELEMENT,
85
+
interval ANYELEMENT)
86
+
87
+
create_partitions_from_range(
88
+
relation TEXT,
89
+
attribute TEXT,
90
+
start_value ANYELEMENT,
91
+
end_value ANYELEMENT,
92
+
interval INTERVAL)
93
+
```
94
+
Performs RANGE-partitioning from specified range for`relation` by partitioning key`attribute`.
80
95
81
96
###Utilities
82
97
```
@@ -162,9 +177,9 @@ INSERT INTO range_rel (dt) SELECT g FROM generate_series('2010-01-01'::date, '20
162
177
```
163
178
Run create_range_partitions() function to create partitions so that each partition would contain data for one month:
Copy file name to clipboardExpand all lines: README.rus.md
+20-6Lines changed: 20 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -67,17 +67,32 @@ create_range_partitions(
67
67
start_value ANYELEMENT,
68
68
interval ANYELEMENT,
69
69
premake INTEGER)
70
-
```
71
-
Выполняет RANGE-секционирование таблицы`relation` по полю`attribute`. Аргумент`start_value` задает начальное значение,`interval` -- диапазон значений внутри одной секции,`premake` -- количество заранее создаваемых секций (если 0, то будет создана единственная секция).
72
-
```
70
+
73
71
create_range_partitions(
74
72
relation TEXT,
75
73
attribute TEXT,
76
74
start_value ANYELEMENT,
77
75
interval INTERVAL,
78
76
premake INTEGER)
79
77
```
80
-
Аналогично предыдущей с тем лишь отличием, что данная функция предназначена для секционирования по полю типа`DATE` или`TIMESTAMP`.
78
+
Выполняет RANGE-секционирование таблицы`relation` по полю`attribute`. Аргумент`start_value` задает начальное значение,`interval` -- диапазон значений внутри одной секции,`premake` -- количество заранее создаваемых секций.
79
+
80
+
```
81
+
create_partitions_from_range(
82
+
relation TEXT,
83
+
attribute TEXT,
84
+
start_value ANYELEMENT,
85
+
end_value ANYELEMENT,
86
+
interval ANYELEMENT)
87
+
88
+
create_partitions_from_range(
89
+
relation TEXT,
90
+
attribute TEXT,
91
+
start_value ANYELEMENT,
92
+
end_value ANYELEMENT,
93
+
interval INTERVAL)
94
+
```
95
+
Выполняет RANGE-секционирование для заданного диапазона таблицы`relation` по полю`attribute`.
81
96
82
97
###Утилиты
83
98
```
@@ -164,9 +179,8 @@ INSERT INTO range_rel (dt) SELECT g FROM generate_series('2010-01-01'::date, '20
164
179
```
165
180
Разобьем таблицу на 60 секций так, чтобы каждая секция содержала данные за один месяц: