데이터가 default에 있을때 partition추가
--파티션 대상 테이블
select * from dba.partition_config
--파티션 추가 방법
1. default 파티션의 내용을 tmp 테이블에 백업
--확인
select * from bimart.tb_trade_daily_1_prt_pdefault;
-- 임시테이블에 담기
create table public.tmp_tb_trade_daily
as select * from bimart.tb_trade_daily_1_prt_pdefault
2. default 파티션 drop
alter table bimart.tb_trade_daily drop default partition;
3. 신규파티션 추가
##3월 일일
Partition ADD##
alter table bimart.tb_trade_daily add partition p20120701 START (timestamp '2012-07-01
00:00:00') END (timestamp '2012-08-01 00:00:00');
4. tmp테이블 내용 복원
insert into bimart.tb_trade_daily
select * from public.tmp_tb_trade_daily
5. default 파티션 추가
alter table bimart.tb_trade_daily add default partition pdefault;