github.com/tuhaihe/gpbackup@v1.0.3/end_to_end/resources/gpdb4_compatible_objects_after_gpdb7.sql (about)

     1  CREATE PROCEDURAL LANGUAGE plpython3u;
     2  
     3  
     4  CREATE TABLE part_with_ext (
     5      id integer,
     6      year integer,
     7      qtr integer,
     8      day integer,
     9      region text
    10  ) DISTRIBUTED BY (id) PARTITION BY RANGE(year)
    11            (
    12            PARTITION yr_2 START (2011) END (2012) EVERY (1) WITH (tablename='sales_1_prt_yr_2', appendonly=false ),
    13            PARTITION yr_3 START (2012) END (2013) EVERY (1) WITH (tablename='sales_1_prt_yr_3', appendonly=false ),
    14            PARTITION yr_4 START (2013) END (2014) EVERY (1) WITH (tablename='sales_1_prt_yr_4', appendonly=false )
    15            );
    16  -- TODO: Fix dependency issues with external leaf partitions for GPDB 7
    17  --ALTER TABLE part_with_ext ATTACH PARTITION sales_1_prt_yr_1_external_partition__ FOR VALUES FROM ('2010') TO ('2011');
    18  
    19  
    20  CREATE TRIGGER sync_trigger_table1
    21      AFTER INSERT ON trigger_table1
    22      FOR EACH ROW
    23      EXECUTE PROCEDURE "RI_FKey_check_ins"();