|
1 | 1 | -- TODO - add test for PR#650 - not creating partitions that aren't being retained anyway |
2 | 2 | -- - add test to ensure sub partitioning preserves default table settings and not null enforcement |
| 3 | +-- - add test for constraint exclusion with integer-based partitioning |
3 | 4 |
|
4 | 5 | -- TODO PRESERVE PRIVILEGES |
5 | 6 | DROP FUNCTION @ [email protected]_parent( text, text, text, text, text, int, text, boolean, text, text[], text, boolean, text); |
@@ -2383,7 +2384,7 @@ IF p_default_table THEN |
2383 | 2384 | */ |
2384 | 2385 |
|
2385 | 2386 | -- Same INCLUDING list is used in create_partition_*(). INDEXES is handled when partition is attached if it's supported. |
2386 | | - v_sql := v_sql || format(' TABLE %I.%I (LIKE %I.%I INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING STORAGE INCLUDING COMMENTS INCLUDING GENERATED)' |
| 2387 | + v_sql := v_sql || format(' TABLE %I.%I (LIKE %I.%I INCLUDING COMMENTS INCLUDING COMPRESSION INCLUDING CONSTRAINTS INCLUDING DEFAULTS INCLUDING GENERATED INCLUDING STATISTICS INCLUDING STORAGE)' |
2387 | 2388 | , v_parent_schema, v_default_partition, v_parent_schema, v_parent_tablename); |
2388 | 2389 | IF v_parent_tablespace IS NOT NULL THEN |
2389 | 2390 | v_sql := format('%s TABLESPACE %I ', v_sql, v_parent_tablespace); |
@@ -2794,9 +2795,8 @@ FOREACH v_id IN ARRAY p_partition_ids LOOP |
2794 | 2795 | v_step_id := add_step(v_job_id, 'Creating new partition '||v_partition_name||' with interval from '||v_id||' to '||(v_id + v_partition_interval)-1); |
2795 | 2796 | END IF; |
2796 | 2797 |
|
2797 | | - -- Close parentheses on LIKE are below due to differing requirements of subpartitioning |
2798 | 2798 | -- Same INCLUDING list is used in create_parent() |
2799 | | - v_sql := format('CREATE TABLE %I.%I (LIKE %I.%I INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING STORAGE INCLUDING COMMENTS INCLUDING GENERATED) ' |
| 2799 | + v_sql := format('CREATE TABLE %I.%I (LIKE %I.%I INCLUDING COMMENTS INCLUDING COMPRESSION INCLUDING CONSTRAINTS INCLUDING DEFAULTS INCLUDING GENERATED INCLUDING STATISTICS INCLUDING STORAGE) ' |
2800 | 2800 | , v_parent_schema |
2801 | 2801 | , v_partition_name |
2802 | 2802 | , v_parent_schema |
@@ -3171,7 +3171,7 @@ FOREACH v_time IN ARRAY p_partition_times LOOP |
3171 | 3171 | */ |
3172 | 3172 |
|
3173 | 3173 | -- Same INCLUDING list is used in create_parent() |
3174 | | - v_sql := v_sql || format(' TABLE %I.%I (LIKE %I.%I INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING STORAGE INCLUDING COMMENTS INCLUDING GENERATED) ' |
| 3174 | + v_sql := v_sql || format(' TABLE %I.%I (LIKE %I.%I INCLUDING COMMENTS INCLUDING COMPRESSION INCLUDING CONSTRAINTS INCLUDING DEFAULTS INCLUDING GENERATED INCLUDING STATISTICS INCLUDING STORAGE) ' |
3175 | 3175 | , v_parent_schema |
3176 | 3176 | , v_partition_name |
3177 | 3177 | , v_parent_schema |
|
0 commit comments