I have a couple hundred tables t1,t2,...tN that I are free standing. I would like to make them members of a partitioned table t, via inheritence. All the tables have the same layout/format. The method that I am currently using is as follows:
create table x1(check(part=1)) inherits(t); insert into x1 select * from t1; drop table t1; alter table x1 rename to t1;
It works fine, except that it is quite slow. Is there a way of just updating "pg_inherits" and some other table such that postgres is happy without actually doing the inserts?
Thanks.
Есть вопросы? Напишите нам!
✖
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера