Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

Поиск
Список
Период
Сортировка
Искать
От
Dmitry Koval
Тема
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Дата
Msg-id
56e0000c-6b39-44ce-90b4-d3c3062e408c@postgrespro.ru
Ответ на
Список
Дерево обсуждения
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Daniel Gustafsson <daniel@yesql.se>
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Dmitry Koval <d.koval@postgrespro.ru>
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Alexander Korotkov <aekorotkov@gmail.com>
Hi!

> Please, find a my version of this fix attached.

Is it possible to make a small addition to the file v6-0001 ... .patch 
(see attachment)?

Most important:
1) Line 19:

+ mergePartName = makeRangeVar(cmd->name->schemaname, tmpRelName, -1);

(temporary table should use the same schema as the partition);

2) Lines 116-123:

+RESET search_path;
+
+-- Can't merge persistent partitions into a temporary partition
+ALTER TABLE t MERGE PARTITIONS (tp_0_1, tp_1_2) INTO pg_temp.tp_0_2;
+
+SET search_path = pg_temp, public;

(Alexandr Lakhin's test for using of pg_temp schema explicitly).


The rest of the changes in v6_afterfix.diff are not very important and 
can be ignored.

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
В списке pgsql-hackers по дате отправления
От: Alexander Lakhin
Дата:
От: Давыдов Виталий
Дата:
FAQ