You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2026/01/27 15:23:14 UTC

(cloudberry) branch cbdb-postgres-merge updated: Remove out file in expect/uao

This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this push:
     new 38f76ea37d8 Remove out file in expect/uao
38f76ea37d8 is described below

commit 38f76ea37d81bcc2c9daf1b3c7c00287c34c8aa9
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Tue Jan 27 23:22:59 2026 +0800

    Remove out file in expect/uao
---
 src/test/regress/expected/uao_ddl/.gitignore       |    1 +
 .../expected/uao_ddl/GENERATE_ROW_AND_COLUMN_FILES |    0
 .../expected/uao_ddl/alter_ao_part_exch.out        |  157 --
 .../expected/uao_ddl/alter_ao_part_tables.out      |  459 -----
 .../alter_ao_part_tables_splitpartition.out        |  140 --
 .../expected/uao_ddl/alter_ao_table_col_ddl.out    |  148 --
 .../uao_ddl/alter_ao_table_col_ddl_optimizer.out   |  148 --
 .../expected/uao_ddl/alter_ao_table_constraint.out |  168 --
 .../expected/uao_ddl/alter_ao_table_index.out      |  113 --
 .../expected/uao_ddl/alter_ao_table_owner.out      |   62 -
 .../expected/uao_ddl/alter_ao_table_setdefault.out |  112 --
 .../expected/uao_ddl/alter_ao_table_setstorage.out |  127 --
 .../expected/uao_ddl/alter_ao_table_statistics.out |   50 -
 .../regress/expected/uao_ddl/alter_drop_allcol.out |   98 -
 .../regress/expected/uao_ddl/alter_rollback.out    |   37 -
 .../expected/uao_ddl/alter_table_reloptions.out    |  201 --
 .../uao_ddl/analyze_ao_table_every_dml.out         |  118 --
 src/test/regress/expected/uao_ddl/blocksize.out    |  145 --
 src/test/regress/expected/uao_ddl/compresstype.out |  146 --
 .../expected/uao_ddl/create_ao_table_500cols.out   |  622 -------
 .../regress/expected/uao_ddl/create_ao_tables.out  |  325 ----
 src/test/regress/expected/uao_ddl/cursor.out       |   70 -
 .../expected/uao_ddl/spgist_over_ao_table.out      |   36 -
 .../uao_ddl/temp_on_commit_delete_rows.out         |   98 -
 src/test/regress/expected/uao_ddl/uao_allalter.out |  228 ---
 src/test/regress/expected/uao_dml/.gitignore       |    1 +
 .../expected/uao_dml/GENERATE_ROW_AND_COLUMN_FILES |    0
 .../expected/uao_dml/ao_unique_index_build.out     |  152 --
 src/test/regress/expected/uao_dml/uao_dml.out      | 1944 --------------------
 .../regress/expected/uao_dml/uao_dml_cursor.out    |  429 -----
 .../regress/expected/uao_dml/uao_dml_select.out    | 1444 ---------------
 .../uao_dml/uao_dml_unique_index_delete.out        |  136 --
 .../uao_dml/uao_dml_unique_index_update.out        |  246 ---
 33 files changed, 2 insertions(+), 8159 deletions(-)

diff --git a/src/test/regress/expected/uao_ddl/.gitignore b/src/test/regress/expected/uao_ddl/.gitignore
new file mode 100644
index 00000000000..f47cb2045f1
--- /dev/null
+++ b/src/test/regress/expected/uao_ddl/.gitignore
@@ -0,0 +1 @@
+*.out
diff --git a/src/test/regress/expected/uao_ddl/GENERATE_ROW_AND_COLUMN_FILES b/src/test/regress/expected/uao_ddl/GENERATE_ROW_AND_COLUMN_FILES
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_part_exch.out b/src/test/regress/expected/uao_ddl/alter_ao_part_exch.out
deleted file mode 100644
index 41ec1bef5bb..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_part_exch.out
+++ /dev/null
@@ -1,157 +0,0 @@
-create schema alter_ao_part_exch_@amname@;
-set search_path="$user",alter_ao_part_exch_@amname@,public;
-SET default_table_access_method=@amname@;
---- Define a multi-leveled partitioned table with partitions of
---- different types (ao, aoco, heap). Then, exchange these partitions
---- with other tables.
-BEGIN;
-Create table ao_part
- (
- col1 bigint, col2 date, col3 text, col4 int)
- distributed randomly partition by range(col2)
- subpartition by list (col3)
- subpartition template (
-   default subpartition subothers,
-   subpartition sub1 values ('ao_row'),
-   subpartition sub2 values ('heap') with (appendonly=false),
-   subpartition sub3 values ('ao_col') with (appendonly=true, orientation=column))
- (default partition others, start(date '2008-01-01') end(date '2008-04-30') every(interval '1 month'));
-insert into ao_part(col1, col2, col3) values
- (1, '2008-01-02', 'ao_row'), (1, '2008-01-02', 'heap'), (1, '2008-01-02', 'ao_col'),
- (1, '2008-02-03', 'ao_row'), (1, '2008-02-03', 'heap'), (1, '2008-02-03', 'ao_col'),
- (1, '2008-03-04', 'ao_row'), (1, '2008-03-04', 'heap'), (1, '2008-03-04', 'ao_col'),
- (1, '2008-04-15', 'ao_row'), (1, '2008-04-15', 'heap'), (1, '2008-04-05', 'ao_col'),
- (1, '2008-05-06', 'ao_row');
-analyze ao_part;
-select count(*) FROM pg_appendonly WHERE visimapidxid is not NULL AND
-visimapidxid is not NULL AND relid in (SELECT c.oid FROM pg_class c
-inner join pg_namespace n ON c.relnamespace = n.oid and c.relname like
-'ao_part%' and n.nspname = 'alter_ao_part_exch_@amname@');
- count 
--------
-    15
-(1 row)
-
-\t
-select relkind, amname
-from pg_class c inner join
-     pg_namespace n on c.relnamespace = n.oid and relname like 'ao_part_1_prt_5_2_prt_subothers%'
-                       and n.nspname = 'alter_ao_part_exch_@amname@'
-left join pg_am on pg_am.oid = relam;
- r       | @amname@
-
-\t
---- Exchange partitions
-create table exh_ao_ao (like ao_part) distributed randomly;
-insert into exh_ao_ao values (1, '2008-02-20', 'ao_row'), (2, '2008-02-21', 'ao_row');
-Alter table ao_part alter partition for ('2008-02-01') exchange partition for ('ao_row') with table exh_ao_ao;
-update ao_part set col4 = col1 where col2 in ('2008-02-20', '2008-02-21');
-create table exh_ao_co (like ao_part) with (appendonly=true, orientation=column) distributed randomly;
-insert into exh_ao_co values (1, '2008-03-20', 'ao_row'),  (2, '2008-03-21', 'ao_row');
-Alter table ao_part alter partition for ('2008-03-01') exchange partition for ('ao_row') with table exh_ao_co;
-delete from ao_part where col2 = '2008-03-20';
-create table exh_ao_heap (like ao_part) distributed randomly;
-insert into exh_ao_heap values (1, '2008-04-20', 'ao_row'),  (2, '2008-04-21', 'ao_row');
-Alter table ao_part alter partition for ('2008-04-01') exchange partition for ('ao_row') with table exh_ao_heap;
-update ao_part set col4 = -col1 where col2 in ('2008-04-20', '2008-04-21');
-select count(*) from ao_part where col4 < 0;
- count 
--------
-     2
-(1 row)
-
-create table exh_heap_ao (like ao_part) distributed randomly;
-insert into exh_heap_ao values (1, '2008-01-20', 'heap'), (2, '2008-01-21', 'heap');
-Alter table ao_part alter partition for ('2008-01-01') exchange partition for ('heap') with table exh_heap_ao;
-update ao_part set col4 = col1 where col2 in ('2008-01-20', '2008-01-21');
-select * from ao_part where col2 in ('2008-01-20', '2008-01-21') and col3 = 'heap';
- col1 |    col2    | col3 | col4 
-------+------------+------+------
-    1 | 01-20-2008 | heap |    1
-    2 | 01-21-2008 | heap |    2
-(2 rows)
-
-create table exh_co_ao (like ao_part) distributed randomly;
-insert into exh_co_ao values (1, '2008-01-20', 'ao_col'), (2, '2008-01-21', 'ao_col');
-Alter table ao_part alter partition for ('2008-01-01') exchange partition for ('ao_col') with table exh_co_ao;
-update ao_part set col4 = -col1 where col4 is null;
-select count(*) from ao_part where col4 is not null;
- count 
--------
-    17
-(1 row)
-
-\t
-select relkind, amname
-from pg_class c inner join
-     pg_namespace n on c.relnamespace = n.oid and relname like 'ao_part_1_prt_5_2_prt_subothers%'
-                       and n.nspname = 'alter_ao_part_exch_@amname@'
-left join pg_am on pg_am.oid = relam;
- r       | @amname@
-
-\t
-select count(*) from exh_ao_ao;
- count 
--------
-     1
-(1 row)
-
-select count(*) from exh_ao_co;
- count 
--------
-     1
-(1 row)
-
-select count(*) from exh_ao_heap;
- count 
--------
-     1
-(1 row)
-
-select count(*) from exh_heap_ao;
- count 
--------
-     1
-(1 row)
-
-select count(*) from exh_co_ao;
- count 
--------
-     1
-(1 row)
-
---- This touches 5 rows, so invisible row count increases by 5
-Update ao_part set col4=2 where col2='2008-01-20' OR col2='2008-02-20'
- OR col2='2008-03-20' OR col2='2008-04-20';
-select count(*) as visible_tuples from ao_part;
- visible_tuples 
-----------------
-             17
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) as all_tuples from ao_part;
- all_tuples 
-------------
-         39
-(1 row)
-
-set gp_select_invisible = false;
---- This touches 5 rows
-Delete from ao_part where col2='2008-01-21' OR col2='2008-02-21'
- OR col2='2008-03-21' OR col2='2008-04-21';
-select count(*) as visible_tuples from ao_part;
- visible_tuples 
-----------------
-             12
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) as all_tuples from ao_part;
- all_tuples 
-------------
-         39
-(1 row)
-
-set gp_select_invisible = false;
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_part_tables.out b/src/test/regress/expected/uao_ddl/alter_ao_part_tables.out
deleted file mode 100644
index 2e01a2fdb50..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_part_tables.out
+++ /dev/null
@@ -1,459 +0,0 @@
-create schema alter_ao_part_tables_@amname@;
-set search_path="$user",alter_ao_part_tables_@amname@,public;
-SET default_table_access_method=@amname@;
-BEGIN;
-Create table sto_alt_ao_part(a int, b int, c int, d int)
- distributed by (a)
- partition by range(b) subpartition by range(c)
- subpartition template
-  (default subpartition subothers, start (1) end(7) every (4))
- (default partition others, start(1) end(5) every(3));
-Insert into sto_alt_ao_part values(1,generate_series(1,8),3,4);
-Insert into sto_alt_ao_part values(2,3,generate_series(1,9),3);
-select count(*) from sto_alt_ao_part;
- count 
--------
-    17
-(1 row)
-
-Create table sto_altap2 (a int, b int, c varchar(20))
- distributed by (a) partition by range(a)
- (default partition others,
-  partition p1 start(1) end(5),
-  partition p2 start(5) end(10),
-  partition p3 start(10) end(15));
-Insert into sto_altap2 values(generate_series(1,20), 12, 'A');
-select count(*) from sto_altap2;
- count 
--------
-    20
-(1 row)
-
--- Append optimized tables should not have a valid relfrozenxid in
--- pg_class because per-tuple MVCC information (xmin/xmax) is not
--- present.
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname like 'sto_altap2%'
-       and n.nspname = 'alter_ao_part_tables_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-            0
-            0
-(5 rows)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname like 'sto_altap2%'
-       and n.nspname = 'alter_ao_part_tables_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-(15 rows)
-
-create table sto_altap3 (col1 bigint, col2 date, col3 text, col4 int)
- distributed randomly
- partition by range(col2) subpartition by list (col3)
- subpartition template (
-  default subpartition subothers,
-  subpartition sub1 values ('one'),
-  subpartition sub2 values ('two'))
- (default partition others, start(date '2008-01-01') end(date '2008-04-30')
-  every(interval '1 month'));
-insert into sto_altap3(col1, col2, col3) values
- (1, '2008-01-02', 'one'), (2, '2008-01-02', 'two'), (3, '2008-01-02', 'three'),
- (1, '2008-02-03', 'two'), (2, '2008-02-03', 'one'), (3, '2008-02-03', 'three'),
- (1, '2008-03-04', 'three'), (1, '2008-04-04', 'one'), (2, '2008-03-04', 'two');
-insert into sto_altap3(col1, col2, col3) values
- (1, '2008-04-05', 'one'), (2, '2008-04-05', 'two'), (3, '2008-04-05', 'three'),
- (1, '2008-05-06', 'one'), (2, '2008-05-06', 'two'), (3, '2008-05-06', 'three');
-select count(*) from sto_altap3;
- count 
--------
-    15
-(1 row)
-
--- Alter table rename default partition
-Alter table sto_alt_ao_part rename default partition to new_others;
-select * from pg_partition_tree('sto_alt_ao_part');
-                      relid                       |           parentrelid            | isleaf | level 
---------------------------------------------------+----------------------------------+--------+-------
- sto_alt_ao_part                                  |                                  | f      |     0
- sto_alt_ao_part_1_prt_new_others                 | sto_alt_ao_part                  | f      |     1
- sto_alt_ao_part_1_prt_2                          | sto_alt_ao_part                  | f      |     1
- sto_alt_ao_part_1_prt_3                          | sto_alt_ao_part                  | f      |     1
- sto_alt_ao_part_1_prt_new_others_2_prt_subothers | sto_alt_ao_part_1_prt_new_others | t      |     2
- sto_alt_ao_part_1_prt_new_others_2_prt_2         | sto_alt_ao_part_1_prt_new_others | t      |     2
- sto_alt_ao_part_1_prt_new_others_2_prt_3         | sto_alt_ao_part_1_prt_new_others | t      |     2
- sto_alt_ao_part_1_prt_2_2_prt_subothers          | sto_alt_ao_part_1_prt_2          | t      |     2
- sto_alt_ao_part_1_prt_2_2_prt_2                  | sto_alt_ao_part_1_prt_2          | t      |     2
- sto_alt_ao_part_1_prt_2_2_prt_3                  | sto_alt_ao_part_1_prt_2          | t      |     2
- sto_alt_ao_part_1_prt_3_2_prt_subothers          | sto_alt_ao_part_1_prt_3          | t      |     2
- sto_alt_ao_part_1_prt_3_2_prt_2                  | sto_alt_ao_part_1_prt_3          | t      |     2
- sto_alt_ao_part_1_prt_3_2_prt_3                  | sto_alt_ao_part_1_prt_3          | t      |     2
-(13 rows)
-
-Insert into sto_alt_ao_part values(1,10,3,4);
-Update sto_alt_ao_part set d = -a where b = 10;
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  1 | 3 |  4
- 1 |  2 | 3 |  4
- 2 |  3 | 1 |  3
- 2 |  3 | 2 |  3
- 1 |  3 | 3 |  4
- 2 |  3 | 3 |  3
- 2 |  3 | 4 |  3
- 2 |  3 | 5 |  3
- 2 |  3 | 6 |  3
- 2 |  3 | 7 |  3
- 2 |  3 | 8 |  3
- 2 |  3 | 9 |  3
- 1 |  4 | 3 |  4
- 1 |  5 | 3 |  4
- 1 |  6 | 3 |  4
- 1 |  7 | 3 |  4
- 1 |  8 | 3 |  4
- 1 | 10 | 3 | -1
-(18 rows)
-
--- Alter table rename partition
-Alter table sto_altap3 RENAME PARTITION FOR ('2008-01-01') TO jan08;
-select * from pg_partition_tree('sto_altap3');
-                  relid                  |       parentrelid       | isleaf | level 
------------------------------------------+-------------------------+--------+-------
- sto_altap3                              |                         | f      |     0
- sto_altap3_1_prt_others                 | sto_altap3              | f      |     1
- sto_altap3_1_prt_jan08                  | sto_altap3              | f      |     1
- sto_altap3_1_prt_3                      | sto_altap3              | f      |     1
- sto_altap3_1_prt_4                      | sto_altap3              | f      |     1
- sto_altap3_1_prt_5                      | sto_altap3              | f      |     1
- sto_altap3_1_prt_others_2_prt_subothers | sto_altap3_1_prt_others | t      |     2
- sto_altap3_1_prt_others_2_prt_sub1      | sto_altap3_1_prt_others | t      |     2
- sto_altap3_1_prt_others_2_prt_sub2      | sto_altap3_1_prt_others | t      |     2
- sto_altap3_1_prt_jan08_2_prt_subothers  | sto_altap3_1_prt_jan08  | t      |     2
- sto_altap3_1_prt_jan08_2_prt_sub1       | sto_altap3_1_prt_jan08  | t      |     2
- sto_altap3_1_prt_jan08_2_prt_sub2       | sto_altap3_1_prt_jan08  | t      |     2
- sto_altap3_1_prt_3_2_prt_subothers      | sto_altap3_1_prt_3      | t      |     2
- sto_altap3_1_prt_3_2_prt_sub1           | sto_altap3_1_prt_3      | t      |     2
- sto_altap3_1_prt_3_2_prt_sub2           | sto_altap3_1_prt_3      | t      |     2
- sto_altap3_1_prt_4_2_prt_subothers      | sto_altap3_1_prt_4      | t      |     2
- sto_altap3_1_prt_4_2_prt_sub1           | sto_altap3_1_prt_4      | t      |     2
- sto_altap3_1_prt_4_2_prt_sub2           | sto_altap3_1_prt_4      | t      |     2
- sto_altap3_1_prt_5_2_prt_subothers      | sto_altap3_1_prt_5      | t      |     2
- sto_altap3_1_prt_5_2_prt_sub1           | sto_altap3_1_prt_5      | t      |     2
- sto_altap3_1_prt_5_2_prt_sub2           | sto_altap3_1_prt_5      | t      |     2
-(21 rows)
-
-Update sto_altap3 set col4 = 5 where col1 = 1;
-select count(*) from sto_altap3;
- count 
--------
-    15
-(1 row)
-
--- Alter table drop default partition
-Alter table sto_alt_ao_part drop default partition;
-Update sto_alt_ao_part set d = 5 where b = 4;
-select * from sto_alt_ao_part;
- a | b | c | d 
----+---+---+---
- 1 | 1 | 3 | 4
- 1 | 2 | 3 | 4
- 2 | 3 | 1 | 3
- 2 | 3 | 2 | 3
- 2 | 3 | 3 | 3
- 1 | 3 | 3 | 4
- 2 | 3 | 4 | 3
- 2 | 3 | 5 | 3
- 2 | 3 | 6 | 3
- 2 | 3 | 7 | 3
- 2 | 3 | 8 | 3
- 2 | 3 | 9 | 3
- 1 | 4 | 3 | 5
-(13 rows)
-
--- Alter table drop partition
-Alter table sto_alt_ao_part drop partition for (1);
-Update sto_alt_ao_part set d = 4 where b = 4;
-select * from sto_alt_ao_part;
- a | b | c | d 
----+---+---+---
- 1 | 4 | 3 | 4
-(1 row)
-
--- Alter table add heap partition
-Alter table sto_alt_ao_part add partition new_p start(6) end(8);
-Insert into sto_alt_ao_part values(1,7,3,4);
-Update sto_alt_ao_part set d = -a where b = 4 or b = 7;
-select * from sto_alt_ao_part;
- a | b | c | d  
----+---+---+----
- 1 | 4 | 3 | -1
- 1 | 7 | 3 | -1
-(2 rows)
-
--- Alter table add ao partition
-Alter table sto_alt_ao_part add partition p1 start(9) end(13);
-Insert into sto_alt_ao_part values(1,10,3,4);
-Update sto_alt_ao_part set d = -a where b = 10;
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 3 | -1
- 1 |  7 | 3 | -1
- 1 | 10 | 3 | -1
-(3 rows)
-
--- Alter table add co partition
-Alter table sto_alt_ao_part add partition p2 start(14) end(17)
-with(appendonly=true, orientation=column);
-Insert into sto_alt_ao_part values(1,15,3,4);
-Update sto_alt_ao_part set d = -a where b = 15;
-select * from sto_alt_ao_part order by b,c ;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 3 | -1
- 1 |  7 | 3 | -1
- 1 | 10 | 3 | -1
- 1 | 15 | 3 | -1
-(4 rows)
-
--- Alter table add default partition
-Alter table sto_alt_ao_part add default partition part_others;
-Insert into sto_alt_ao_part values(1,25,3,4);
-Update sto_alt_ao_part set d = -a where b = 25;
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 3 | -1
- 1 |  7 | 3 | -1
- 1 | 10 | 3 | -1
- 1 | 15 | 3 | -1
- 1 | 25 | 3 | -1
-(5 rows)
-
--- Alter table split partition
-Alter table sto_altap2 split partition p1 at(3) into
- (partition splitc, partition splitd);
-Update sto_altap2 set b = 5 where a = 1 or a = 4;
-select * from sto_altap2 order by a;
- a  | b  | c 
-----+----+---
-  1 |  5 | A
-  2 | 12 | A
-  3 | 12 | A
-  4 |  5 | A
-  5 | 12 | A
-  6 | 12 | A
-  7 | 12 | A
-  8 | 12 | A
-  9 | 12 | A
- 10 | 12 | A
- 11 | 12 | A
- 12 | 12 | A
- 13 | 12 | A
- 14 | 12 | A
- 15 | 12 | A
- 16 | 12 | A
- 17 | 12 | A
- 18 | 12 | A
- 19 | 12 | A
- 20 | 12 | A
-(20 rows)
-
-Alter table sto_alt_ao_part alter partition p1 split partition
- FOR (1) at(2) into (partition splita,partition splitb);
--- Update partitioning key
-Update sto_alt_ao_part set d = 0 where b = 10;
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 3 | -1
- 1 |  7 | 3 | -1
- 1 | 10 | 3 |  0
- 1 | 15 | 3 | -1
- 1 | 25 | 3 | -1
-(5 rows)
-
--- Alter table split default partition
-Alter table sto_altap2 split default partition
- start(15) end(17) into (partition p1, partition others);
-Update sto_altap2 set b = 4 where a = 15 or a = 16;
-select * from sto_altap2 order by a;
- a  | b  | c 
-----+----+---
-  1 |  5 | A
-  2 | 12 | A
-  3 | 12 | A
-  4 |  5 | A
-  5 | 12 | A
-  6 | 12 | A
-  7 | 12 | A
-  8 | 12 | A
-  9 | 12 | A
- 10 | 12 | A
- 11 | 12 | A
- 12 | 12 | A
- 13 | 12 | A
- 14 | 12 | A
- 15 |  4 | A
- 16 |  4 | A
- 17 | 12 | A
- 18 | 12 | A
- 19 | 12 | A
- 20 | 12 | A
-(20 rows)
-
--- Truncate a partitioned table
-Truncate table sto_altap2;
--- relfrozenxid should remain invalid after rewrite
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname like 'sto_altap2%'
-       and n.nspname = 'alter_ao_part_tables_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-(7 rows)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname like 'sto_altap2%'
-       and n.nspname = 'alter_ao_part_tables_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-            0
-(21 rows)
-
-select * from sto_altap2;
- a | b | c 
----+---+---
-(0 rows)
-
-Insert into sto_altap2 values(generate_series(1,20), 12, 'A');
-Update sto_altap2 set b = 4 where a = 15 or a = 16;
-select count(*) as visible_tuples from sto_altap2;
- visible_tuples 
-----------------
-             20
-(1 row)
-
-set gp_select_invisible=true;
-select count(*) as all_tuples from sto_altap2;
- all_tuples 
-------------
-         22
-(1 row)
-
-set gp_select_invisible=false;
--- Check that visimaps were created properly
-select distinct a.visimaprelid is not NULL, a.visimapidxid is not NULL
- from pg_appendonly a inner join pg_class c on a.relid = c.oid and
- c.relname like 'sto_alt%';
- ?column? | ?column? 
-----------+----------
- t        | t
-(1 row)
-
--- Drop partition table, check pg_appendonly
-drop table sto_altap2;
-select distinct a.visimaprelid is NULL, a.visimapidxid is NULL
- from pg_appendonly a inner join pg_class c on a.relid = c.oid and
- c.relname like 'sto_altap2%';
- ?column? | ?column? 
-----------+----------
-(0 rows)
-
--- Validate that the state needed by appendoptimized AM is correctly
--- initialized when the query involves partitioned tables with a
--- subplan.
-insert into sto_alt_ao_part values (1,4,4,4);
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 3 | -1
- 1 |  4 | 4 |  4
- 1 |  7 | 3 | -1
- 1 | 10 | 3 |  0
- 1 | 15 | 3 | -1
- 1 | 25 | 3 | -1
-(6 rows)
-
-update sto_alt_ao_part set c = c - 1 where b in (select c from sto_alt_ao_part_1_prt_3);
-select * from sto_alt_ao_part;
- a | b  | c | d  
----+----+---+----
- 1 |  4 | 2 | -1
- 1 |  4 | 3 |  4
- 1 |  7 | 3 | -1
- 1 | 10 | 3 |  0
- 1 | 15 | 3 | -1
- 1 | 25 | 3 | -1
-(6 rows)
-
-COMMIT;
--- Vacuum full to test compaction
-set gp_select_invisible=true;
-select count(*) as all_tuples_before_vacuum from sto_altap3;
- all_tuples_before_vacuum 
---------------------------
-                       21
-(1 row)
-
-set gp_select_invisible=false;
-vacuum full sto_altap3;
-select count(*) as visible_tuples_post_vacuum from sto_altap3;
- visible_tuples_post_vacuum 
-----------------------------
-                         15
-(1 row)
-
-set gp_select_invisible=true;
-select count(*) as all_tuples_post_vacuum from sto_altap3;
- all_tuples_post_vacuum 
-------------------------
-                     15
-(1 row)
-
-set gp_select_invisible=false;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_part_tables_splitpartition.out b/src/test/regress/expected/uao_ddl/alter_ao_part_tables_splitpartition.out
deleted file mode 100644
index 12fc4d72b46..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_part_tables_splitpartition.out
+++ /dev/null
@@ -1,140 +0,0 @@
-create schema alter_ao_part_tables_splitpartition_@amname@;
-set search_path="$user",alter_ao_part_tables_splitpartition_@amname@,public;
-SET default_table_access_method=@amname@;
-BEGIN;
-CREATE TABLE sto_alt_uao_part_splitpartition (
- id int, date date, amt decimal(10,2))
- DISTRIBUTED BY (id) PARTITION BY RANGE (date)
- (PARTITION sales_Jul13 START (date '2013-07-01') INCLUSIVE,
-  PARTITION sales_Aug13 START (date '2013-08-01') INCLUSIVE,
-  PARTITION sales_Sep13 START (date '2013-09-01') INCLUSIVE
-  END (date '2014-01-01') EXCLUSIVE);
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is
-not NULL AND visimapidxid is not NULL AND relid in (SELECT c.oid FROM
-pg_class c join pg_namespace n on c.relnamespace = n.oid and
- c.relname like 'sto_alt_uao_part_splitpartition%' and
- n.nspname = 'alter_ao_part_tables_splitpartition_@amname@');
- visimappresent 
-----------------
-              1
-              1
-              1
-(3 rows)
-
-Insert into sto_alt_uao_part_splitpartition values(1,'2013-07-05',19.20);
-Insert into sto_alt_uao_part_splitpartition values(2,'2013-08-15',10.20);
-Insert into sto_alt_uao_part_splitpartition values(3,'2013-09-09',14.20);
-Update sto_alt_uao_part_splitpartition set amt = amt + 20;
-select count(*) from sto_alt_uao_part_splitpartition;
- count 
--------
-     3
-(1 row)
-
--- Alter table add default partition
-Alter table sto_alt_uao_part_splitpartition
- add default partition part_others;
-select count(*) FROM pg_appendonly WHERE visimaprelid is not NULL AND
-visimapidxid is not NULL AND relid in (SELECT c.oid FROM pg_class c
- join pg_namespace n on c.relnamespace = n.oid and
- c.relname like 'sto_alt_uao_part_splitpartition%' and
- n.nspname = 'alter_ao_part_tables_splitpartition_@amname@');
- count 
--------
-     4
-(1 row)
-
-insert into sto_alt_uao_part_splitpartition
- select i, ('2013-'||i||'-11')::date, i from generate_series(1,12)i;
-delete from sto_alt_uao_part_splitpartition where date < '2013-07-10';
--- avoid warnings about missing stats with ORCA.
-ANALYZE sto_alt_uao_part_splitpartition;
-Insert into sto_alt_uao_part_splitpartition values
- (10,'2013-01-22',12.52), (11,'2013-02-22',13.53), (12,'2013-07-22',14.54);
-select * from sto_alt_uao_part_splitpartition;
- id |    date    |  amt  
-----+------------+-------
-  7 | 07-11-2013 |  7.00
-  2 | 08-15-2013 | 30.20
-  3 | 09-09-2013 | 34.20
- 12 | 07-22-2013 | 14.54
-  8 | 08-11-2013 |  8.00
-  9 | 09-11-2013 |  9.00
- 11 | 11-11-2013 | 11.00
- 10 | 10-11-2013 | 10.00
- 12 | 12-11-2013 | 12.00
- 11 | 02-22-2013 | 13.53
- 10 | 01-22-2013 | 12.52
-(11 rows)
-
--- Alter table split default partition
-Alter table sto_alt_uao_part_splitpartition split default partition
- start(date '2013-01-01') end(date '2013-03-01')
- into (partition p1, partition part_others);
-select count(*) FROM pg_appendonly WHERE visimaprelid is not NULL AND
-visimapidxid is not NULL AND relid in (SELECT c.oid FROM pg_class c
- join pg_namespace n on c.relnamespace = n.oid and
- c.relname like 'sto_alt_uao_part_splitpartition%' and
- n.nspname = 'alter_ao_part_tables_splitpartition_@amname@');
- count 
--------
-     5
-(1 row)
-
-update sto_alt_uao_part_splitpartition set amt = amt - 5;
-select * from sto_alt_uao_part_splitpartition;
- id |    date    |  amt  
-----+------------+-------
-  2 | 08-15-2013 | 25.20
-  7 | 07-11-2013 |  2.00
-  3 | 09-09-2013 | 29.20
- 12 | 07-22-2013 |  9.54
-  8 | 08-11-2013 |  3.00
-  9 | 09-11-2013 |  4.00
- 10 | 10-11-2013 |  5.00
- 11 | 11-11-2013 |  6.00
- 12 | 12-11-2013 |  7.00
- 10 | 01-22-2013 |  7.52
- 11 | 02-22-2013 |  8.53
-(11 rows)
-
-Update sto_alt_uao_part_splitpartition set amt = 20.5 where date='2013-02-22';
-set gp_select_invisible = true;
-select count(*) as all_tuples from sto_alt_uao_part_splitpartition;
- all_tuples 
-------------
-         27
-(1 row)
-
-set gp_select_invisible = false;
-Delete from sto_alt_uao_part_splitpartition where date='2013-01-22';
-select count(*) as visible_tuples from sto_alt_uao_part_splitpartition;
- visible_tuples 
-----------------
-             10
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) as all_tuples from sto_alt_uao_part_splitpartition;
- all_tuples 
-------------
-         27
-(1 row)
-
-set gp_select_invisible = false;
-COMMIT;
-VACUUM full sto_alt_uao_part_splitpartition;
-select count(*) AS visible_tuples from sto_alt_uao_part_splitpartition;
- visible_tuples 
-----------------
-             10
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao_part_splitpartition;
- all_tuples 
-------------
-         10
-(1 row)
-
-set gp_select_invisible = false;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl.out b/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl.out
deleted file mode 100644
index 0ad0ae8e393..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl.out
+++ /dev/null
@@ -1,148 +0,0 @@
-create schema alter_ao_table_col_ddl_@amname@;
-set search_path="$user",alter_ao_table_col_ddl_@amname@,public;
-SET default_table_access_method=@amname@;
-BEGIN;
-CREATE TABLE sto_alt_uao1(
-          text_col text default 'remove it',
-          bigint_col bigint,
-          char_vary_col character varying(30),
-          numeric_col numeric,
-          int_col int4 NOT NULL,
-          float_col float4,
-          int_array_col int[],
-          before_rename_col int4,
-          change_datatype_col numeric,
-          date_column date,
-          col_set_default numeric) DISTRIBUTED RANDOMLY;
--- Append optimized tables should not have a valid relfrozenxid in
--- pg_class because per-tuple MVCC information (xmin/xmax) is not
--- present.
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
-insert into sto_alt_uao1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '1-1-2000', 0);
-insert into sto_alt_uao1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '1-1-2001', 1);
-insert into sto_alt_uao1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '1-1-2002', 2);
-select count(*) = 3 as passed from sto_alt_uao1;
- passed 
---------
- t
-(1 row)
-
--- Alter table add column
-Alter Table sto_alt_uao1 ADD COLUMN added_col character varying(30) default 'default';
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-update sto_alt_uao1 set added_col = 'newly added col'  where text_col = '1_zero';
-select * from sto_alt_uao1 order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default |    added_col    
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------+-----------------
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0 | default
- 1_zero   |          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 01-01-2001  |               1 | newly added col
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2 | default
-(3 rows)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao1;
- all_tuples 
-------------
-          4
-(1 row)
-
-set gp_select_invisible = false;
--- Drop column
-Alter Table sto_alt_uao1 DROP COLUMN date_column;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1 values ('3_zero', 3, '0_zero', 3, 3, 3, '{3}', 0, 0, 0);
-insert into sto_alt_uao1 values ('4_zero', 4, '1_zero', 4, 4, 4, '{4}', 1, 1, 1);
-update sto_alt_uao1 set bigint_col = -bigint_col  where text_col = '3_zero';
-delete from sto_alt_uao1 where numeric_col = 2;
-select * from sto_alt_uao1 order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | col_set_default |    added_col    
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-----------------+-----------------
- 3_zero   |         -3 | 0_zero        |           3 |       3 |         3 | {3}           |                 0 |                   0 |               0 | default
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 |               0 | default
- 1_zero   |          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 |               1 | newly added col
- 4_zero   |          4 | 1_zero        |           4 |       4 |         4 | {4}           |                 1 |                   1 |               1 | default
-(4 rows)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao1;
- all_tuples 
-------------
-          7
-(1 row)
-
-set gp_select_invisible = false;
--- Alter column type and rename
-Alter Table sto_alt_uao1 ALTER COLUMN numeric_col TYPE int4;
-Alter Table sto_alt_uao1 RENAME COLUMN numeric_col TO int4_col;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1 values ('5_zero', 5, '0_zero', 5, 5, 5, '{3}', 0, 0, 0);
-update sto_alt_uao1 set int4_col = int4_col+100;
-select count(int4_col) = 5 as passed from sto_alt_uao1;
- passed 
---------
- t
-(1 row)
-
-set gp_select_invisible = true;
-select count(int4_col) from sto_alt_uao1;
- count 
--------
-    10
-(1 row)
-
-set gp_select_invisible = false;
--- relfrozenxid should remain invalid after table rewrite
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl_optimizer.out b/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl_optimizer.out
deleted file mode 100644
index 0ad0ae8e393..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_col_ddl_optimizer.out
+++ /dev/null
@@ -1,148 +0,0 @@
-create schema alter_ao_table_col_ddl_@amname@;
-set search_path="$user",alter_ao_table_col_ddl_@amname@,public;
-SET default_table_access_method=@amname@;
-BEGIN;
-CREATE TABLE sto_alt_uao1(
-          text_col text default 'remove it',
-          bigint_col bigint,
-          char_vary_col character varying(30),
-          numeric_col numeric,
-          int_col int4 NOT NULL,
-          float_col float4,
-          int_array_col int[],
-          before_rename_col int4,
-          change_datatype_col numeric,
-          date_column date,
-          col_set_default numeric) DISTRIBUTED RANDOMLY;
--- Append optimized tables should not have a valid relfrozenxid in
--- pg_class because per-tuple MVCC information (xmin/xmax) is not
--- present.
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
-insert into sto_alt_uao1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '1-1-2000', 0);
-insert into sto_alt_uao1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '1-1-2001', 1);
-insert into sto_alt_uao1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '1-1-2002', 2);
-select count(*) = 3 as passed from sto_alt_uao1;
- passed 
---------
- t
-(1 row)
-
--- Alter table add column
-Alter Table sto_alt_uao1 ADD COLUMN added_col character varying(30) default 'default';
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-update sto_alt_uao1 set added_col = 'newly added col'  where text_col = '1_zero';
-select * from sto_alt_uao1 order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default |    added_col    
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------+-----------------
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0 | default
- 1_zero   |          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 01-01-2001  |               1 | newly added col
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2 | default
-(3 rows)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao1;
- all_tuples 
-------------
-          4
-(1 row)
-
-set gp_select_invisible = false;
--- Drop column
-Alter Table sto_alt_uao1 DROP COLUMN date_column;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1 values ('3_zero', 3, '0_zero', 3, 3, 3, '{3}', 0, 0, 0);
-insert into sto_alt_uao1 values ('4_zero', 4, '1_zero', 4, 4, 4, '{4}', 1, 1, 1);
-update sto_alt_uao1 set bigint_col = -bigint_col  where text_col = '3_zero';
-delete from sto_alt_uao1 where numeric_col = 2;
-select * from sto_alt_uao1 order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | col_set_default |    added_col    
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-----------------+-----------------
- 3_zero   |         -3 | 0_zero        |           3 |       3 |         3 | {3}           |                 0 |                   0 |               0 | default
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 |               0 | default
- 1_zero   |          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 |               1 | newly added col
- 4_zero   |          4 | 1_zero        |           4 |       4 |         4 | {4}           |                 1 |                   1 |               1 | default
-(4 rows)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao1;
- all_tuples 
-------------
-          7
-(1 row)
-
-set gp_select_invisible = false;
--- Alter column type and rename
-Alter Table sto_alt_uao1 ALTER COLUMN numeric_col TYPE int4;
-Alter Table sto_alt_uao1 RENAME COLUMN numeric_col TO int4_col;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1 values ('5_zero', 5, '0_zero', 5, 5, 5, '{3}', 0, 0, 0);
-update sto_alt_uao1 set int4_col = int4_col+100;
-select count(int4_col) = 5 as passed from sto_alt_uao1;
- passed 
---------
- t
-(1 row)
-
-set gp_select_invisible = true;
-select count(int4_col) from sto_alt_uao1;
- count 
--------
-    10
-(1 row)
-
-set gp_select_invisible = false;
--- relfrozenxid should remain invalid after table rewrite
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao1'
-       and n.nspname = 'alter_ao_table_col_ddl_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_constraint.out b/src/test/regress/expected/uao_ddl/alter_ao_table_constraint.out
deleted file mode 100644
index 024e9ec7469..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_constraint.out
+++ /dev/null
@@ -1,168 +0,0 @@
-create schema alter_ao_table_constraint_@amname@;
-set search_path="$user",alter_ao_table_constraint_@amname@,public;
-SET default_table_access_method=@amname@;
--- Add/Drop constraints and validate update on AO table
-CREATE TABLE sto_alt_uao2_constraint(
-  text_col text,
-  bigint_col bigint,
-  char_vary_col character varying(30),
-  numeric_col numeric
-  ) DISTRIBUTED RANDOMLY;
-insert into sto_alt_uao2_constraint values ('1_zero', 1, '1_zero', 1);
-SELECT 1 AS VisimapPresent  FROM pg_appendonly WHERE visimapidxid is not NULL
- AND visimapidxid is not NULL AND relid='sto_alt_uao2_constraint'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |           1
-(1 row)
-
-update sto_alt_uao2_constraint set numeric_col = 100 where text_col = '1_zero';
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              1
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    2
-(1 row)
-
-set gp_select_invisible = false;
--- Alter table add table constraint
-ALTER TABLE sto_alt_uao2_constraint  ADD CONSTRAINT lenchk CHECK (char_length(char_vary_col) < 10);
-insert into sto_alt_uao2_constraint values ('6_zero', 6, '6_zeroooooo', 6);
-ERROR:  new row for relation "sto_alt_uao2_constraint" violates check constraint "lenchk"  (seg0 127.0.0.1:25432 pid=24181)
-DETAIL:  Failing row contains (6_zero, 6, 6_zeroooooo, 6).
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |         100
-(1 row)
-
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              1
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    2
-(1 row)
-
-set gp_select_invisible = false;
-insert into sto_alt_uao2_constraint values ('6_zero', 6, '6_zero', 6);
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |         100
- 6_zero   |          6 | 6_zero        |           6
-(2 rows)
-
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              2
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    3
-(1 row)
-
-set gp_select_invisible = false;
-update sto_alt_uao2_constraint set numeric_col = 100 where text_col = '1_zero';
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |         100
- 6_zero   |          6 | 6_zero        |           6
-(2 rows)
-
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              2
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    4
-(1 row)
-
-set gp_select_invisible = false;
--- Alter table drop constriant
-Alter table sto_alt_uao2_constraint  Drop constraint lenchk;
-insert into sto_alt_uao2_constraint values ('7_zero', 7, '7_zeroooooooooo', 7);
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col |  char_vary_col  | numeric_col 
-----------+------------+-----------------+-------------
- 1_zero   |          1 | 1_zero          |         100
- 6_zero   |          6 | 6_zero          |           6
- 7_zero   |          7 | 7_zeroooooooooo |           7
-(3 rows)
-
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              3
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    5
-(1 row)
-
-set gp_select_invisible = false;
-select * from sto_alt_uao2_constraint order by bigint_col;
- text_col | bigint_col |  char_vary_col  | numeric_col 
-----------+------------+-----------------+-------------
- 1_zero   |          1 | 1_zero          |         100
- 6_zero   |          6 | 6_zero          |           6
- 7_zero   |          7 | 7_zeroooooooooo |           7
-(3 rows)
-
-update sto_alt_uao2_constraint set numeric_col = 100 where text_col = '1_zero';
-select count(*) AS only_visi_tups from sto_alt_uao2_constraint;
- only_visi_tups 
-----------------
-              3
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_constraint;
- invisi_and_visi_tups 
-----------------------
-                    6
-(1 row)
-
-set gp_select_invisible = false;
--- Some negative testing.
-alter table sto_alt_uao2_constraint ADD COLUMN added_col10 character varying(35)
-default NULL constraint added_col10 NOT NULL;
-ERROR:  column "added_col10" of relation "sto_alt_uao2_constraint" contains null values  (seg0 127.0.1.1:7002 pid=2217563)
-alter table sto_alt_uao2_constraint ADD COLUMN added_col12 character varying(35)
--- Mask out "by some row" printed by row-oriented AO tables
--- start_matchsubs
--- m/^ERROR:  check constraint.*is violated/
--- s/^ERROR:  check constraint.*is violated.*/ERROR:  check constraint is violated/
--- end_matchsubs
-default 'abc'  CHECK (added_col12 is NULL);
-ERROR:  check constraint is violated
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_index.out b/src/test/regress/expected/uao_ddl/alter_ao_table_index.out
deleted file mode 100644
index 761b95176ff..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_index.out
+++ /dev/null
@@ -1,113 +0,0 @@
-create schema alter_ao_table_index_@amname@;
-set search_path="$user",alter_ao_table_index_@amname@,public;
-SET default_table_access_method=@amname@;
--- Tests to update AO tables with indexes.
-CREATE TABLE sto_alt_uao3_idx(
-  text_col text,
-  bigint_col bigint,
-  char_vary_col character varying(30),
-  numeric_col numeric
-  ) DISTRIBUTED by (text_col);
-Create index sto_alt_uao3_idx_idx on sto_alt_uao3_idx(bigint_col);
-insert into sto_alt_uao3_idx values ('1_zero', 1, '1_zero', 1);
-insert into sto_alt_uao3_idx select 'abc_'||i, i, 'pqr'||i, i
- from generate_series(1,100)i;
-select count(*) AS visible_only from sto_alt_uao3_idx;
- visible_only 
---------------
-          101
-(1 row)
-
-update sto_alt_uao3_idx set numeric_col = 100 where text_col = '1_zero';
-select count(*) AS visible_only from sto_alt_uao3_idx;
- visible_only 
---------------
-          101
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from sto_alt_uao3_idx;
- all_tuples 
-------------
-        102
-(1 row)
-
-set gp_select_invisible = false;
--- Update indexed column
-update sto_alt_uao3_idx set bigint_col = numeric_col % 11;
-select * from sto_alt_uao3_idx where bigint_col = 11;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
-(0 rows)
-
-set gp_select_invisible = true;
-select * from sto_alt_uao3_idx where bigint_col = 11;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- abc_11   |         11 | pqr11         |          11
-(1 row)
-
-set gp_select_invisible = false;
--- Append optimized tables should not have a valid relfrozenxid in
--- pg_class because per-tuple MVCC information (xmin/xmax) is not
--- present.
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao3_idx'
-       and n.nspname = 'alter_ao_table_index_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao3_idx'
-       and n.nspname = 'alter_ao_table_index_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
--- Verify that alter table cluster on indexname is allowed
-Alter table sto_alt_uao3_idx cluster on sto_alt_uao3_idx_idx;
-select indisclustered from pg_index where indexrelid='sto_alt_uao3_idx_idx'::regclass;
- indisclustered 
-----------------
- t
-(1 row)
-
-Alter table sto_alt_uao3_idx set without cluster;
-select indisclustered from pg_index where indexrelid='sto_alt_uao3_idx_idx'::regclass;
- indisclustered 
-----------------
- f
-(1 row)
-
--- Verify that cluster is allowed
-CLUSTER sto_alt_uao3_idx using sto_alt_uao3_idx_idx;
-select indisclustered from pg_index where indexrelid='sto_alt_uao3_idx_idx'::regclass;
- indisclustered 
-----------------
- t
-(1 row)
-
--- relfrozenxid should remain invalid after table rewrite
-select relfrozenxid from pg_class c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao3_idx'
-       and n.nspname = 'alter_ao_table_index_@amname@';
- relfrozenxid 
---------------
-            0
-(1 row)
-
-select relfrozenxid from gp_dist_random('pg_class') c, pg_namespace n where
-       c.relnamespace = n.oid and relname = 'sto_alt_uao3_idx'
-       and n.nspname = 'alter_ao_table_index_@amname@';
- relfrozenxid 
---------------
-            0
-            0
-            0
-(3 rows)
-
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_owner.out b/src/test/regress/expected/uao_ddl/alter_ao_table_owner.out
deleted file mode 100644
index cd86c5d02f4..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_owner.out
+++ /dev/null
@@ -1,62 +0,0 @@
-create schema alter_ao_table_owner_@amname@;
-set search_path="$user",alter_ao_table_owner_@amname@,public;
-SET default_table_access_method=@amname@;
---- start_ignore
-drop owned by uao_user2 cascade;
-Drop role if exists uao_user2 ;
---- stop_ignore
---Alter table to a new owner
-Create role uao_user2;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-create table sto_alt_uao4 (i int, j char(10)) DISTRIBUTED BY (i);
-insert into sto_alt_uao4 select i , 'cc'||i from generate_series(1,5) as i;
-Alter Table sto_alt_uao4  Owner to uao_user2;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimapidxid is not NULL AND
- visimapidxid is not NULL AND relid=(SELECT oid FROM pg_class WHERE relname='sto_alt_uao4');
- visimappresent 
-----------------
-              1
-(1 row)
-
-select 1 as owner_changed from pg_class where relname='sto_alt_uao4' and
- relowner = (select oid from pg_roles where rolname = 'uao_user2');
- owner_changed 
----------------
-             1
-(1 row)
-
-select * from sto_alt_uao4 order by 1;
- i |     j      
----+------------
- 1 | cc1       
- 2 | cc2       
- 3 | cc3       
- 4 | cc4       
- 5 | cc5       
-(5 rows)
-
-update sto_alt_uao4 set j = 'azzza3' where i = 3;
-select * from sto_alt_uao4 order by 1;
- i |     j      
----+------------
- 1 | cc1       
- 2 | cc2       
- 3 | azzza3    
- 4 | cc4       
- 5 | cc5       
-(5 rows)
-
-delete from sto_alt_uao4;
-select * from sto_alt_uao4;
- i | j 
----+---
-(0 rows)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao4;
- invisi_and_visi_tups 
-----------------------
-                    6
-(1 row)
-
-set gp_select_invisible = false;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_setdefault.out b/src/test/regress/expected/uao_ddl/alter_ao_table_setdefault.out
deleted file mode 100644
index bdf0604d196..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_setdefault.out
+++ /dev/null
@@ -1,112 +0,0 @@
-create schema alter_ao_table_setdefault_@amname@;
-set search_path="$user",alter_ao_table_setdefault_@amname@,public;
-SET default_table_access_method=@amname@;
--- Create AO tables
-CREATE TABLE sto_alt_uao1_default(
-          bigint_col bigint,
-          char_vary_col character varying(30),
-          numeric_col numeric,
-          int_col int4 NOT NULL,
-          float_col float4,
-          int_array_col int[],
-          before_rename_col int4,
-          change_datatype_col numeric,
-          date_column date,
-          col_set_default numeric,
-          text_col text default 'i am default'
-) DISTRIBUTED RANDOMLY;
-insert into sto_alt_uao1_default values (0, '0_zero', 0, 0, 0, '{0}', 0, 0, '1-1-2000',0,'0_zero');
-insert into sto_alt_uao1_default values (1, '1_zero', 1, 1, 1, '{1}', 1, 1, '1-1-2001',1,'1_zero');
-insert into sto_alt_uao1_default values (2, '2_zero', 2, 2, 2, '{2}', 2, 2, '1-1-2002',2);
--- Alter column Drop default
-Alter table sto_alt_uao1_default  alter column text_col drop default;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1_default'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1_default values (3, '3_zero', 3, 3, 3, '{3}', 3, 3, '1-1-2002', 3);
-insert into sto_alt_uao1_default values (4, '4_zero', 4, 4, 4, '{4}', 4, 4, '1-1-2002', 4,'4_zero');
-select count(*) AS only_visi_tups from sto_alt_uao1_default;
- only_visi_tups 
-----------------
-              5
-(1 row)
-
-update sto_alt_uao1_default set text_col = 'my new val' where col_set_default = 3;
-select * from sto_alt_uao1_default order by bigint_col;
- bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default |   text_col   
-------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------+--------------
-          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0 | 0_zero
-          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 01-01-2001  |               1 | 1_zero
-          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2 | i am default
-          3 | 3_zero        |           3 |       3 |         3 | {3}           |                 3 |                   3 | 01-01-2002  |               3 | my new val
-          4 | 4_zero        |           4 |       4 |         4 | {4}           |                 4 |                   4 | 01-01-2002  |               4 | 4_zero
-(5 rows)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao1_default;
- invisi_and_visi_tups 
-----------------------
-                    6
-(1 row)
-
-set gp_select_invisible = false;
--- Alter column set NOT NULL
-Alter Table sto_alt_uao1_default ALTER COLUMN text_col SET NOT NULL;
--- start_matchsubs
--- m/^DETAIL:  Failing row contains \(.*\).$/
--- s/.//gs
--- end_matchsubs
-insert into sto_alt_uao1_default values (5, '5_zero', 5, 5, 5, '{5}', 5, 5, '1-1-2002', 5);
-ERROR:  null value in column "text_col" of relation "sto_alt_uao1_default" violates not-null constraint  (seg0 127.0.1.1:7002 pid=2180266)
-DETAIL:  Failing row contains (5, 5_zero, 5, 5, 5, {5}, 5, 5, 01-01-2002, 5, null).
-select * from sto_alt_uao1_default order by bigint_col;
- bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default |   text_col   
-------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------+--------------
-          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0 | 0_zero
-          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 01-01-2001  |               1 | 1_zero
-          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2 | i am default
-          3 | 3_zero        |           3 |       3 |         3 | {3}           |                 3 |                   3 | 01-01-2002  |               3 | my new val
-          4 | 4_zero        |           4 |       4 |         4 | {4}           |                 4 |                   4 | 01-01-2002  |               4 | 4_zero
-(5 rows)
-
--- Alter column drop NOT NULL
-Alter Table sto_alt_uao1_default ALTER COLUMN int_col DROP NOT NULL,
- ALTER COLUMN text_col DROP NOT NULL;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao1_default'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1_default values (6, '6_zero', 6, 6, 6, '{6}', 6, 6, '1-1-2002', 6);
-update sto_alt_uao1_default set date_column = '2013-08-15' where text_col = '1_zero';
-select * from sto_alt_uao1_default order by bigint_col;
- bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default |   text_col   
-------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------+--------------
-          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0 | 0_zero
-          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 08-15-2013  |               1 | 1_zero
-          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2 | i am default
-          3 | 3_zero        |           3 |       3 |         3 | {3}           |                 3 |                   3 | 01-01-2002  |               3 | my new val
-          4 | 4_zero        |           4 |       4 |         4 | {4}           |                 4 |                   4 | 01-01-2002  |               4 | 4_zero
-          6 | 6_zero        |           6 |       6 |         6 | {6}           |                 6 |                   6 | 01-01-2002  |               6 | 
-(6 rows)
-
-select count(*) AS only_visi_tups from sto_alt_uao1_default;
- only_visi_tups 
-----------------
-              6
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao1_default;
- invisi_and_visi_tups 
-----------------------
-                    8
-(1 row)
-
-set gp_select_invisible = false;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_setstorage.out b/src/test/regress/expected/uao_ddl/alter_ao_table_setstorage.out
deleted file mode 100644
index 8b3d8e887f2..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_setstorage.out
+++ /dev/null
@@ -1,127 +0,0 @@
-create schema alter_ao_table_setstorage_@amname@;
-set search_path="$user",alter_ao_table_setstorage_@amname@,public;
-SET default_table_access_method=@amname@;
-BEGIN;
-CREATE TABLE sto_alt_uao1_setstorage(
-          text_col text default 'remove it',
-          bigint_col bigint,
-          char_vary_col character varying(30),
-          numeric_col numeric,
-          int_col int4 NOT NULL,
-          float_col float4,
-          int_array_col int[],
-          before_rename_col int4,
-          change_datatype_col numeric,
-          date_column date,
-          col_set_default numeric) DISTRIBUTED BY (text_col);
-insert into sto_alt_uao1_setstorage values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '1-1-2000',0);
-insert into sto_alt_uao1_setstorage values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '1-1-2001',1);
-insert into sto_alt_uao1_setstorage values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '1-1-2002',2);
--- Alter table SET STORAGE
-Alter Table sto_alt_uao1_setstorage ALTER char_vary_col SET STORAGE PLAIN;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimapidxid is
-not NULL AND visimapidxid is not NULL AND relid='sto_alt_uao1_setstorage'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-insert into sto_alt_uao1_setstorage values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '1-1-2002',2);
-update sto_alt_uao1_setstorage set date_column = '2013-08-16' where text_col = '1_zero';
-select * from sto_alt_uao1_setstorage order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default 
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0
- 1_zero   |          1 | 1_zero        |           1 |       1 |         1 | {1}           |                 1 |                   1 | 08-16-2013  |               1
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
-(4 rows)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao1_setstorage;
- invisi_and_visi_tups 
-----------------------
-                    5
-(1 row)
-
-set gp_select_invisible = false;
-delete from  sto_alt_uao1_setstorage where text_col = '1_zero';
-select * from sto_alt_uao1_setstorage order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default 
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
-(3 rows)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao1_setstorage;
- invisi_and_visi_tups 
-----------------------
-                    5
-(1 row)
-
-set gp_select_invisible = false;
--- Alter table set reorganize
-Alter Table sto_alt_uao1_setstorage set with (reorganize='true')
- distributed by (bigint_col);
-update sto_alt_uao1_setstorage set numeric_col = -bigint_col;
-select * from sto_alt_uao1_setstorage;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default 
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------
- 0_zero   |          0 | 0_zero        |           0 |       0 |         0 | {0}           |                 0 |                   0 | 01-01-2000  |               0
- 2_zero   |          2 | 2_zero        |          -2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
- 2_zero   |          2 | 2_zero        |          -2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
-(3 rows)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimapidxid is
-not NULL AND visimapidxid is not NULL AND relid='sto_alt_uao1_setstorage'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
--- Run another reorganize to confirm that the relcache has been invalidated
--- when we changed the value of this table's gp_distribution_policy. If the
--- relcache wasn't invalidated by the previous ALTER TABLE command, then the
--- table will revert to the original distribution policy.
-ALTER TABLE sto_alt_uao1_setstorage SET WITH (reorganize='true');
-SELECT gp_segment_id, distkey, policytype FROM gp_distribution_policy WHERE
-localoid='alter_ao_table_setstorage_@amname@.sto_alt_uao1_setstorage'::regclass
-UNION
-SELECT gp_segment_id, distkey, policytype
-FROM gp_dist_random('gp_distribution_policy') WHERE
-localoid='alter_ao_table_setstorage_@amname@.sto_alt_uao1_setstorage'::regclass;
- gp_segment_id | distkey | policytype 
----------------+---------+------------
-            -1 | 2       | p
-             0 | 2       | p
-             1 | 2       | p
-             2 | 2       | p
-(4 rows)
-
-update sto_alt_uao1_setstorage set numeric_col = -numeric_col;
-delete from sto_alt_uao1_setstorage where numeric_col = 0;
-select * from sto_alt_uao1_setstorage;
- text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | date_column | col_set_default 
-----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+-------------+-----------------
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
- 2_zero   |          2 | 2_zero        |           2 |       2 |         2 | {2}           |                 2 |                   2 | 01-01-2002  |               2
-(2 rows)
-
-set gp_select_invisible=true;
-select count(*) from sto_alt_uao1_setstorage;
- count 
--------
-     6
-(1 row)
-
-set gp_select_invisible=false;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimapidxid is
-not NULL AND visimapidxid is not NULL AND relid='sto_alt_uao1_setstorage'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/alter_ao_table_statistics.out b/src/test/regress/expected/uao_ddl/alter_ao_table_statistics.out
deleted file mode 100644
index d017d1ad835..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_ao_table_statistics.out
+++ /dev/null
@@ -1,50 +0,0 @@
-create schema alter_ao_table_statistics_@amname@;
-set search_path="$user",alter_ao_table_statistics_@amname@,public;
-SET default_table_access_method=@amname@;
-CREATE TABLE sto_alt_uao2_stats(
-  text_col text,
-  bigint_col bigint,
-  char_vary_col character varying(30),
-  numeric_col numeric
-  ) DISTRIBUTED RANDOMLY;
-insert into sto_alt_uao2_stats values ('1_zero', 1, '1_zero', 1);
-select * from sto_alt_uao2_stats order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |           1
-(1 row)
-
--- Alter column  set statistics
-Alter table sto_alt_uao2_stats  alter column bigint_col set statistics 3;
-SELECT 1 AS VisimapPresent  FROM pg_appendonly WHERE visimapidxid is not NULL AND
- visimapidxid is not NULL AND relid='sto_alt_uao2_stats'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-select * from sto_alt_uao2_stats order by bigint_col;
- text_col | bigint_col | char_vary_col | numeric_col 
-----------+------------+---------------+-------------
- 1_zero   |          1 | 1_zero        |           1
-(1 row)
-
-update sto_alt_uao2_stats set numeric_col = 1 where text_col = '1_zero';
-insert into sto_alt_uao2_stats select i||' abc', i, 'pqr '||i, i from generate_series(1,100)i;
-update sto_alt_uao2_stats set bigint_col = - numeric_col;
-delete from sto_alt_uao2_stats where bigint_col < -90;
-analyze sto_alt_uao2_stats;
-select count(*) AS only_visi_tups from sto_alt_uao2_stats;
- only_visi_tups 
-----------------
-             91
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_alt_uao2_stats;
- invisi_and_visi_tups 
-----------------------
-                  203
-(1 row)
-
-set gp_select_invisible = false;
diff --git a/src/test/regress/expected/uao_ddl/alter_drop_allcol.out b/src/test/regress/expected/uao_ddl/alter_drop_allcol.out
deleted file mode 100644
index d5842ca4124..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_drop_allcol.out
+++ /dev/null
@@ -1,98 +0,0 @@
-create schema alter_drop_allcol_@amname@;
-set search_path="$user",alter_drop_allcol_@amname@,public;
-SET default_table_access_method=@amname@;
---
--- Drop all columns one by one then add new column.
--- Perform VACUUM and SELECT again.
---
-BEGIN;
-CREATE TABLE alter_drop_allcoll (a INT, b INT, c CHAR(128));
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-CREATE INDEX alter_drop_allcoll_index ON alter_drop_allcoll(b);
-INSERT INTO alter_drop_allcoll SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,5) AS i;
-select * from alter_drop_allcoll order by a,b;
- a | b |                                                                c                                                                 
----+---+----------------------------------------------------------------------------------------------------------------------------------
- 1 | 1 | hello world                                                                                                                     
- 2 | 2 | hello world                                                                                                                     
- 3 | 3 | hello world                                                                                                                     
- 4 | 4 | hello world                                                                                                                     
- 5 | 5 | hello world                                                                                                                     
-(5 rows)
-
-ALTER TABLE alter_drop_allcoll DROP COLUMN c;
-select count(*) as c from pg_attribute pa, pg_class pc where pa.attrelid = pc.oid and pc.relname='alter_drop_allcoll' and attname='c';
- c 
----
- 0
-(1 row)
-
-select * from alter_drop_allcoll order by a,b;
- a | b 
----+---
- 1 | 1
- 2 | 2
- 3 | 3
- 4 | 4
- 5 | 5
-(5 rows)
-
-ALTER TABLE alter_drop_allcoll DROP COLUMN b;
-select count(*) as b from pg_attribute pa, pg_class pc where pa.attrelid = pc.oid and pc.relname='alter_drop_allcoll' and attname='b';
- b 
----
- 0
-(1 row)
-
-select * from alter_drop_allcoll order by a;
- a 
----
- 1
- 2
- 3
- 4
- 5
-(5 rows)
-
-ALTER TABLE alter_drop_allcoll DROP COLUMN a;
-NOTICE:  dropping a column that is part of the distribution policy forces a random distribution policy
-select count(*) as a from pg_attribute pa, pg_class pc where pa.attrelid = pc.oid and pc.relname='alter_drop_allcoll' and attname='a';
- a 
----
- 0
-(1 row)
-
-select * from alter_drop_allcoll;
---
-(5 rows)
-
-ALTER TABLE alter_drop_allcoll ADD COLUMN a1 int default 10;
-select count(*) as a from pg_attribute pa, pg_class pc where pa.attrelid = pc.oid and pc.relname='alter_drop_allcoll' and attname='a';
- a 
----
- 0
-(1 row)
-
-select * from alter_drop_allcoll;
- a1 
-----
- 10
- 10
- 10
- 10
- 10
-(5 rows)
-
-COMMIT;
-vacuum alter_drop_allcoll;
-select * from alter_drop_allcoll;
- a1 
-----
- 10
- 10
- 10
- 10
- 10
-(5 rows)
-
diff --git a/src/test/regress/expected/uao_ddl/alter_rollback.out b/src/test/regress/expected/uao_ddl/alter_rollback.out
deleted file mode 100644
index 7c6ac056dbb..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_rollback.out
+++ /dev/null
@@ -1,37 +0,0 @@
-create schema alter_rollback_@amname@;
-set search_path="$user",alter_rollback_@amname@,public;
-SET default_table_access_method=@amname@;
--- 
--- Add column in a transaction and then rollback the transaction
---
-begin;
-create table myao_rollback(i int , j int);
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into myao_rollback select i, i+10 from generate_series(1,2000) i ;
-insert into myao_rollback select i, i+10 from generate_series(1,2000) i ;
-insert into myao_rollback select i, i+10 from generate_series(1,2000) i ;
-insert into myao_rollback select i, i+10 from generate_series(1,2000) i ;
-select count(*) from myao_rollback;
- count 
--------
-  8000
-(1 row)
-
-commit;
-begin transaction;
-alter table myao_rollback add column k int default 0;
-insert into myao_rollback select i , i + 10, i - 10 from generate_series(1,10) i;
-select count(*) from myao_rollback;
- count 
--------
-  8010
-(1 row)
-
-rollback;
-select count(*) from myao_rollback;
- count 
--------
-  8000
-(1 row)
-
diff --git a/src/test/regress/expected/uao_ddl/alter_table_reloptions.out b/src/test/regress/expected/uao_ddl/alter_table_reloptions.out
deleted file mode 100644
index e3cd022d37c..00000000000
--- a/src/test/regress/expected/uao_ddl/alter_table_reloptions.out
+++ /dev/null
@@ -1,201 +0,0 @@
--- This test file covers setting reloptions on existing AO and AOCO tables.
-CREATE SCHEMA alter_table_reloptions_@amname@;
-SET search_path="$user",alter_table_reloptions_@amname@,public;
-SET default_table_access_method=@amname@;
--- Setup some default reloptions for AO/AOCO tables
-SET gp_default_storage_options = 'blocksize=65536, compresstype=zlib, compresslevel=5, checksum=true';
-CREATE TABLE aorelopts_@amname@ AS SELECT * FROM generate_series(1, 1000);
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause. Creating a NULL policy entry.
-CREATE TEMP TABLE relfilebefore AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-ALTER TABLE aorelopts_@amname@ SET (compresslevel=7, checksum=false);
--- Check if the reloptions have been correctly changed from the defaults.
-SELECT blocksize,compresslevel,checksum,compresstype
-FROM pg_appendonly WHERE relid='aorelopts_@amname@'::regclass::oid;
- blocksize | compresslevel | checksum | compresstype 
------------+---------------+----------+--------------
-     65536 |             7 | f        | zlib
-(1 row)
-
--- Check pg_class.reloptions too.
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
-                    reloptions                    
---------------------------------------------------
- {blocksize=65536,compresslevel=7,checksum=false}
-(1 row)
-
-CREATE TEMP TABLE relfileafter AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
--- The table should have been rewritten (all of the relfilenodes should have
--- changed)
-SELECT * FROM relfilebefore INTERSECT SELECT * FROM relfileafter;
- segid | relfilenode 
--------+-------------
-(0 rows)
-
--- The data should have been preserved.
-SELECT count(*) FROM aorelopts_@amname@;
- count 
--------
-  1000
-(1 row)
-
-DROP TABLE relfilebefore;
-DROP TABLE relfileafter;
--- Now alter the table with the same reloptions, the table shouldn't be rewritten
-CREATE TEMP TABLE relfilebefore AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-ALTER TABLE aorelopts_@amname@ SET (compresslevel=7, checksum=false);
-CREATE TEMP TABLE relfileafter AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
--- The relfilenode remains the same
-SELECT * FROM relfilebefore EXCEPT SELECT * FROM relfileafter;
- segid | relfilenode 
--------+-------------
-(0 rows)
-
--- Also reloptions and table data are intact 
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
-                    reloptions                    
---------------------------------------------------
- {blocksize=65536,compresslevel=7,checksum=false}
-(1 row)
-
-SELECT count(*) FROM aorelopts_@amname@;
- count 
--------
-  1000
-(1 row)
-
-DROP TABLE relfilebefore;
-DROP TABLE relfileafter;
--- Altering again w/ same reloptions but different order, no rewrite still.
-CREATE TEMP TABLE relfilebefore AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-ALTER TABLE aorelopts_@amname@ SET (checksum=false, compresslevel=7);
-CREATE TEMP TABLE relfileafter AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
--- The relfilenode remains the same
-SELECT * FROM relfilebefore EXCEPT SELECT * FROM relfileafter;
- segid | relfilenode 
--------+-------------
-(0 rows)
-
--- The reloptions have same values but new order corresponding to the AT command.
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
-                    reloptions                    
---------------------------------------------------
- {blocksize=65536,checksum=false,compresslevel=7}
-(1 row)
-
--- Data are intact
-SELECT count(*) FROM aorelopts_@amname@;
- count 
--------
-  1000
-(1 row)
-
--- Create a new AO table with the initial default storage options which won't
--- show in the pg_class.reloptions. Then alter the table with the same default
--- values, the table shouldn't be rewritten.
--- However, the option should now appear in pg_class.reloptions, same as if 
--- it is passed by CREATE TABLE WITH ().
-DROP TABLE aorelopts_@amname@;
-RESET gp_default_storage_options;
-CREATE TABLE aorelopts_@amname@(a int);
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
--- pg_class.reloptions should show nothing.
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
- reloptions 
-------------
- 
-(1 row)
-
-DROP TABLE relfilebefore;
-DROP TABLE relfileafter;
-CREATE TEMP TABLE relfilebefore AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-ALTER TABLE aorelopts_@amname@ SET (blocksize=32768);
-CREATE TEMP TABLE relfileafter AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'segid' as the Greenplum Database data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
--- The relfilenode remains the same
-SELECT * FROM relfilebefore EXCEPT SELECT * FROM relfileafter;
- segid | relfilenode 
--------+-------------
-(0 rows)
-
--- pg_class.reloptions should now show the reloption we just explicitly set
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
-    reloptions     
--------------------
- {blocksize=32768}
-(1 row)
-
--- Now first change 'checksum' to false then change it back to true which
--- is the default value of 'checksum'. There should be a rewrite.
-ALTER TABLE aorelopts_@amname@ SET (checksum = false);
-DROP TABLE relfilebefore;
-DROP TABLE relfileafter;
-CREATE TEMP TABLE relfilebefore AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
--- Option w/o '=' should work (same as checksum=true).
-ALTER TABLE aorelopts_@amname@ SET (checksum);
-CREATE TEMP TABLE relfileafter AS
-SELECT -1 segid, relfilenode FROM pg_class WHERE relname in ('aorelopts_@amname@')
-UNION SELECT gp_segment_id segid, relfilenode FROM gp_dist_random('pg_class')
-WHERE relname in ('aorelopts_@amname@') ORDER BY segid;
--- The table should have been rewritten
-SELECT * FROM relfilebefore INTERSECT SELECT * FROM relfileafter;
- segid | relfilenode 
--------+-------------
-(0 rows)
-
--- pg_class.reloptions will reflect the change too 
-SELECT reloptions FROM pg_class WHERE relname = 'aorelopts_@amname@';
-           reloptions            
----------------------------------
- {blocksize=32768,checksum=true}
-(1 row)
-
-SELECT count(*) FROM aorelopts_@amname@;
- count 
--------
-     0
-(1 row)
-
-DROP TABLE aorelopts_@amname@;
diff --git a/src/test/regress/expected/uao_ddl/analyze_ao_table_every_dml.out b/src/test/regress/expected/uao_ddl/analyze_ao_table_every_dml.out
deleted file mode 100644
index e9c95c5d838..00000000000
--- a/src/test/regress/expected/uao_ddl/analyze_ao_table_every_dml.out
+++ /dev/null
@@ -1,118 +0,0 @@
-create schema analyze_ao_table_every_dml_@amname@;
-set search_path="$user",analyze_ao_table_every_dml_@amname@,public;
-SET default_table_access_method=@amname@;
--- Analyze after each insert/update/delete.
-BEGIN;
-CREATE TABLE sto_uao_city_analyze_everydml (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
--- gucs set to auto update statistics after each dml
-set gp_autostats_on_change_threshold=1;
-set gp_autostats_mode=on_change;
-select count(*)  from sto_uao_city_analyze_everydml;
- count 
--------
-     0
-(1 row)
-
-select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml'::regclass;
-            relname            | reltuples 
--------------------------------+-----------
- sto_uao_city_analyze_everydml |        -1
-(1 row)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_uao_city_analyze_everydml'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
--- Copy 7 rows in table sto_uao_city_analyze_everydml
-COPY sto_uao_city_analyze_everydml (id, name, countrycode, district, population) FROM stdin;
-COMMIT;
-select count(*)  from sto_uao_city_analyze_everydml;
- count 
--------
-     7
-(1 row)
-
-select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml'::regclass;
-            relname            | reltuples 
--------------------------------+-----------
- sto_uao_city_analyze_everydml |         7
-(1 row)
-
-select *  from sto_uao_city_analyze_everydml order by id;
- id |      name      | countrycode |   district    | population 
-----+----------------+-------------+---------------+------------
-  1 | Kabul          | AFG         | Kabol         |    1780000
-  2 | Qandahar       | AFG         | Qandahar      |     237500
-  3 | Herat          | AFG         | Herat         |     186800
-  4 | Mazar-e-Sharif | AFG         | Balkh         |     127800
-  5 | Amsterdam      | NLD         | Noord-Holland |     731200
-  6 | Rotterdam      | NLD         | Zuid-Holland  |     593321
-  7 | Haag           | NLD         | Zuid-Holland  |     440900
-(7 rows)
-
--- Should delete 3 rows
-delete from  sto_uao_city_analyze_everydml where countrycode='NLD';
-select count(*)  AS only_visi_tups from sto_uao_city_analyze_everydml;
- only_visi_tups 
-----------------
-              4
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_uao_city_analyze_everydml;
- invisi_and_visi_tups 
-----------------------
-                    7
-(1 row)
-
-set gp_select_invisible = false;
-select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml'::regclass;
-            relname            | reltuples 
--------------------------------+-----------
- sto_uao_city_analyze_everydml |         4
-(1 row)
-
-update sto_uao_city_analyze_everydml set population=population+1000 where countrycode='AFG';
-select count(*)  AS only_visi_tups from sto_uao_city_analyze_everydml;
- only_visi_tups 
-----------------
-              4
-(1 row)
-
-set gp_select_invisible = true;
-select count(*)  AS invisi_and_visi_tups from sto_uao_city_analyze_everydml;
- invisi_and_visi_tups 
-----------------------
-                   11
-(1 row)
-
-set gp_select_invisible = false;
-select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml'::regclass;
-            relname            | reltuples 
--------------------------------+-----------
- sto_uao_city_analyze_everydml |         4
-(1 row)
-
--- Copy 2 more rows in table sto_uao_city_analyze_everyins
-COPY sto_uao_city_analyze_everydml (id, name, countrycode, district, population) FROM stdin;
-select count(*)  from sto_uao_city_analyze_everydml;
- count 
--------
-     6
-(1 row)
-
-select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml'::regclass;
-            relname            | reltuples 
--------------------------------+-----------
- sto_uao_city_analyze_everydml |         6
-(1 row)
-
diff --git a/src/test/regress/expected/uao_ddl/blocksize.out b/src/test/regress/expected/uao_ddl/blocksize.out
deleted file mode 100644
index f043e3e9efa..00000000000
--- a/src/test/regress/expected/uao_ddl/blocksize.out
+++ /dev/null
@@ -1,145 +0,0 @@
-create schema blocksize_@amname@;
-set search_path="$user",blocksize_@amname@,public;
-SET default_table_access_method=@amname@;
--- Insert/update/delete on UAO tables with different blocksizes
-BEGIN;
-CREATE TABLE uao_blocksize_8k with (BLOCKSIZE=8192) AS (
-SELECT GENERATE_SERIES::numeric sno
-	 , (random() * 10000000)::numeric + 10000000 val1
-	 , timeofday()::varchar(50) val2
-	 , GENERATE_SERIES % 103 val3
-	 , (random() * 10000000)::numeric + 10000000 val4
-	 , (random() * 10000000)::numeric + 10000000 val5
-  FROM GENERATE_SERIES(1000, 1999)
-) distributed by (sno);
-CREATE index val3_bmp_idxblocksize_upd_8k on uao_blocksize_8k
- using bitmap (val3);
-SELECT count(*) from uao_blocksize_8k;
- count 
--------
-  1000
-(1 row)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is
-not NULL AND visimapidxid is not NULL AND relid='uao_blocksize_8k'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-select 1 as block8k_present from pg_appendonly WHERE blocksize=8192
-AND relid='uao_blocksize_8k'::regclass;
- block8k_present 
------------------
-               1
-(1 row)
-
-update uao_blocksize_8k set val2 = 'new_val', val3 = -sno
- where val3 < 54;
-select count(*) AS visible_tuples from uao_blocksize_8k;
- visible_tuples 
-----------------
-           1000
-(1 row)
-
-select count(*) AS updated_tuples from uao_blocksize_8k
- where val2='new_val';
- updated_tuples 
-----------------
-            529
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from uao_blocksize_8k;
- all_tuples 
-------------
-       1529
-(1 row)
-
-set gp_select_invisible = false;
-delete from uao_blocksize_8k where val3 < 0;
-select count(*) AS visible_tuples from uao_blocksize_8k;
- visible_tuples 
-----------------
-            471
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from uao_blocksize_8k;
- all_tuples 
-------------
-       1529
-(1 row)
-
-set gp_select_invisible = false;
--- create select uao table with BLOCKSIZE=2048K
-CREATE TABLE uao_blocksize_2048k
- with (BLOCKSIZE=2097152) AS (
-SELECT GENERATE_SERIES::numeric sno
-	 , (random() * 10000000)::numeric + 10000000 val1
-	 , timeofday()::varchar(50) val2
-	 , GENERATE_SERIES % 103 val3
-	 , (random() * 10000000)::numeric + 10000000 val4
-	 , (random() * 10000000)::numeric + 10000000 val5
-  FROM GENERATE_SERIES(1000, 1999)
-) distributed by (sno);
-SELECT count(*) from uao_blocksize_2048k;
- count 
--------
-  1000
-(1 row)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE
-visimaprelid is not NULL AND visimapidxid is not NULL AND
-relid='uao_blocksize_2048k'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-select 1 as block2048k_present from pg_appendonly WHERE
-blocksize=2097152 AND relid='uao_blocksize_2048k'::regclass;
- block2048k_present 
---------------------
-                  1
-(1 row)
-
-update uao_blocksize_2048k set val2 = 'new_val', val3 = -sno
- where val3 < 54;
-select count(*) AS visible_tuples from uao_blocksize_2048k;
- visible_tuples 
-----------------
-           1000
-(1 row)
-
-select count(*) AS updated_tuples from uao_blocksize_2048k
- where val2='new_val';
- updated_tuples 
-----------------
-            529
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from uao_blocksize_2048k;
- all_tuples 
-------------
-       1529
-(1 row)
-
-set gp_select_invisible = false;
-delete from uao_blocksize_2048k where val3 < 0;
-select count(*) AS visible_tuples from uao_blocksize_2048k;
- visible_tuples 
-----------------
-            471
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) AS all_tuples from uao_blocksize_2048k;
- all_tuples 
-------------
-       1529
-(1 row)
-
-set gp_select_invisible = false;
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/compresstype.out b/src/test/regress/expected/uao_ddl/compresstype.out
deleted file mode 100644
index c1902559e32..00000000000
--- a/src/test/regress/expected/uao_ddl/compresstype.out
+++ /dev/null
@@ -1,146 +0,0 @@
-create schema compresstype_@amname@;
-set search_path="$user",compresstype_@amname@,public;
-SET default_table_access_method=@amname@;
--- Test compress types.  The objective is to verify basic
--- insert/update/delete works and NOT to test compression algorithm.
--- So don't bother inserting large data and checking compression
--- ratio.
-BEGIN;
-CREATE TABLE uao_tab_compress_none (
-		  col_int int,
-		  col_text text,
-		  col_numeric numeric)
- with (COMPRESSTYPE=NONE) distributed by (col_int);
-insert into uao_tab_compress_none values
- (1, 'abc', 1), (2, 'pqr', 2), (3, 'lmn', 3);
-delete from uao_tab_compress_none;
-select count(*) = 0 as passed from uao_tab_compress_none;
- passed 
---------
- t
-(1 row)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is
-not NULL AND visimapidxid is not NULL AND relid='uao_tab_compress_none'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
--- create uao table with compress=zlib COMPRESSLEVEL=1
-CREATE TABLE uao_tab_compress_zlib1 (
-		  col_int int,
-		  col_text text,
-		  col_numeric numeric)
- with (COMPRESSTYPE=zlib, COMPRESSLEVEL=1)
- distributed by (col_int);
-insert into uao_tab_compress_zlib1 select i , 'This is news of today:
-Deadlock between Republicans and Democrats over how best to reduce the
-U.S. deficit, and over what period, has blocked an agreement to allow
-the raising of the $14.3 trillion debt ceiling '||i, (random() *
-10000000)::numeric + 10000000 from GENERATE_SERIES(1000, 1999) AS i;
-select count(*) from uao_tab_compress_zlib1;
- count 
--------
-  1000
-(1 row)
-
-update uao_tab_compress_zlib1 set col_text = 'New prefix ' || col_text;
-delete from uao_tab_compress_zlib1 where col_int > 1500;
-select count(*) from uao_tab_compress_zlib1;
- count 
--------
-   501
-(1 row)
-
--- Decompress tuples
-select sum(length(col_text)) from uao_tab_compress_zlib1
- where col_int < 1100;
-  sum  
--------
- 22600
-(1 row)
-
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is
-not NULL AND visimapidxid is not NULL AND relid='uao_tab_compress_zlib1'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-SELECT c.relname, c.reloptions from pg_class c
-join pg_namespace n on n.oid=c.relnamespace
-where c.relname='uao_tab_compress_zlib1' and n.nspname='compresstype_@amname@';
-        relname         |             reloptions              
-------------------------+-------------------------------------
- uao_tab_compress_zlib1 | {compresstype=zlib,compresslevel=1}
-(1 row)
-
--- create uao table with compress=zlib COMPRESSLEVEL=9
-CREATE TABLE uao_tab_compress_zlib9 (
-		  col_int int,
-		  col_text text,
-		  col_numeric numeric)
- with (COMPRESSTYPE=zlib, COMPRESSLEVEL=9)
- distributed by (col_int);
-insert into uao_tab_compress_zlib9 select i , 'This is news of today:
-Deadlock between Republicans and Democrats over how best to reduce the
-U.S. deficit, and over what period, has blocked an agreement to allow
-the raising of the $14.3 trillion debt ceiling '||i, (random() *
-10000000)::numeric + 10000000 from GENERATE_SERIES(1000, 1999) AS i;
-select count(*) from uao_tab_compress_zlib9;
- count 
--------
-  1000
-(1 row)
-
-update uao_tab_compress_zlib9 set col_numeric = -col_int,
- col_text = 'New prefix ' || col_text;
-delete from uao_tab_compress_zlib9 where col_int > 1500;
-select count(*) from uao_tab_compress_zlib9;
- count 
--------
-   501
-(1 row)
-
--- Decompress tuples
-select sum(length(col_text)) from uao_tab_compress_zlib9
- where col_int < 1100;
-  sum  
--------
- 22600
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from uao_tab_compress_zlib9;
- count 
--------
-  2000
-(1 row)
-
-set gp_select_invisible = false;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimapidxid is
-not NULL AND visimapidxid is not NULL AND relid='uao_tab_compress_zlib9'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-SELECT c.relname, c.reloptions from pg_class c
-join pg_namespace n on n.oid=c.relnamespace
-where c.relname='uao_tab_compress_zlib9' and n.nspname='compresstype_@amname@';
-        relname         |             reloptions              
-------------------------+-------------------------------------
- uao_tab_compress_zlib9 | {compresstype=zlib,compresslevel=9}
-(1 row)
-
-COMMIT;
--- Verify that RLE compression is not allowed for row oriented
--- append-optimized tables.
-CREATE TABLE sto_ao_neg_rle (
-		  col_int int,
-		  col_text text,
-		  col_numeric numeric)
- with (appendonly=true, orientation=row, COMPRESSTYPE=rle_type)
- distributed by (col_int);
-ERROR:  rle_type cannot be used with Append Only relations row orientation
diff --git a/src/test/regress/expected/uao_ddl/create_ao_table_500cols.out b/src/test/regress/expected/uao_ddl/create_ao_table_500cols.out
deleted file mode 100644
index 29acee38a9c..00000000000
--- a/src/test/regress/expected/uao_ddl/create_ao_table_500cols.out
+++ /dev/null
@@ -1,622 +0,0 @@
-create schema create_ao_table_500cols_@amname@;
-set search_path="$user",create_ao_table_500cols_@amname@,public;
-SET default_table_access_method=@amname@;
-Create table sto_uao_500cols (id SERIAL, a1 int, a2 char(5), a3
-numeric, a4 boolean DEFAULT false , a5 char DEFAULT 'd', a6 text, a7
-timestamp, a8 character varying(705), a9 bigint, a10 date, a11
-varchar(600), a12 text, a13 decimal, a14 real, a15 bigint, a16 int4,
-a17 bytea, a18 timestamp with time zone, a19 timetz, a20 path, a21
-box, a22 macaddr, a23 interval, a24 character varying(800), a25 lseg,
-a26 point, a27 double precision, a28 circle, a29 int4, a30 numeric(8),
-a31 polygon, a32 date, a33 real, a34 money, a35 cidr, a36 inet, a37
-time, a38 text, a39 bit, a40 bit varying(5), a41 smallint, a42 int,
-a43 int, a44 char(5), a45 numeric, a46 boolean DEFAULT false , a47
-char DEFAULT 'd', a48 text, a49 timestamp, a50 character varying(705),
-a51 bigint, a52 date, a53 varchar(600), a54 text, a55 decimal, a56
-real, a57 bigint, a58 int4, a59 bytea, a60 timestamp with time zone,
-a61 timetz, a62 path, a63 box, a64 macaddr, a65 interval, a66
-character varying(800), a67 lseg, a68 point, a69 double precision, a70
-circle, a71 int4, a72 numeric(8), a73 polygon, a74 date, a75 real, a76
-money, a77 cidr, a78 inet, a79 time, a80 text, a81 bit, a82 bit
-varying(5), a83 smallint, a84 int, a85 int, a86 char(5), a87 numeric,
-a88 boolean DEFAULT false , a89 char DEFAULT 'd', a90 text, a91
-timestamp, a92 character varying(705), a93 bigint, a94 date, a95
-varchar(600), a96 text, a97 decimal, a98 real, a99 bigint, a100 int4,
-a101 bytea, a102 timestamp with time zone, a103 timetz, a104 path,
-a105 box, a106 macaddr, a107 interval, a108 character varying(800),
-a109 lseg, a110 point, a111 double precision, a112 circle, a113 int4,
-a114 numeric(8), a115 polygon, a116 date, a117 real, a118 money, a119
-cidr, a120 inet, a121 time, a122 text, a123 bit, a124 bit varying(5),
-a125 smallint, a126 int, a127 int, a128 char(5), a129 numeric, a130
-boolean DEFAULT false , a131 char DEFAULT 'd', a132 text, a133
-timestamp, a134 character varying(705), a135 bigint, a136 date, a137
-varchar(600), a138 text, a139 decimal, a140 real, a141 bigint, a142
-int4, a143 bytea, a144 timestamp with time zone, a145 timetz, a146
-path, a147 box, a148 macaddr, a149 interval, a150 character
-varying(800), a151 lseg, a152 point, a153 double precision, a154
-circle, a155 int4, a156 numeric(8), a157 polygon, a158 date, a159
-real, a160 money, a161 cidr, a162 inet, a163 time, a164 text, a165
-bit, a166 bit varying(5), a167 smallint, a168 int, a169 int, a170
-char(5), a171 numeric, a172 boolean DEFAULT false , a173 char DEFAULT
-'d', a174 text, a175 timestamp, a176 character varying(705), a177
-bigint, a178 date, a179 varchar(600), a180 text, a181 decimal, a182
-real, a183 bigint, a184 int4, a185 bytea, a186 timestamp with time
-zone, a187 timetz, a188 path, a189 box, a190 macaddr, a191 interval,
-a192 character varying(800), a193 lseg, a194 point, a195 double
-precision, a196 circle, a197 int4, a198 numeric(8), a199 polygon, a200
-date, a201 real, a202 money, a203 cidr, a204 inet, a205 time, a206
-text, a207 bit, a208 bit varying(5), a209 smallint, a210 int, a211
-int, a212 char(5), a213 numeric, a214 boolean DEFAULT false , a215
-char DEFAULT 'd', a216 text, a217 timestamp, a218 character
-varying(705), a219 bigint, a220 date, a221 varchar(600), a222 text,
-a223 decimal, a224 real, a225 bigint, a226 int4, a227 bytea, a228
-timestamp with time zone, a229 timetz, a230 path, a231 box, a232
-macaddr, a233 interval, a234 character varying(800), a235 lseg, a236
-point, a237 double precision, a238 circle, a239 int4, a240 numeric(8),
-a241 polygon, a242 date, a243 real, a244 money, a245 cidr, a246 inet,
-a247 time, a248 text, a249 bit, a250 bit varying(5), a251 smallint,
-a252 int, a253 int, a254 char(5), a255 numeric, a256 boolean DEFAULT
-false , a257 char DEFAULT 'd', a258 text, a259 timestamp, a260
-character varying(705), a261 bigint, a262 date, a263 varchar(600),
-a264 text, a265 decimal, a266 real, a267 bigint, a268 int4, a269
-bytea, a270 timestamp with time zone, a271 timetz, a272 path, a273
-box, a274 macaddr, a275 interval, a276 character varying(800), a277
-lseg, a278 point, a279 double precision, a280 circle, a281 int4, a282
-numeric(8), a283 polygon, a284 date, a285 real, a286 money, a287 cidr,
-a288 inet, a289 time, a290 text, a291 bit, a292 bit varying(5), a293
-smallint, a294 int, a295 int, a296 char(5), a297 numeric, a298 boolean
-DEFAULT false , a299 char DEFAULT 'd', a300 text, a301 timestamp, a302
-character varying(705), a303 bigint, a304 date, a305 varchar(600),
-a306 text, a307 decimal, a308 real, a309 bigint, a310 int4, a311
-bytea, a312 timestamp with time zone, a313 timetz, a314 path, a315
-box, a316 macaddr, a317 interval, a318 character varying(800), a319
-lseg, a320 point, a321 double precision, a322 circle, a323 int4, a324
-numeric(8), a325 polygon, a326 date, a327 real, a328 money, a329 cidr,
-a330 inet, a331 time, a332 text, a333 bit, a334 bit varying(5), a335
-smallint, a336 int, a337 int, a338 char(5), a339 numeric, a340 boolean
-DEFAULT false , a341 char DEFAULT 'd', a342 text, a343 timestamp, a344
-character varying(705), a345 bigint, a346 date, a347 varchar(600),
-a348 text, a349 decimal, a350 real, a351 bigint, a352 int4, a353
-bytea, a354 timestamp with time zone, a355 timetz, a356 path, a357
-box, a358 macaddr, a359 interval, a360 character varying(800), a361
-lseg, a362 point, a363 double precision, a364 circle, a365 int4, a366
-numeric(8), a367 polygon, a368 date, a369 real, a370 money, a371 cidr,
-a372 inet, a373 time, a374 text, a375 bit, a376 bit varying(5), a377
-smallint, a378 int, a379 int, a380 char(5), a381 numeric, a382 boolean
-DEFAULT false , a383 char DEFAULT 'd', a384 text, a385 timestamp, a386
-character varying(705), a387 bigint, a388 date, a389 varchar(600),
-a390 text, a391 decimal, a392 real, a393 bigint, a394 int4, a395
-bytea, a396 timestamp with time zone, a397 timetz, a398 path, a399
-box, a400 macaddr, a401 interval, a402 character varying(800), a403
-lseg, a404 point, a405 double precision, a406 circle, a407 int4, a408
-numeric(8), a409 polygon, a410 date, a411 real, a412 money, a413 cidr,
-a414 inet, a415 time, a416 text, a417 bit, a418 bit varying(5), a419
-smallint, a420 int, a421 int, a422 char(5), a423 numeric, a424 boolean
-DEFAULT false , a425 char DEFAULT 'd', a426 text, a427 timestamp, a428
-character varying(705), a429 bigint, a430 date, a431 varchar(600),
-a432 text, a433 decimal, a434 real, a435 bigint, a436 int4, a437
-bytea, a438 timestamp with time zone, a439 timetz, a440 path, a441
-box, a442 macaddr, a443 interval, a444 character varying(800), a445
-lseg, a446 point, a447 double precision, a448 circle, a449 int4, a450
-numeric(8), a451 polygon, a452 date, a453 real, a454 money, a455 cidr,
-a456 inet, a457 time, a458 text, a459 bit, a460 bit varying(5), a461
-smallint, a462 int, a463 int, a464 char(5), a465 numeric, a466 boolean
-DEFAULT false , a467 char DEFAULT 'd', a468 text, a469 timestamp, a470
-character varying(705), a471 bigint, a472 date, a473 varchar(600),
-a474 text, a475 decimal, a476 real, a477 bigint, a478 int4, a479
-bytea, a480 timestamp with time zone, a481 timetz, a482 path, a483
-box, a484 macaddr, a485 interval, a486 character varying(800), a487
-lseg, a488 point, a489 double precision, a490 circle, a491 int4, a492
-numeric(8), a493 polygon, a494 date, a495 real, a496 money, a497 cidr,
-a498 inet, a499 time, a500 text)
- DISTRIBUTED BY (id);
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL AND
- visimapidxid is not NULL AND relid='sto_uao_500cols'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
-INSERT into sto_uao_500cols (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24,
-a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38,
-a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, a50, a51, a52,
-a53, a54, a55, a56, a57, a58, a59, a60, a61, a62, a63, a64, a65, a66,
-a67, a68, a69, a70, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80,
-a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, a91, a92, a93, a94,
-a95, a96, a97, a98, a99, a100, a101, a102, a103, a104, a105, a106,
-a107, a108, a109, a110, a111, a112, a113, a114, a115, a116, a117,
-a118, a119, a120, a121, a122, a123, a124, a125, a126, a127, a128,
-a129, a130, a131, a132, a133, a134, a135, a136, a137, a138, a139,
-a140, a141, a142, a143, a144, a145, a146, a147, a148, a149, a150,
-a151, a152, a153, a154, a155, a156, a157, a158, a159, a160, a161,
-a162, a163, a164, a165, a166, a167, a168, a169, a170, a171, a172,
-a173, a174, a175, a176, a177, a178, a179, a180, a181, a182, a183,
-a184, a185, a186, a187, a188, a189, a190, a191, a192, a193, a194,
-a195, a196, a197, a198, a199, a200, a201, a202, a203, a204, a205,
-a206, a207, a208, a209, a210, a211, a212, a213, a214, a215, a216,
-a217, a218, a219, a220, a221, a222, a223, a224, a225, a226, a227,
-a228, a229, a230, a231, a232, a233, a234, a235, a236, a237, a238,
-a239, a240, a241, a242, a243, a244, a245, a246, a247, a248, a249,
-a250, a251, a252, a253, a254, a255, a256, a257, a258, a259, a260,
-a261, a262, a263, a264, a265, a266, a267, a268, a269, a270, a271,
-a272, a273, a274, a275, a276, a277, a278, a279, a280, a281, a282,
-a283, a284, a285, a286, a287, a288, a289, a290, a291, a292, a293,
-a294, a295, a296, a297, a298, a299, a300, a301, a302, a303, a304,
-a305, a306, a307, a308, a309, a310, a311, a312, a313, a314, a315,
-a316, a317, a318, a319, a320, a321, a322, a323, a324, a325, a326,
-a327, a328, a329, a330, a331, a332, a333, a334, a335, a336, a337,
-a338, a339, a340, a341, a342, a343, a344, a345, a346, a347, a348,
-a349, a350, a351, a352, a353, a354, a355, a356, a357, a358, a359,
-a360, a361, a362, a363, a364, a365, a366, a367, a368, a369, a370,
-a371, a372, a373, a374, a375, a376, a377, a378, a379, a380, a381,
-a382, a383, a384, a385, a386, a387, a388, a389, a390, a391, a392,
-a393, a394, a395, a396, a397, a398, a399, a400, a401, a402, a403,
-a404, a405, a406, a407, a408, a409, a410, a411, a412, a413, a414,
-a415, a416, a417, a418, a419, a420, a421, a422, a423, a424, a425,
-a426, a427, a428, a429, a430, a431, a432, a433, a434, a435, a436,
-a437, a438, a439, a440, a441, a442, a443, a444, a445, a446, a447,
-a448, a449, a450, a451, a452, a453, a454, a455, a456, a457, a458,
-a459, a460, a461, a462, a463, a464, a465, a466, a467, a468, a469,
-a470, a471, a472, a473, a474, a475, a476, a477, a478, a479, a480,
-a481, a482, a483, a484, a485, a486, a487, a488, a489, a490, a491,
-a492, a493, a494, a495, a496, a497, a498, a499, a500) values (
-generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of today:
-Deadlock between Republicans and Democrats over how best to reduce the
-U.S. deficit, and over what period, has blocked an agreement to allow
-the raising of the $14.3 trillion debt ceiling', '2001-12-24
-02:26:11', 'U.S. House of Representatives Speaker John Boehner, the
-top Republican in Congress who has put forward a deficit reduction
-plan to be voted on later on Thursday said he had no control over
-whether his bill would avert a credit downgrade.', generate_series(5,
-7), '2011-10-11', 'The Republican-controlled House is tentatively
-scheduled to vote on Boehner proposal this afternoon at around 6
-p.m. EDT (2200 GMT). The main Republican vote counter in the House,
-Kevin McCarthy, would not say if there were enough votes to pass the
-bill.', 'WASHINGTON:House Speaker John Boehner says his plan mixing
-spending cuts in exchange for raising the nations $14.3 trillion debt
-limit is not perfect but is as large a step that a divided government
-can take that is doable and signable by President Barack Obama.The
-Ohio Republican says the measure is an honest and sincere attempt at
-compromise and was negotiated with Democrats last weekend and that
-passing it would end the ongoing debt crisis. The plan blends $900
-billion-plus in spending cuts with a companion increase in the nations
-borrowing cap.', '1234.56', 323453, generate_series(4, 6), 7845,
-'0011', '2005-07-16 01:51:15+1359', '2001-12-13 01:51:15', '((1, 2),
-(0, 3), (2, 1))', '((2, 3)(4, 5))', '08:00:2b:01:02:03', '1-2',
-'Republicans had been working throughout the day Thursday to lock down
-support for their plan to raise the nations debt ceiling, even as
-Senate Democrats vowed to swiftly kill it if passed.', '((2, 3)(4,
-5))', '(6, 7)', 11.222, '((4, 5), 7)', 32, 3214, '(1, 0, 2, 3)',
-'2010-02-21', 43564, '$1,000.00', '192.168.1', '126.1.3.4',
-'12:30:45', 'Johnson & Johnsons McNeil Consumer Healthcare announced
-the voluntary dosage reduction today. Labels will carry new dosing
-instructions this fall.The company says it will cut the maximum dosage
-of Regular Strength Tylenol and other acetaminophen-containing
-products in 2012.Acetaminophen is safe when used as directed, says
-Edwin Kuffner, MD, McNeil vice president of over-the-counter medical
-affairs. But, when too much is taken, it can cause liver damage.The
-action is intended to cut the risk of such accidental overdoses, the
-company says in a news release.', '1', '0', 12, 23, generate_series(1,
-4), 'M', 2011, 't', 'a', 'This is news of today: Deadlock between
-Republicans and Democrats over how best to reduce the U.S. deficit,
-and over what period, has blocked an agreement to allow the raising of
-the $14.3 trillion debt ceiling', '2001-12-24 02:26:11', 'U.S. House
-of Representatives Speaker John Boehner, the top Republican in
-Congress who has put forward a deficit reduction plan to be voted on
-later on Thursday said he had no control over whether his bill would
-avert a credit downgrade.', generate_series(5, 7), '2011-10-11', 'The
-Republican-controlled House is tentatively scheduled to vote on
-Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The
-main Republican vote counter in the House, Kevin McCarthy, would not
-say if there were enough votes to pass the bill.', 'WASHINGTON:House
-Speaker John Boehner says his plan mixing spending cuts in exchange
-for raising the nations $14.3 trillion debt limit is not perfect but
-is as large a step that a divided government can take that is doable
-and signable by President Barack Obama.The Ohio Republican says the
-measure is an honest and sincere attempt at compromise and was
-negotiated with Democrats last weekend and that passing it would end
-the ongoing debt crisis. The plan blends $900 billion-plus in spending
-cuts with a companion increase in the nations borrowing cap.',
-'1234.56', 323453, generate_series(4, 6), 7845, '0011', '2005-07-16
-01:51:15+1359', '2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))',
-'((2, 3)(4, 5))', '08:00:2b:01:02:03', '1-2', 'Republicans had been
-working throughout the day Thursday to lock down support for their
-plan to raise the nations debt ceiling, even as Senate Democrats vowed
-to swiftly kill it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222,
-'((4, 5), 7)', 32, 3214, '(1, 0, 2, 3)', '2010-02-21', 43564,
-'$1,000.00', '192.168.1', '126.1.3.4', '12:30:45', 'Johnson & Johnsons
-McNeil Consumer Healthcare announced the voluntary dosage reduction
-today. Labels will carry new dosing instructions this fall.The company
-says it will cut the maximum dosage of Regular Strength Tylenol and
-other acetaminophen-containing products in 2012.Acetaminophen is safe
-when used as directed, says Edwin Kuffner, MD, McNeil vice president
-of over-the-counter medical affairs. But, when too much is taken, it
-can cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23, generate_series(1, 4), 'M', 2011, 't', 'a', 'This is news of
-today: Deadlock between Republicans and Democrats over how best to
-reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2), (0, 3), (2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.');
-update sto_uao_500cols set a15 = -a15, a150 = 'new value' where id = 3;
-delete from sto_uao_500cols where id = 4;
-select count(*) as visible_tuples from sto_uao_500cols;
- visible_tuples 
-----------------
-              3
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) as all_tuples from sto_uao_500cols;
- all_tuples 
-------------
-          5
-(1 row)
-
-set gp_select_invisible = false;
diff --git a/src/test/regress/expected/uao_ddl/create_ao_tables.out b/src/test/regress/expected/uao_ddl/create_ao_tables.out
deleted file mode 100644
index a551fda741c..00000000000
--- a/src/test/regress/expected/uao_ddl/create_ao_tables.out
+++ /dev/null
@@ -1,325 +0,0 @@
-create schema create_ao_tables_@amname@;
--- start_matchsubs
--- m/DETAIL:  Failing row contains \(.*\)/
--- s/DETAIL:  Failing row contains \(.*\)/DETAIL:  Failing row contains (#####)/
--- end_matchsubs
-set search_path="$user",create_ao_tables_@amname@,public;
-SET default_table_access_method=@amname@;
--- Create Updatable AO tables , with indexes, with and without compression
-BEGIN;
-CREATE TABLE sto_uao_1(
-          col_int int,
-          col_text text,
-          col_numeric numeric,
-          col_unq int
-          ) DISTRIBUTED RANDOMLY;
-Create index sto_uao_1_int_idx1 on sto_uao_1(col_int);
-Create index sto_uao_1_numeric_idx1 on sto_uao_1(col_numeric);
-Create index sto_uao_1_idx2 on sto_uao_1 USING bitmap (col_text);
-SELECT position('pg_ao' in relname) FROM pg_class where oid IN
-(SELECT segrelid FROM pg_appendonly WHERE relid='sto_uao_1'::regclass);
- position 
-----------
-        1
-(1 row)
-
-SELECT position('pg_aoblkdir_' in relname) FROM pg_class where oid IN
-(SELECT blkdirrelid FROM pg_appendonly WHERE relid='sto_uao_1'::regclass);
- position 
-----------
-        1
-(1 row)
-
-SELECT position('pg_aoblkdir_' in relname) FROM pg_class where oid IN
-(SELECT blkdiridxid FROM pg_appendonly WHERE relid='sto_uao_1'::regclass);
- position 
-----------
-        1
-(1 row)
-
-SELECT position('pg_aovisimap_' in relname) FROM pg_class where oid IN
-(SELECT visimaprelid FROM pg_appendonly WHERE relid='sto_uao_1'::regclass);
- position 
-----------
-        1
-(1 row)
-
-SELECT position('pg_aovisimap_' in relname) FROM pg_class where oid IN
-(SELECT visimapidxid FROM pg_appendonly WHERE relid='sto_uao_1'::regclass);
- position 
-----------
-        1
-(1 row)
-
-insert into sto_uao_1 values
- (1,'aa',1001,101), (2,'bb',1002,102), (3,'aa',1003,103),
- (4,'bb',1004,104), (5,'aa',1005,105), (6,'bb',1006,106);
-select * from sto_uao_1 order by col_numeric;
- col_int | col_text | col_numeric | col_unq 
----------+----------+-------------+---------
-       1 | aa       |        1001 |     101
-       2 | bb       |        1002 |     102
-       3 | aa       |        1003 |     103
-       4 | bb       |        1004 |     104
-       5 | aa       |        1005 |     105
-       6 | bb       |        1006 |     106
-(6 rows)
-
-update sto_uao_1 set col_text=' new value' where col_int = 1;
-select * from sto_uao_1 order by col_numeric;
- col_int |  col_text  | col_numeric | col_unq 
----------+------------+-------------+---------
-       1 |  new value |        1001 |     101
-       2 | bb         |        1002 |     102
-       3 | aa         |        1003 |     103
-       4 | bb         |        1004 |     104
-       5 | aa         |        1005 |     105
-       6 | bb         |        1006 |     106
-(6 rows)
-
--- Enforce index usage throughout the test
-set enable_seqscan = off;
-set enable_bitmapscan = on;
--- Create table with all data_types
-Create table sto_uao_2 (id SERIAL, a1 int, a2 char(5), a3 numeric, a4
-boolean DEFAULT false , a5 char DEFAULT 'd', a6 text, a7 timestamp, a8
-character varying(705), a9 bigint, a10 date, a11 varchar(600), a12
-text, a13 decimal, a14 real, a15 bigint, a16 int4 , a17 bytea, a18
-timestamp with time zone, a19 timetz, a20 path, a21 box, a22 macaddr,
-a23 interval, a24 character varying(800), a25 lseg, a26 point, a27
-double precision, a28 circle, a29 int4, a30 numeric(8), a31 polygon,
-a32 date, a33 real, a34 money, a35 cidr, a36 inet, a37 time, a38 text,
-a39 bit, a40 bit varying(5), a41 smallint, a42 int)
- distributed by (a1);
-INSERT INTO sto_uao_2 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
-a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25,
-a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39,
-a40, a41, a42) values(generate_series(1,4), 'M', 2011, 't', 'a', 'This
-is news of today: Deadlock between Republicans and Democrats over how
-best to reduce the U.S. deficit, and over what period, has blocked an
-agreement to allow the raising of the $14.3 trillion debt ceiling',
-'2001-12-24 02:26:11', 'U.S. House of Representatives Speaker John
-Boehner, the top Republican in Congress who has put forward a deficit
-reduction plan to be voted on later on Thursday said he had no control
-over whether his bill would avert a credit downgrade.',
-generate_series(5, 7), '2011-10-11', 'The Republican-controlled House
-is tentatively scheduled to vote on Boehner proposal this afternoon at
-around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the
-House, Kevin McCarthy, would not say if there were enough votes to
-pass the bill.', 'WASHINGTON:House Speaker John Boehner says his plan
-mixing spending cuts in exchange for raising the nations $14.3
-trillion debt limit is not perfect but is as large a step that a
-divided government can take that is doable and signable by President
-Barack Obama.The Ohio Republican says the measure is an honest and
-sincere attempt at compromise and was negotiated with Democrats last
-weekend and that passing it would end the ongoing debt crisis. The
-plan blends $900 billion-plus in spending cuts with a companion
-increase in the nations borrowing cap.', '1234.56', 323453,
-generate_series(4, 6), 7845, '0011', '2005-07-16 01:51:15+1359',
-'2001-12-13 01:51:15', '((1, 2),(0, 3),(2, 1))', '((2, 3)(4, 5))',
-'08:00:2b:01:02:03', '1-2', 'Republicans had been working throughout
-the day Thursday to lock down support for their plan to raise the
-nations debt ceiling, even as Senate Democrats vowed to swiftly kill
-it if passed.', '((2, 3)(4, 5))', '(6, 7)', 11.222, '((4, 5), 7)', 32,
-3214, '(1, 0, 2, 3)', '2010-02-21', 43564, '$1,000.00', '192.168.1',
-'126.1.3.4', '12:30:45', 'Johnson & Johnsons McNeil Consumer
-Healthcare announced the voluntary dosage reduction today. Labels will
-carry new dosing instructions this fall.The company says it will cut
-the maximum dosage of Regular Strength Tylenol and other
-acetaminophen-containing products in 2012.Acetaminophen is safe when
-used as directed, says Edwin Kuffner, MD, McNeil vice president of
-over-the-counter medical affairs. But, when too much is taken, it can
-cause liver damage.The action is intended to cut the risk of such
-accidental overdoses, the company says in a news release.', '1', '0',
-12, 23);
-select count(*) from sto_uao_2 order by 1;
- count 
--------
-     4
-(1 row)
-
--- Create table with constriants
-CREATE TABLE sto_uao_3(
-          col_text text DEFAULT 'text',
-          col_numeric numeric
-          CONSTRAINT tbl_chk_con1 CHECK (col_numeric < 250)
-          ) DISTRIBUTED by(col_text);
-insert into sto_uao_3 values ('0_zero',30);
-insert into sto_uao_3 values ('1_one',10);
-insert into sto_uao_3 values ('2_two',25);
-COMMIT;
--- should fail due to constraint violation
-update sto_uao_3 set col_numeric = 20*col_numeric;
-ERROR:  new row for relation "sto_uao_3" violates check constraint "tbl_chk_con1"  (seg0 172.17.0.2:25432 pid=282592)
-DETAIL:  Failing row contains (0_zero, 600).
-BEGIN;
-update sto_uao_3 set col_numeric = 20+col_numeric;
-select count(*) from sto_uao_3;
- count 
--------
-     3
-(1 row)
-
-delete from sto_uao_3;
-insert into sto_uao_3 values ('2_two',25);
-select count(*) from sto_uao_3;
- count 
--------
-     1
-(1 row)
-
---Create table in user created scehma
-Create schema uao_schema1_@amname@;
-CREATE TABLE uao_schema1_@amname@.sto_uao_5(
-          stud_id int,
-          stud_name varchar(20)
-          ) DISTRIBUTED by(stud_id);
-Insert into uao_schema1_@amname@.sto_uao_5
- values(generate_series(1,20), 'studentname1');
-delete from uao_schema1_@amname@.sto_uao_5;
-Insert into uao_schema1_@amname@.sto_uao_5
- values(generate_series(21, 25), 'studentname2');
-select count(*) from uao_schema1_@amname@.sto_uao_5;
- count 
--------
-     5
-(1 row)
-
--- Truncate, Drop table and index
-CREATE TABLE sto_uao_6 (did integer,
-    name varchar(40),
-    CONSTRAINT con1 CHECK (did > 99 AND name <> '')
-    ) DISTRIBUTED RANDOMLY;
-Create index heap6_idx on sto_uao_6(did);
-insert into sto_uao_6 values (100, 'name_1');
-insert into sto_uao_6 values (200, 'name_2');
-update sto_uao_6 set name = 'new name';
-insert into sto_uao_6 values (300, 'name_3');
-select * from sto_uao_6 where did = 200;
- did |   name   
------+----------
- 200 | new name
-(1 row)
-
-Truncate sto_uao_6;
-select count(*) from sto_uao_6;
- count 
--------
-     0
-(1 row)
-
-insert into sto_uao_6 select i, 'name_'||i from generate_series(501,515)i;
-delete from sto_uao_6 where did > 506;
-select * from sto_uao_6 where did = 504;
- did |   name   
------+----------
- 504 | name_504
-(1 row)
-
-Drop index heap6_idx;
-select * from sto_uao_6 where did = 502;
- did |   name   
------+----------
- 502 | name_502
-(1 row)
-
--- Drop table cascade
-CREATE TABLE sto_uao_7  (did integer,
-    name varchar(40),
-    CONSTRAINT con1 CHECK (did > 99 AND name <> '')
-    ) DISTRIBUTED RANDOMLY;
-Create index heap6_idx on sto_uao_7(did);
-create view v_sto_uao_7 as select * from sto_uao_7;
-insert into sto_uao_7  values (100, 'name_1');
-insert into sto_uao_7  values (200, 'name_2');
-update sto_uao_7 set did = did + 20;
-select * from v_sto_uao_7 order by did;
- did |  name  
------+--------
- 120 | name_1
- 220 | name_2
-(2 rows)
-
-Drop table sto_uao_7 cascade;
-NOTICE:  drop cascades to view v_sto_uao_7
--- Create table as select (CTAS)
-create table sto_uao_8 as select * from sto_uao_1
-distributed by (col_int);
-select count(*) from sto_uao_8;
- count 
--------
-     6
-(1 row)
-
-update sto_uao_8 set col_text = col_text || ' new suffix';
-select sum(length(col_text)) from sto_uao_8;
- sum 
------
-  86
-(1 row)
-
--- Create table as select, with compression
-create table sto_uao_9 with (compresstype=zlib) as
- select * from sto_uao_8 distributed by (col_int);
-select count(*) from sto_uao_9;
- count 
--------
-     6
-(1 row)
-
-update sto_uao_9 set col_numeric = -col_numeric,
- col_text = col_text || ' new suffix';
-select * from sto_uao_9;
- col_int |             col_text             | col_numeric | col_unq 
----------+----------------------------------+-------------+---------
-       5 | aa new suffix new suffix         |       -1005 |     105
-       6 | bb new suffix new suffix         |       -1006 |     106
-       3 | aa new suffix new suffix         |       -1003 |     103
-       4 | bb new suffix new suffix         |       -1004 |     104
-       2 | bb new suffix new suffix         |       -1002 |     102
-       1 |  new value new suffix new suffix |       -1001 |     101
-(6 rows)
-
-delete from sto_uao_9;
-set gp_select_invisible=true;
-select count(*) from sto_uao_9;
- count 
--------
-    12
-(1 row)
-
-set gp_select_invisible=false;
-SELECT 1 AS VisimapPresent FROM pg_appendonly WHERE visimaprelid is not NULL
- AND visimapidxid is not NULL AND relid='sto_uao_9'::regclass;
- visimappresent 
-----------------
-              1
-(1 row)
-
--- Delete using join
-delete from sto_uao_1 a using sto_uao_8 b
- where a.col_int = b.col_int;
-select * from sto_uao_1;
- col_int | col_text | col_numeric | col_unq 
----------+----------+-------------+---------
-(0 rows)
-
-set gp_select_invisible=true;
-select count(*) from sto_uao_1;
- count 
--------
-     7
-(1 row)
-
-set gp_select_invisible=false;
--- Select into
-select * into sto_heap_10 from sto_uao_8;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'col_int' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-select count(*) from sto_heap_10;
- count 
--------
-     6
-(1 row)
-
-COMMIT;
diff --git a/src/test/regress/expected/uao_ddl/cursor.out b/src/test/regress/expected/uao_ddl/cursor.out
deleted file mode 100644
index 472f3517423..00000000000
--- a/src/test/regress/expected/uao_ddl/cursor.out
+++ /dev/null
@@ -1,70 +0,0 @@
-create schema cursor_@amname@;
-set search_path="$user",cursor_@amname@,public;
-SET default_table_access_method=@amname@;
-begin;
-create table uao_tab_cur_1 (a int, b int)
-distributed by (a);
-insert into uao_tab_cur_1 select i,i from generate_series(1,10)i;
-update uao_tab_cur_1 set b = -a;
-declare uao_cursor_1 cursor for select * from uao_tab_cur_1 order by a;
-delete from uao_tab_cur_1 where a > 5;
-fetch next in uao_cursor_1;
- a | b  
----+----
- 1 | -1
-(1 row)
-
-fetch next in uao_cursor_1;
- a | b  
----+----
- 2 | -2
-(1 row)
-
-fetch next in uao_cursor_1;
- a | b  
----+----
- 3 | -3
-(1 row)
-
-fetch next in uao_cursor_1;
- a | b  
----+----
- 4 | -4
-(1 row)
-
-fetch next in uao_cursor_1;
- a | b  
----+----
- 5 | -5
-(1 row)
-
-fetch next in uao_cursor_1;
- a | b  
----+----
- 6 | -6
-(1 row)
-
-close uao_cursor_1;
-commit;
-begin;
-declare uao_cursor_2 cursor for select * from uao_tab_cur_1 order by b;
-fetch 1 from uao_cursor_2;
- a | b  
----+----
- 5 | -5
-(1 row)
-
--- Should fail
-update uao_tab_cur_1 set b = a where current of uao_cursor_2;
-ERROR:  "uao_tab_cur_1" is not simply updatable
-end;
-select * from uao_tab_cur_1;
- a | b  
----+----
- 1 | -1
- 2 | -2
- 3 | -3
- 4 | -4
- 5 | -5
-(5 rows)
-
diff --git a/src/test/regress/expected/uao_ddl/spgist_over_ao_table.out b/src/test/regress/expected/uao_ddl/spgist_over_ao_table.out
deleted file mode 100644
index aeb3be5d7fc..00000000000
--- a/src/test/regress/expected/uao_ddl/spgist_over_ao_table.out
+++ /dev/null
@@ -1,36 +0,0 @@
---
--- Check spgist index work with AO tables
---
-create schema spgist_over_ao_table@amname@;
-set search_path="$user",spgist_over_ao_table@amname@,public;
-set default_table_access_method='@amname@';
--- insert to AO table with spgist index
-create table spgist_ins_uao(idx_col int4range)
-with (appendonly=true);
-create index spgist_ins_uao_idx on spgist_ins_uao
-using spgist(idx_col);
---insert should not fall with spgutils.c:724 assertion
-insert into spgist_ins_uao
-select int4range(i, i, '[]')
-from generate_series(0,10000) i;
--- update to AO table with spgist index
-create table spgist_upd_uao(idx_col int4range)
-with (appendonly=true);
-insert into spgist_upd_uao
-select int4range(i, i, '[]')
-from generate_series(0,10000) i;
-create index spgist_upd_uao_idx on spgist_upd_uao
-using spgist(idx_col);
---update should not fall with spgutils.c:724 assertion
-update spgist_upd_uao set idx_col = int4range(1, 2, '[]');
--- copy to AO table with spgist index
-create table spgist_copy_uao(idx_col int4range)
-with (appendonly=true);
-insert into spgist_copy_uao
-select int4range(i, i, '[]')
-from generate_series(0,10000) i;
-create index spgist_copy_uao_idx on spgist_copy_uao
-using spgist(idx_col);
-copy spgist_copy_uao to '/tmp/spgist_test';
---copy should not fall with spgutils.c:724 assertion or any segment failures
-copy spgist_copy_uao from '/tmp/spgist_test';
diff --git a/src/test/regress/expected/uao_ddl/temp_on_commit_delete_rows.out b/src/test/regress/expected/uao_ddl/temp_on_commit_delete_rows.out
deleted file mode 100644
index e1b73f4ffeb..00000000000
--- a/src/test/regress/expected/uao_ddl/temp_on_commit_delete_rows.out
+++ /dev/null
@@ -1,98 +0,0 @@
-create schema temp_on_commit_delete_rows_@amname@;
-set search_path="$user",temp_on_commit_delete_rows_@amname@,public;
-SET default_table_access_method=@amname@;
---
--- Test ON COMMIT DELETE ROWS action against AO/AOCS tables.
---
-create function nonempty_segno(oid) returns setof int as 
-$$
--- Input to this function must be oid and not table name.  A distinct
--- query fails to find the temp table in the right namespace
--- otherwise.
-select segno from gp_toolkit.__gp_@aoseg@($1::regclass::text)
- where tupcount > 0;
-$$ language sql;
-begin;
-create temp table temp_delrows(a int, b int)
- on commit delete rows distributed by(a);
-insert into temp_delrows select i, i from generate_series(1,20)i;
-create index idelrows on temp_delrows using bitmap(a);
-update temp_delrows set b = -a;
--- Aoseg table should report at least one non-empty segfile.
-select distinct nonempty_segno('temp_delrows'::regclass);
- nonempty_segno 
-----------------
-              0
-(1 row)
-
-select distinct nonempty_segno('temp_delrows'::regclass)
- from gp_dist_random('gp_id');
- nonempty_segno 
-----------------
-              0
-(1 row)
-
-commit;
-select count(*) = 0 as passed from temp_delrows;
- passed 
---------
- t
-(1 row)
-
--- All segfiles must be empty after commit.
-select nonempty_segno('temp_delrows'::regclass);
- nonempty_segno 
-----------------
-(0 rows)
-
-select nonempty_segno('temp_delrows'::regclass)
- from gp_dist_random('gp_id');
- nonempty_segno 
-----------------
-(0 rows)
-
--- DML after delete rows action.
-begin;
-insert into temp_delrows select i, i from generate_series(1,50)i;
-delete from temp_delrows where a > 25;
-select count(*) = 25 as passed from temp_delrows;
- passed 
---------
- t
-(1 row)
-
--- Abort should leave no tuples in the table.
-abort;
-select count(*) = 0 as passed from temp_delrows;
- passed 
---------
- t
-(1 row)
-
--- No begin/end block, each insert is a separate transaction
-insert into temp_delrows values (1,1), (2,2), (3,3);
-select count(*) = 0 as passed from temp_delrows;
- passed 
---------
- t
-(1 row)
-
-insert into temp_delrows select i,i from generate_series(1,10)i;
-select count(*) = 0 as passed from temp_delrows;
- passed 
---------
- t
-(1 row)
-
--- All segfiles must be empty after commit.
-select nonempty_segno('temp_delrows'::regclass);
- nonempty_segno 
-----------------
-(0 rows)
-
-select nonempty_segno('temp_delrows'::regclass)
- from gp_dist_random('gp_id');
- nonempty_segno 
-----------------
-(0 rows)
-
diff --git a/src/test/regress/expected/uao_ddl/uao_allalter.out b/src/test/regress/expected/uao_ddl/uao_allalter.out
deleted file mode 100644
index 9895a6ef060..00000000000
--- a/src/test/regress/expected/uao_ddl/uao_allalter.out
+++ /dev/null
@@ -1,228 +0,0 @@
-create schema uao_allalter_@amname@;
-set search_path="$user",uao_allalter_@amname@,public;
-SET default_table_access_method=@amname@;
---
--- alter add all types of columns
---
-BEGIN;
-set time zone PST8PDT;
-CREATE TABLE uao_allalter ( 
- id SERIAL) distributed randomly ;
--- Alter all kinds of columns
-Alter table uao_allalter ADD COLUMN a1 int default 10;
-Alter table uao_allalter ADD COLUMN a2 char(5) default 'asdf';
-Alter table uao_allalter ADD COLUMN a3 numeric default 3.14;
-Alter table uao_allalter ADD COLUMN a4 boolean DEFAULT false ;
-Alter table uao_allalter ADD COLUMN a5 char DEFAULT 'd';
-Alter table uao_allalter ADD COLUMN a6 text default 'some default value';
-Alter table uao_allalter ADD COLUMN a7 timestamp default '2003-10-21 02:26:11';
-Alter table uao_allalter ADD COLUMN a8 character varying(705) default 'asdsdsfdsnfdsnafkndasfdsajfldsjafdsbfjdsbfkdsjf';
-Alter table uao_allalter ADD COLUMN a9 bigint default 2342;
-Alter table uao_allalter ADD COLUMN a10 date default '1989-11-12';
-Alter table uao_allalter ADD COLUMN a11 varchar(600) default 'ksdhfkdshfdshfkjhdskjfhdshflkdshfhdsfkjhds';
-Alter table uao_allalter ADD COLUMN a12 text default 'mnsbfsndlsjdflsjasdjhhsafhshfsljlsahfkshalsdkfks';
-Alter table uao_allalter ADD COLUMN a13 decimal default 4.123;
-Alter table uao_allalter ADD COLUMN a14 real default 23232;
-Alter table uao_allalter ADD COLUMN a15 bigint default 2342;
-Alter table uao_allalter ADD COLUMN a16 int4 default 2342;
-Alter table uao_allalter ADD COLUMN a17 bytea default '0011';
-Alter table uao_allalter ADD COLUMN a18 timestamp with time zone default '1995-07-16 01:51:15+1359';
-Alter table uao_allalter ADD COLUMN a19 timetz default '1991-12-13 01:51:15';
-Alter table uao_allalter ADD COLUMN a20 path default '((6,7),(4,5),(2,1))';
-Alter table uao_allalter ADD COLUMN a21 box default '((1,3)(4,6))';
-Alter table uao_allalter ADD COLUMN a22 macaddr default '09:00:3b:01:02:03';
-Alter table uao_allalter ADD COLUMN a23 interval default '5-7';
-Alter table uao_allalter ADD COLUMN a24 character varying(800) default 'jdgfkasdksahkjcskgcksgckdsfkdslfhksagfksajhdjag';
-Alter table uao_allalter ADD COLUMN a25 lseg default '((1,2)(2,3))';
-Alter table uao_allalter ADD COLUMN a26 point default '(3,4)';
-Alter table uao_allalter ADD COLUMN a27 double precision default 12.211;
-Alter table uao_allalter ADD COLUMN a28 circle default '((2,3),4)';
-Alter table uao_allalter ADD COLUMN a29 int4 default 37;
-Alter table uao_allalter ADD COLUMN a30 numeric(8) default 3774;
-Alter table uao_allalter ADD COLUMN a31 polygon default '(1,5,4,3)';
-Alter table uao_allalter ADD COLUMN a32 date default '1988-02-21';
-Alter table uao_allalter ADD COLUMN a33 real default 41114;
-Alter table uao_allalter ADD COLUMN a34 money default '$7,222.00';
-Alter table uao_allalter ADD COLUMN a35 cidr default '192.167.2';
-Alter table uao_allalter ADD COLUMN a36 inet default '126.2.3.4';
-Alter table uao_allalter ADD COLUMN a37 time default '10:31:45';
-Alter table uao_allalter ADD COLUMN a38 text default 'sdhjfsfksfkjskjfksjfkjsdfkjdshkjfhdsjkfkjsd';
-Alter table uao_allalter ADD COLUMN a39 bit default '0';
-Alter table uao_allalter ADD COLUMN a40 bit varying(5) default '1';
-Alter table uao_allalter ADD COLUMN a41 smallint default 12;
-Alter table uao_allalter ADD COLUMN a42 int default 2323;
---
--- Insert data to the table
---
-INSERT INTO uao_allalter(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42)
-select g % 20 + 1  as a1,
-       'M'   as a2,
-       2011  as a3,
-       't'   as a4,
-       'a'   as a5,
-       'This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling' as a6,
-       '2001-12-24 02:26:11' as a7,
-       'U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.' as a8,
-       g % 16 + 2490 as a9,
-       '2011-10-11' as a10,
-       'The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.' as a11,
-       'WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in [...]
-       '1234.56' as a13,
-       323453 as a14,
-       g % 11 + 3452 as a15,
-       7845 as a16,
-       '0011' as a17,
-       '2005-07-16 01:51:15+1359' as a18,
-       '2001-12-13 01:51:15' as a19,
-       '((1,2),(0,3),(2,1))' as a20,
-       '((2,3)(4,5))' as a21,
-       '08:00:2b:01:02:03' as a22,
-       '1-2' as a23,
-       'Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.' as a24,
-       '((2,3)(4,5))' as a25,
-       '(6,7)' as a26,
-       11.222 as a27,
-       '((4,5),7)' as a28,
-       32 as a29,
-       3214 as a30,
-       '(1,0,2,3)' as a31,
-       '2010-02-21' as a32,
-       43564 as a33,
-       '$1,000.00' as a34,
-       '192.168.1' as a35,
-       '126.1.3.4' as a36,
-       '12:30:45' as a37,
-       'Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to c [...]
-       '1' as a39,
-       '0' as a40,
-       12 as a41,
-       23 as a42
-from generate_series(0,879) as g;
---
---Alter table set distributed by 
-ALTER table uao_allalter set with ( reorganize='true') distributed by (a1);
--- Create Uncompressed table of same schema definition
-CREATE TABLE uao_allalter_uncompr (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35  [...]
---
--- Insert the same data to the uncompressed table
---
-INSERT INTO uao_allalter_uncompr(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42)
-select g % 20 + 1  as a1,
-       'M'   as a2,
-       2011  as a3,
-       't'   as a4,
-       'a'   as a5,
-       'This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling' as a6,
-       '2001-12-24 02:26:11' as a7,
-       'U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.' as a8,
-       g % 16 + 2490 as a9,
-       '2011-10-11' as a10,
-       'The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.' as a11,
-       'WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in [...]
-       '1234.56' as a13,
-       323453 as a14,
-       g % 11 + 3452 as a15,
-       7845 as a16,
-       '0011' as a17,
-       '2005-07-16 01:51:15+1359' as a18,
-       '2001-12-13 01:51:15' as a19,
-       '((1,2),(0,3),(2,1))' as a20,
-       '((2,3)(4,5))' as a21,
-       '08:00:2b:01:02:03' as a22,
-       '1-2' as a23,
-       'Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.' as a24,
-       '((2,3)(4,5))' as a25,
-       '(6,7)' as a26,
-       11.222 as a27,
-       '((4,5),7)' as a28,
-       32 as a29,
-       3214 as a30,
-       '(1,0,2,3)' as a31,
-       '2010-02-21' as a32,
-       43564 as a33,
-       '$1,000.00' as a34,
-       '192.168.1' as a35,
-       '126.1.3.4' as a36,
-       '12:30:45' as a37,
-       'Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to c [...]
-       '1' as a39,
-       '0' as a40,
-       12 as a41,
-       23 as a42
-from generate_series(0,879) as g;
---
--- Select number of rows from the uncompressed table 
---
-SELECT count(*) as count_uncompressed from  uao_allalter_uncompr ;
- count_uncompressed 
---------------------
-                880
-(1 row)
-
---
--- Select number of rows from the compressed table 
---
-SELECT count(*) as count_compressed from  uao_allalter;
- count_compressed 
-------------------
-              880
-(1 row)
-
---
--- Select number of rows using a FULL outer join on all the columns of the two tables 
--- Count should match with above result if the all the rows uncompressed correctly: 
---
-Select count(*) as count_join from uao_allalter t1 full outer join uao_allalter_uncompr t2 on t1.id=t2.id and t1.a1=t2.a1 and t1.a2=t2.a2 and t1.a3=t2.a3 and t1.a4=t2.a4 and t1.a5=t2.a5 and t1.a6=t2.a6 and t1.a7=t2.a7 and t1.a8=t2.a8 and t1.a9=t2.a9 and t1.a10=t2.a10 and t1.a11=t2.a11 and t1.a12=t2.a12 and t1.a13=t2.a13 and t1.a14=t2.a14 and t1.a15=t2.a15 and t1.a16=t2.a16 and t1.a17=t2.a17 and t1.a18=t2.a18 and t1.a19=t2.a19 and t1.a22=t2.a22 and t1.a23=t2.a23 and t1.a24=t2.a24 and t1.a [...]
- count_join 
-------------
-        880
-(1 row)
-
---
--- Truncate the table 
---
-TRUNCATE table uao_allalter;
---
--- Insert data again 
---
-insert into uao_allalter select * from uao_allalter_uncompr order by a1;
---
--- Select the data: Using the JOIN as mentioned above 
---
-Select count(*) as count_join from uao_allalter t1 full outer join uao_allalter_uncompr t2 on t1.id=t2.id and t1.a1=t2.a1 and t1.a2=t2.a2 and t1.a3=t2.a3 and t1.a4=t2.a4 and t1.a5=t2.a5 and t1.a6=t2.a6 and t1.a7=t2.a7 and t1.a8=t2.a8 and t1.a9=t2.a9 and t1.a10=t2.a10 and t1.a11=t2.a11 and t1.a12=t2.a12 and t1.a13=t2.a13 and t1.a14=t2.a14 and t1.a15=t2.a15 and t1.a16=t2.a16 and t1.a17=t2.a17 and t1.a18=t2.a18 and t1.a19=t2.a19 and t1.a22=t2.a22 and t1.a23=t2.a23 and t1.a24=t2.a24 and t1.a [...]
- count_join 
-------------
-        880
-(1 row)
-
---Alter table alter type of a column 
-Alter table uao_allalter Alter column a3 TYPE int4; 
---Insert data to the table, select count(*)
-Insert into uao_allalter(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42 from uao_allalter where id =10;
-Select count(*) from uao_allalter; 
- count 
--------
-   881
-(1 row)
-
---Alter table drop a column 
-Alter table uao_allalter Drop column a12; 
-Insert into uao_allalter(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42 from uao_allalter where id =10;
-Select count(*) from uao_allalter; 
- count 
--------
-   882
-(1 row)
-
---Alter table rename a column 
-Alter table uao_allalter Rename column a13 TO after_rename_a13; 
---Insert data to the table, select count(*)
-Insert into uao_allalter(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,after_rename_a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,after_rename_a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42 from uao_allalter where id =10;
-Select count(*) from uao_allalter; 
- count 
--------
-   883
-(1 row)
-
-update uao_allalter set  a9 = a9 + 10 where a1 = 10;
-COMMIT;
diff --git a/src/test/regress/expected/uao_dml/.gitignore b/src/test/regress/expected/uao_dml/.gitignore
new file mode 100644
index 00000000000..f47cb2045f1
--- /dev/null
+++ b/src/test/regress/expected/uao_dml/.gitignore
@@ -0,0 +1 @@
+*.out
diff --git a/src/test/regress/expected/uao_dml/GENERATE_ROW_AND_COLUMN_FILES b/src/test/regress/expected/uao_dml/GENERATE_ROW_AND_COLUMN_FILES
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/src/test/regress/expected/uao_dml/ao_unique_index_build.out b/src/test/regress/expected/uao_dml/ao_unique_index_build.out
deleted file mode 100644
index 734d4903c0f..00000000000
--- a/src/test/regress/expected/uao_dml/ao_unique_index_build.out
+++ /dev/null
@@ -1,152 +0,0 @@
--- Test cases to cover CREATE UNIQUE INDEX on AO/CO tables.
-SET default_table_access_method TO @amname@;
--- To force index scans for smoke tests
-SET enable_seqscan TO off;
-SET optimizer TO off;
--- Case 1: Build with no conflicting rows.
-CREATE TABLE unique_index_build_@amname@(i int) DISTRIBUTED REPLICATED;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
--- should succeed
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i);
--- post-build smoke test
-EXPLAIN SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
-                                             QUERY PLAN                                             
-----------------------------------------------------------------------------------------------------
- Gather Motion 1:1  (slice1; segments: 1)  (cost=8.19..8.19 rows=1 width=4)
-   ->  Bitmap Heap Scan on unique_index_build_@amname@  (cost=4.18..8.19 rows=1 width=4)
-         Recheck Cond: (i = 1)
-         ->  Bitmap Index Scan on unique_index_build_@amname@_i_idx  (cost=0.00..4.18 rows=1 width=0)
-               Index Cond: (i = 1)
- Optimizer: Postgres query optimizer
-(6 rows)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
- i 
----
- 1
-(1 row)
-
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-ERROR:  duplicate key value violates unique constraint "unique_index_build_@amname@_i_idx"  (seg0 192.168.0.148:7002 pid=1421591)
-DETAIL:  Key (i)=(1) already exists.
-DROP TABLE unique_index_build_@amname@;
--- Case 2: Build with conflicting row.
-CREATE TABLE unique_index_build_@amname@(i int) DISTRIBUTED REPLICATED;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-INSERT INTO unique_index_build_@amname@ VALUES(1);
--- should ERROR out
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i);
-ERROR:  could not create unique index "unique_index_build_@amname@_i_idx"  (seg0 192.168.0.148:7002 pid=1421591)
-DETAIL:  Key (i)=(1) is duplicated.
-DROP TABLE unique_index_build_@amname@;
--- Case 3: Build with conflict on aborted row.
-CREATE TABLE unique_index_build_@amname@(i int) DISTRIBUTED REPLICATED;
-BEGIN;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-ABORT;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
--- should succeed
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i);
--- post-build smoke test
-EXPLAIN SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
-                                             QUERY PLAN                                             
-----------------------------------------------------------------------------------------------------
- Gather Motion 1:1  (slice1; segments: 1)  (cost=8.19..8.19 rows=1 width=4)
-   ->  Bitmap Heap Scan on unique_index_build_@amname@  (cost=4.18..8.19 rows=1 width=4)
-         Recheck Cond: (i = 1)
-         ->  Bitmap Index Scan on unique_index_build_@amname@_i_idx  (cost=0.00..4.18 rows=1 width=0)
-               Index Cond: (i = 1)
- Optimizer: Postgres query optimizer
-(6 rows)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
- i 
----
- 1
-(1 row)
-
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-ERROR:  duplicate key value violates unique constraint "unique_index_build_@amname@_i_idx"  (seg0 192.168.0.148:7002 pid=1421591)
-DETAIL:  Key (i)=(1) already exists.
-DROP TABLE unique_index_build_@amname@;
--- Case 4: Build with conflict on deleted row.
-CREATE TABLE unique_index_build_@amname@(i int) DISTRIBUTED REPLICATED;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-DELETE FROM unique_index_build_@amname@;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
--- should succeed
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i);
--- post-build smoke test
-EXPLAIN SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
-                                             QUERY PLAN                                             
-----------------------------------------------------------------------------------------------------
- Gather Motion 1:1  (slice1; segments: 1)  (cost=8.19..8.19 rows=1 width=4)
-   ->  Bitmap Heap Scan on unique_index_build_@amname@  (cost=4.18..8.19 rows=1 width=4)
-         Recheck Cond: (i = 1)
-         ->  Bitmap Index Scan on unique_index_build_@amname@_i_idx  (cost=0.00..4.18 rows=1 width=0)
-               Index Cond: (i = 1)
- Optimizer: Postgres query optimizer
-(6 rows)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
- i 
----
- 1
-(1 row)
-
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-ERROR:  duplicate key value violates unique constraint "unique_index_build_@amname@_i_idx"  (seg0 192.168.0.148:7002 pid=1421591)
-DETAIL:  Key (i)=(1) already exists.
-DROP TABLE unique_index_build_@amname@;
--- Case 5: Partial unique index build
-CREATE TABLE unique_index_build_@amname@(i int) DISTRIBUTED REPLICATED;
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-INSERT INTO unique_index_build_@amname@ VALUES(1);
-INSERT INTO unique_index_build_@amname@ VALUES(2);
-INSERT INTO unique_index_build_@amname@ VALUES(6);
-INSERT INTO unique_index_build_@amname@ VALUES(6);
--- should fail as conflict lies in indexed portion of data
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i) WHERE i < 5;
-ERROR:  could not create unique index "unique_index_build_@amname@_i_idx"  (seg0 192.168.0.148:7002 pid=3690142)
-DETAIL:  Key (i)=(1) is duplicated.
--- removing conflict should make index build succeed
-DELETE FROM unique_index_build_@amname@ WHERE i = 1;
-CREATE UNIQUE INDEX on unique_index_build_@amname@(i) WHERE i < 5;
--- post build smoke tests:
--- should succeed as it lies in non-indexed portion
-INSERT INTO unique_index_build_@amname@ VALUES(6);
--- should fail as conflict lies in indexed portion of data
-INSERT INTO unique_index_build_@amname@ VALUES(2);
-ERROR:  duplicate key value violates unique constraint "unique_index_build_@amname@_i_idx"  (seg1 192.168.0.148:7003 pid=3690143)
-DETAIL:  Key (i)=(2) already exists.
--- should succeed as there is no conflicting key that exists
-INSERT INTO unique_index_build_@amname@ VALUES(3);
-SELECT * FROM unique_index_build_@amname@ WHERE i = 1;
- i 
----
-(0 rows)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 2;
- i 
----
- 2
-(1 row)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 3;
- i 
----
- 3
-(1 row)
-
-SELECT * FROM unique_index_build_@amname@ WHERE i = 6;
- i 
----
- 6
- 6
- 6
-(3 rows)
-
-DROP TABLE unique_index_build_@amname@;
-RESET default_table_access_method;
-RESET enable_seqscan;
-RESET optimizer;
diff --git a/src/test/regress/expected/uao_dml/uao_dml.out b/src/test/regress/expected/uao_dml/uao_dml.out
deleted file mode 100644
index 49963db03e7..00000000000
--- a/src/test/regress/expected/uao_dml/uao_dml.out
+++ /dev/null
@@ -1,1944 +0,0 @@
-create schema uao_dml_@amname@;
-set search_path=uao_dml_@amname@;
-set default_table_access_method=@amname@;
--- Some of the UPDATE commands in this test fail with ORCA, with an error:
--- ERROR:  multiple updates to a row by the same query is not allowed
--- The queries in this test are not interesting from the point of view of
--- testing the optimizer, so just disable ORCA to work around that.
-set optimizer=off;
--- With gp_select_invisible set true, the snapshot will be SnapshotAnyData.
--- But in one case of IndexOnlyScan, only MVCC snapshots are supported.
--- So we disable IndexOnlyScan here, as what we want to test is gp_select_invisible.
-set enable_indexonlyscan=off;
--- @Description Tests basic delete feature with two AO blocks
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    10
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo;
- count 
--------
-     7
-(1 row)
-
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(11,20) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    17
-(1 row)
-
-DELETE FROM foo WHERE a = 16;
-DELETE FROM foo WHERE a = 17;
-SELECT a FROM foo WHERE a > 10;
- a  
-----
- 11
- 13
- 15
- 19
- 12
- 14
- 18
- 20
-(8 rows)
-
--- @Description Tests the delete feature with two visimap entries and delete jumping
--- between them.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c 
-	FROM generate_series(1, 100000) AS i;
-SELECT COUNT(*) FROM foo;
- count  
---------
- 100000
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo;
- count 
--------
- 99997
-(1 row)
-
-BEGIN;
-DELETE FROM foo WHERE a = 99962;
-DELETE FROM foo WHERE a = 5;
-DELETE FROM foo WHERE a = 99964;
-DELETE FROM foo WHERE a = 42;
-DELETE FROM foo WHERE a IN (6, 97000, 99, 1700, 99980);
-SELECT a, b FROM foo WHERE a >= 99960 AND a < 99970;
-   a   |   b   
--------+-------
- 99960 | 99960
- 99961 | 99961
- 99963 | 99963
- 99965 | 99965
- 99966 | 99966
- 99967 | 99967
- 99968 | 99968
- 99969 | 99969
-(8 rows)
-
-SELECT a, b FROM foo WHERE a < 10;
- a | b 
----+---
- 4 | 4
- 7 | 7
- 8 | 8
- 9 | 9
-(4 rows)
-
-ROLLBACK;
--- @Description Checks analyze behavior w.r.t. to statistics
--- 
-DROP TABLE IF EXISTS ao2_@amname@;
-create table ao2_@amname@ (i int, j varchar(10)) distributed by (i);
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-analyze ao2_@amname@;
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        10
-(1 row)
-
-select count(*)  from ao2_@amname@;
- count 
--------
-    10
-(1 row)
-
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-select count(*)  from ao2_@amname@;
- count 
--------
-    20
-(1 row)
-
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        10
-(1 row)
-
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        10
-(1 row)
-
-select count(*)  from ao2_@amname@;
- count 
--------
-    30
-(1 row)
-
-delete from ao2_@amname@ where i < 27;
--- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one
-select pg_sleep(0.6);
- pg_sleep 
-----------
- 
-(1 row)
-
-analyze ao2_@amname@;
-select count(*)  from ao2_@amname@;
- count 
--------
-    12
-(1 row)
-
--- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one
-select pg_sleep(0.6);
- pg_sleep 
-----------
- 
-(1 row)
-
-select pg_stat_get_live_tuples(c.oid) as livetuples, pg_stat_get_dead_tuples(c.oid) as deadtuples 
-from pg_class c 
-where relname = 'ao2_@amname@';
- livetuples | deadtuples 
-------------+------------
-         12 |         18
-(1 row)
-
--- @Description Tests delete on compressed ao tables
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128)) WITH (compresstype = zlib, compresslevel=3);
-INSERT INTO FOO VALUES (1, 1, 'c');
-SELECT * FROM foo;
- a | b |                                                                c                                                                 
----+---+----------------------------------------------------------------------------------------------------------------------------------
- 1 | 1 | c                                                                                                                               
-(1 row)
-
-DELETE FROM foo;
-SELECT * FROM foo;
- a | b | c 
----+---+---
-(0 rows)
-
--- @Description Tests that aborting a delete works as expected.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    10
-(1 row)
-
-BEGIN;
-DELETE FROM foo WHERE a = 10;
-SELECT COUNT(*) FROM foo;
- count 
--------
-     9
-(1 row)
-
-ROLLBACK;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    10
-(1 row)
-
--- @description Tests AO delete with a merge join
--- 
-drop table if exists foo;
-drop table if exists bar;
-CREATE TABLE foo (a INT, b int, c int, d int);
-CREATE TABLE bar (a INT, b int, c int, d int);
-INSERT INTO foo SELECT i as a,i,i,i  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a,i,i,i  FROM generate_series(1, 100000) AS i;
-set enable_hashjoin=off;
-set enable_nestloop=off;
-set enable_seqscan=off;
-set enable_bitmapscan=off;
-set enable_mergejoin=on;
-DELETE FROM foo using BAR WHERE foo.a = bar.a AND foo.b = bar.b AND foo.c = bar.c AND foo.d = bar.d;
-reset enable_hashjoin;
-reset enable_nestloop;
-reset enable_seqscan;
-reset enable_bitmapscan;
-reset enable_mergejoin;
--- @Description Tests that delete in a serializable transaction is not supported
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-DELETE FROM foo WHERE a < 4;
-ERROR:  deletes on append-only tables are not supported in serializable transactions  (seg0 gesameistd1m1.corp.emc.com:40000 pid=96582)
-ROLLBACK;
--- @Description Tests that update in a serializable transaction is not supported
--- 
-BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-UPDATE foo SET b = 1 WHERE a < 4;
-ERROR:  updates on append-only tables are not supported in serializable transactions  (seg0 gesameistd1m1.corp.emc.com:40000 pid=73392)
-ROLLBACK;
--- @Description Tests that delete in a serializable transaction is not supported
--- even in a subtransaction.
--- 
-BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-SAVEPOINT my_savepoint;
-DELETE FROM foo WHERE a < 4;
-ERROR:  deletes on append-only tables are not supported in serializable transactions  (seg0 gesameistd1m1.corp.emc.com:40000 pid=96582)
-ROLLBACK;
--- @Description Tests that update in a serializable transaction is not supported
--- even in a subtransaction.
--- 
-BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-SAVEPOINT my_savepoint;
-UPDATE foo SET b = 1 WHERE a < 4;
-ERROR:  updates on append-only tables are not supported in serializable transactions  (seg0 gesameistd1m1.corp.emc.com:40000 pid=73392)
-ROLLBACK;
--- @Description Tests that delete with sub transactions
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,100) AS i;
-BEGIN;
-SAVEPOINT my_savepoint;
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    97
-(1 row)
-
-ROLLBACK TO SAVEPOINT my_savepoint;
-SELECT COUNT(*) FROM foo;
- count 
--------
-   100
-(1 row)
-
-COMMIT;
-BEGIN;
-SELECT COUNT(*) FROM foo;
- count 
--------
-   100
-(1 row)
-
-DELETE FROM foo WHERE a < 10;
-SAVEPOINT my_savepoint2;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    91
-(1 row)
-
-ROLLBACK TO SAVEPOINT my_savepoint2;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    91
-(1 row)
-
-COMMIT;
-BEGIN;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    91
-(1 row)
-
-SAVEPOINT my_savepoint3;
-DELETE FROM foo WHERE a < 20;
-SAVEPOINT my_savepoint4;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    81
-(1 row)
-
-ROLLBACK TO SAVEPOINT my_savepoint3;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    91
-(1 row)
-
-COMMIT;
--- @Description Tests that deleting the same tuple twice within the same
--- commands works fine.
--- 
-DROP TABLE IF EXISTS foo;
-DROP TABLE IF EXISTS bar;
-CREATE TABLE foo (a INT);
-INSERT INTO foo VALUES (1);
-CREATE TABLE bar (a INT);
-INSERT INTO bar VALUES (1);
-INSERT INTO bar VALUES (1);
-SELECT * FROM foo;
- a 
----
- 1
-(1 row)
-
-DELETE FROM foo USING bar WHERE foo.a = bar.a;
-SELECT * FROM foo;
- a 
----
-(0 rows)
-
--- @Description Tests that deleting tuples twice is handled as expected.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-  1000
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo;
- count 
--------
-   997
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo;
- count 
--------
-   997
-(1 row)
-
--- @Description Tests that deleting the same tuple twice within the same
--- commands works fine.
--- 
-DROP TABLE IF EXISTS foo;
-DROP TABLE IF EXISTS bar;
-CREATE TABLE foo (a INT, b INT);
-INSERT INTO foo VALUES (10, 10);
-CREATE TABLE bar (a INT, b INT);
-INSERT INTO bar VALUES (15, 10);
-INSERT INTO bar VALUES (20, 10);
-SELECT * FROM foo;
- a  | b  
-----+----
- 10 | 10
-(1 row)
-
-UPDATE foo SET b = bar.a FROM bar WHERE foo.b = bar.b;
-set gp_select_invisible = false;
-SELECT count(*) as only_visible FROM foo;
- only_visible 
---------------
-            1
-(1 row)
-
-set gp_select_invisible = true;
-SELECT count(*) as visible_and_invisible FROM foo;
- visible_and_invisible 
------------------------
-                     2
-(1 row)
-
-set gp_select_invisible = false;
--- @Description Checks if gp_autostats gucs are correctly handled
--- 
-DROP TABLE IF EXISTS ao2_@amname@;
-create table ao2_@amname@ (i int, j varchar(10)) distributed by (i);
-set gp_autostats_on_change_threshold=1;
-set gp_autostats_mode=on_change;
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        10
-(1 row)
-
-select count(*)  from ao2_@amname@;
- count 
--------
-    10
-(1 row)
-
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-select count(*)  from ao2_@amname@;
- count 
--------
-    20
-(1 row)
-
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        20
-(1 row)
-
-insert into ao2_@amname@ select i,'aa'||i from generate_series(21,30) as i;
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        30
-(1 row)
-
-select count(*)  from ao2_@amname@;
- count 
--------
-    30
-(1 row)
-
-delete from ao2_@amname@ where i < 27;
-select count(*)  from ao2_@amname@;
- count 
--------
-    12
-(1 row)
-
-select reltuples from pg_class where relname = 'ao2_@amname@';
- reltuples 
------------
-        12
-(1 row)
-
-reset gp_autostats_on_change_threshold;
-reset gp_autostats_mode;
--- @Description Tests that gp_select_invisible is handled correctly with row append-only.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(11,20) AS i;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(21,30) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    30
-(1 row)
-
-SET gp_select_invisible=true;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    30
-(1 row)
-
-SET gp_select_invisible=false;
--- @Description Tests that gp_select_invisible is working correctly on AO tables
--- with an index.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-CREATE INDEX foo_index2 ON foo(a);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1001,2000) AS i;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(2001,3000) AS i;
--- Force the usage of the index
-SET enable_seqscan=false;
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     3
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     0
-(1 row)
-
-SET gp_select_invisible=true;
--- Should display all tuples
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     3
-(1 row)
-
--- Now an interesting case where we update with gp_select_invisible active
-UPDATE foo SET b = 0 WHERE a < 5;
--- We should not re-activate the deleted tuples
-SET gp_select_invisible=false;
-SELECT COUNT(*) FROM foo WHERE b = 0;
- count 
--------
-     1
-(1 row)
-
--- Now the same re-activation test with update
-SET gp_select_invisible=true;
-UPDATE foo SET b = -1 WHERE a = 4;
-SET gp_select_invisible=false;
-SELECT COUNT(*) FROM foo WHERE a = 4;
- count 
--------
-     1
-(1 row)
-
-RESET enable_seqscan;
--- @Description Tests that gp_select_invisible is handled correctly with UAO
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     3
-(1 row)
-
-DELETE FROM foo WHERE a < 4;
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     0
-(1 row)
-
-SET gp_select_invisible=true;
--- Should display all tuples
-SELECT COUNT(*) FROM foo WHERE a < 4;
- count 
--------
-     3
-(1 row)
-
--- Now an interesting case where we update with gp_select_invisible active
-UPDATE foo SET b = 0 WHERE a < 5;
--- We should not re-activate the deleted tuples
-SET gp_select_invisible=false;
-SELECT COUNT(*) FROM foo WHERE b = 0;
- count 
--------
-     1
-(1 row)
-
--- Now the same re-activation test with update
-SET gp_select_invisible=true;
-UPDATE foo SET b = -1 WHERE a = 4;
-SET gp_select_invisible=false;
-SELECT COUNT(*) FROM foo WHERE a = 4;
- count 
--------
-     1
-(1 row)
-
--- @Description Tests that gp_select_invisible is working correctly for updates
--- Test case for issue reported in STO-258
--- 
-DROP table IF EXISTS bar2;
-create table bar2 ( a int, b int);
-insert into bar2 select x , x from generate_series(1,10) as x;
-set gp_select_invisible = true;
--- The test framework assumes that the output of `select ... order by`
--- is in order. It is true but not enought because the order of the
--- tuples with the same order-by key might be different in other cols.
--- To make these kind of test cases not flaky, we should order the
--- results in all the cols. 
-select * from (select * from bar2 order by 1) r order by 1, 2;
- a  | b  
-----+----
-  1 |  1
-  2 |  2
-  3 |  3
-  4 |  4
-  5 |  5
-  6 |  6
-  7 |  7
-  8 |  8
-  9 |  9
- 10 | 10
-(10 rows)
-
-update bar2 set b = b+200 where a = 5;
-select * from (select * from bar2 order by 1) r order by 1, 2;
- a  |  b  
-----+-----
-  1 |   1
-  2 |   2
-  3 |   3
-  4 |   4
-  5 |   5
-  5 | 205
-  6 |   6
-  7 |   7
-  8 |   8
-  9 |   9
- 10 |  10
-(11 rows)
-
-insert into bar2 select x , x from generate_series(11,20) as x;
-select * from bar2 order by 1, 2;
- a  |  b  
-----+-----
-  1 |   1
-  2 |   2
-  3 |   3
-  4 |   4
-  5 |   5
-  5 | 205
-  6 |   6
-  7 |   7
-  8 |   8
-  9 |   9
- 10 |  10
- 11 |  11
- 12 |  12
- 13 |  13
- 14 |  14
- 15 |  15
- 16 |  16
- 17 |  17
- 18 |  18
- 19 |  19
- 20 |  20
-(21 rows)
-
-set gp_select_invisible = false;
--- @Description Out of order Update (MPP-21144)
--- 
--- scenario 1
-drop table if exists heap_ooo_del_tab1;
-NOTICE:  table "heap_ooo_del_tab1" does not exist, skipping
-create table heap_ooo_del_tab1 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists heap_ooo_del_tab2;
-NOTICE:  table "heap_ooo_del_tab2" does not exist, skipping
-create table heap_ooo_del_tab2 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  heap_ooo_del_tab1 values (1,10);
-insert  into heap_ooo_del_tab2 values (1,11),(1,22);
-select * from heap_ooo_del_tab1 order by 2;
- i | j  
----+----
- 1 | 10
-(1 row)
-
-select * from heap_ooo_del_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-update heap_ooo_del_tab1 set j = heap_ooo_del_tab2.j from heap_ooo_del_tab2 where heap_ooo_del_tab1.i = heap_ooo_del_tab2.i ;
-select count(*) from heap_ooo_del_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from heap_ooo_del_tab1 ;
- count 
--------
-     1
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from heap_ooo_del_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
--- scenario 2
-drop table if exists heap_ooo_del_tab1;
-create table heap_ooo_del_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists heap_ooo_del_tab2;
-create table heap_ooo_del_tab2 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  heap_ooo_del_tab1 values (1,10) ,(1,10) ;
-insert  into heap_ooo_del_tab2 values (1,11),(1,22) ;
-select * from heap_ooo_del_tab1 order by 2;
- i | j  
----+----
- 1 | 10
- 1 | 10
-(2 rows)
-
-select * from heap_ooo_del_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-delete from heap_ooo_del_tab1 using heap_ooo_del_tab2 where heap_ooo_del_tab1.i = heap_ooo_del_tab2.i;
-select count(*) from heap_ooo_del_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from heap_ooo_del_tab1 ;
- count 
--------
-     0
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from heap_ooo_del_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
-vacuum heap_ooo_del_tab1;
-set gp_select_invisible = true;
-select count(*) from heap_ooo_del_tab1 ;
- count 
--------
-     0
-(1 row)
-
-set gp_select_invisible = false;
--- @Description Out of order Update (MPP-21144)
--- 
--- scenario 1
-drop table if exists heap_ooo_upd_tab1;
-NOTICE:  table "heap_ooo_upd_tab1" does not exist, skipping
-create table heap_ooo_upd_tab1 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists heap_ooo_upd_tab2;
-NOTICE:  table "heap_ooo_upd_tab2" does not exist, skipping
-create table heap_ooo_upd_tab2 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  heap_ooo_upd_tab1 values (1,10);
-insert  into heap_ooo_upd_tab2 values (1,11),(1,22);
-select * from heap_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
-(1 row)
-
-select * from heap_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-update heap_ooo_upd_tab1 set j = heap_ooo_upd_tab2.j from heap_ooo_upd_tab2 where heap_ooo_upd_tab1.i = heap_ooo_upd_tab2.i ;
-select count(*) from heap_ooo_upd_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from heap_ooo_upd_tab1 ;
- count 
--------
-     1
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from heap_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
--- scenario 2
-drop table if exists heap_ooo_upd_tab1;
-create table heap_ooo_upd_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists heap_ooo_upd_tab2;
-create table heap_ooo_upd_tab2 (i int, j int ) ;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  heap_ooo_upd_tab1 values (1,10) ,(1,10) ;
-insert  into heap_ooo_upd_tab2 values (1,11),(1,22) ;
-select * from heap_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
- 1 | 10
-(2 rows)
-
-select * from heap_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-update heap_ooo_upd_tab1 set j = heap_ooo_upd_tab2.j from heap_ooo_upd_tab2 where heap_ooo_upd_tab1.i = heap_ooo_upd_tab2.i ;
-select count(*) from heap_ooo_upd_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from heap_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from heap_ooo_upd_tab1 ;
- count 
--------
-     4
-(1 row)
-
-set gp_select_invisible = false;
-vacuum heap_ooo_upd_tab1;
-set gp_select_invisible = true;
-select count(*) from heap_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
--- @Description Checks if delete using an index works correctly
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo VALUES (0, 64000, 'c');
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 10) AS i;
-INSERT INTO foo VALUES (0, 90002, 'c');
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 60000) AS i;
-INSERT INTO foo VALUES (0, 64001, 'c');
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(70001, 120000) AS i;
-ANALYZE foo;
-REINDEX INDEX foo_index;
-SET enable_seqscan=false;
-SET enable_bitmapscan=false;
-DELETE FROM foo WHERE b >= 64000;
-SELECT COUNT(*) FROM foo WHERE a = 0;
- count 
--------
-     0
-(1 row)
-
-RESET enable_seqscan;
-RESET enable_bitmapscan;
--- @Description Tests basic index stats after vacuuming
--- 
-DROP TABLE if exists mytab_@amname@;
-CREATE TABLE mytab_@amname@(
-          col_int int,
-          col_text text,
-          col_numeric numeric,
-          col_unq int
-          ) DISTRIBUTED RANDOMLY;
-Create index mytab_int_idx1_@amname@ on mytab_@amname@(col_int);
-insert into mytab_@amname@ values(1,'aa',1001,101),(2,'bb',1002,102);
-select * from mytab_@amname@;
- col_int | col_text | col_numeric | col_unq 
----------+----------+-------------+---------
-       1 | aa       |        1001 |     101
-       2 | bb       |        1002 |     102
-(2 rows)
-
-update mytab_@amname@ set col_text=' new value' where col_int = 1;
-select * from mytab_@amname@;
- col_int |  col_text  | col_numeric | col_unq 
----------+------------+-------------+---------
-       2 | bb         |        1002 |     102
-       1 |  new value |        1001 |     101
-(2 rows)
-
-vacuum mytab_@amname@;
-SELECT reltuples FROM pg_class WHERE relname = 'mytab_@amname@';
- reltuples 
------------
-         2
-(1 row)
-
--- New strategy of VACUUM AO/CO was introduced by PR #13255 for performance enhancement.
--- Index dead tuples will not always be cleaned up completely after VACUUM, resulting
--- index stats pg_class->reltuples will not always be accurate. So ignore the stats check
--- for reltuples to coordinate with the new behavior.
--- start_ignore
-SELECT reltuples FROM pg_class WHERE relname = 'mytab_int_idx1_@amname@';
- reltuples 
------------
-         2
-(1 row)
-
--- end_ignore
--- @Description Checks that deleting works with many AO blocks.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-SELECT COUNT(*) FROM foo WHERE b = 17;
- count 
--------
-    11
-(1 row)
-
-DELETE FROM foo WHERE b = 17;
-SELECT COUNT(*) FROM foo WHERE b = 17;
- count 
--------
-     0
-(1 row)
-
-SELECT COUNT(*) FROM foo;
-  count  
----------
- 1099989
-(1 row)
-
-DELETE FROM foo WHERE b = 16 OR b = 10000 OR b = 15;
-SELECT COUNT(*) FROM foo;
-  count  
----------
- 1099956
-(1 row)
-
--- @product_version gpdb: [4.3.1.0-4.3.99.99]
--- Bug verification for mpp-23510
-drop table  if exists mpp23510 cascade;
-NOTICE:  table "mpp23510" does not exist, skipping
-create table mpp23510 (a int, b int, c char(128));
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into mpp23510 select i, i-2 ,'Hello World'  from generate_series(-10,10) i;
-create index mpp23510_idx on mpp23510(a);
--- force an index scan
-set enable_seqscan=off;
-select count(*) from mpp23510 where a < 5;
- count 
--------
-    15
-(1 row)
-
-delete from mpp23510 where a >= 0 and a < 3;
-select count(*) from mpp23510 where a < 5;
- count 
--------
-    12
-(1 row)
-
--- Restore scan back to sequential/index
-set enable_seqscan=on;
-select count(*) from mpp23510 where a < 5;
- count 
--------
-    12
-(1 row)
-
-insert into mpp23510 select i, i-2 ,'Hello World2'  from generate_series(-11,-15) i;
-select count(*) from mpp23510 where a < 7;
- count 
--------
-    14
-(1 row)
-
-delete from mpp23510 where a >= 0 and a < 7;
-select count(*) from mpp23510 where a < 7;
- count 
--------
-    10
-(1 row)
-
-set enable_seqscan=off;
-select count(*) from mpp23510 where a < 7;
- count 
--------
-    10
-(1 row)
-
-reset enable_seqscan;
--- @Description Tests that it is possible to delete and update
--- an append-only table that have no index on them.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT);
-INSERT INTO foo VALUES (0, 0);
-INSERT INTO foo VALUES (1, 1);
-UPDATE foo SET b=2 WHERE a = 1;
-DELETE FROM foo WHERE a = 1;
-SELECT a FROM foo;
- a 
----
- 0
-(1 row)
-
--- @Description Tests that deleting the same tuple twice within the same
--- commands works fine.
--- 
-DROP TABLE IF EXISTS foo;
-DROP TABLE IF EXISTS bar;
--- This contrived choice of distribution key is to ensure that
--- subsequent DELETE operations happen on a single GPDB segment.
--- Otherwise, we may not exercise the case of out-of-order delete.
-CREATE TABLE foo (a INT, b INT, c CHAR(100))
-DISTRIBUTED BY (b);
-INSERT INTO foo SELECT i as a, 1 as b, '' as c FROM generate_series(1, 100000) AS i;
-INSERT INTO foo SELECT i as a, 2 as b, '' as c FROM generate_series(1, 100000) AS i;
-CREATE TABLE bar (a INT, b INT, c CHAR(100)) USING heap DISTRIBUTED BY (b);
--- Populate bar such that at least one segment contains multiple
--- occurences of the same value for a.
-INSERT INTO bar SELECT i as a, 1 as b, '' as c  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a, 2 as b, '' as c  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a, 1 as b, '' as c  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a, 2 as b, '' as c  FROM generate_series(1, 100000) AS i;
-ANALYZE foo;
-ANALYZE bar;
-DELETE FROM foo USING BAR WHERE foo.b = bar.b AND foo.a = bar.a AND
-(bar.a = 10 OR bar.a = 40000 OR bar.a = 20000);
--- MPP-23546: out of order tuples spanning more than one visimap
--- entry.  We have verified through gdb that the following delete
--- statement results in one visimap entry encountered more than once
--- in appendonly_delete_finish() code path.  This is because values 12
--- and 1001 of foo.a are covered by one visimap entry where as the
--- value 80001 is covered by a different visimap entry.  Assumption:
--- the values are inserted in increasing order by a single insert
--- transaction.
--- Ensure that tuples to be deleted are from the same GPDB segment.
--- This query should return the same output irrespective of GPDB
--- configuration (1 segdb, 2 or more segdbs).
-SELECT distinct(a) FROM foo
-WHERE gp_segment_id = 1 AND foo.a IN (12, 80001, 1001)
-ORDER BY a;
-   a   
--------
-    12
-  1001
- 80001
-(3 rows)
-
-DELETE FROM foo USING bar WHERE foo.b = bar.b AND foo.a = bar.a AND
-(bar.a = 12 OR bar.a = 80001 OR bar.a = 1001);
--- @Description Tests that out-of-order update works fine.
--- 
-DROP TABLE IF EXISTS foo;
-DROP TABLE IF EXISTS bar;
--- This contrived choice of distribution key is to ensure that
--- subsequent UPDATE operations happen on a single GPDB segment.
--- Otherwise, we may not exercise the case of out-of-order updates.
-CREATE TABLE foo (a INT, b INT, c CHAR(100))
-DISTRIBUTED BY(b);
-INSERT INTO foo SELECT i as a, 1 as b, '' as c FROM generate_series(1, 100000) AS i;
-INSERT INTO foo SELECT i as a, 2 as b, '' as c FROM generate_series(1, 100000) AS i;
-CREATE TABLE bar (a INT, b INT, c CHAR(100)) DISTRIBUTED BY(b);
--- Insert unique values for bar.a so that we don't get "multiple
--- updates to a row by the same query is not allowed" error later when
--- we join foo and bar on a in update statements.  This particular
--- error is covered by the test case "doubleupdate_command.sql".
-INSERT INTO bar SELECT i as a, 1 as b, '' as c  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a, 2 as b, '' as c  FROM generate_series(1, 100000) AS i;
-ANALYZE foo;
-ANALYZE bar;
--- MPP-23546.  The following update statements ensure that
--- appendonly_update() sees tuples out of order with respect to their
--- row numbers / tuple ids and also that the tuples seen by update
--- span more than one visimap entry.
-set enable_nestloop=false;
-UPDATE foo SET a = 0 FROM bar WHERE foo.b = bar.b AND foo.a = bar.a AND
-(bar.a = 10 OR bar.a = 40000 OR bar.a = 20000);
--- Ensure that tuples to be updated are all from the same GPDB segment.
-SELECT distinct(a) FROM foo WHERE gp_segment_id = 1 AND
-foo.a IN (12, 80001, 1001) ORDER BY a;
-   a   
--------
-    12
-  1001
- 80001
-(3 rows)
-
-UPDATE foo SET a = 1 FROM bar WHERE
-foo.b = bar.b AND foo.a = bar.a AND
-(bar.a = 12 OR bar.a = 80001 OR bar.a = 1001);
-reset enable_nestloop;
--- @Description select into
---
-DROP TABLE IF EXISTS uao_orders_into;
-DROP TABLE IF EXISTS new_uao_orders_into;
-CREATE TABLE uao_orders_into(order_id serial , customer_id integer,
-      order_datetime timestamp, order_total numeric(10,2));
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'order_id' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-INSERT INTO uao_orders_into(customer_id, order_datetime, order_total)
-VALUES (1,'2009-05-01 10:00 AM', 500),
-    (1,'2009-05-15 11:00 AM', 650),
-    (2,'2009-05-11 11:00 PM', 100),
-    (2,'2009-05-12 11:00 PM', 5),
-       (3,'2009-04-11 11:00 PM', 100),
-          (1,'2009-05-20 11:00 AM', 3);
-select * into new_uao_orders_into from uao_orders_into where order_total > 500 order by order_id;
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'order_id' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-select * from new_uao_orders_into;
- order_id | customer_id |      order_datetime      | order_total 
-----------+-------------+--------------------------+-------------
-        2 |           1 | Fri May 15 11:00:00 2009 |      650.00
-(1 row)
-
--- @Description Very simple test of delete
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-INSERT INTO FOO VALUES (1, 1, 'c');
-SELECT * FROM foo;
- a | b |                                                                c                                                                 
----+---+----------------------------------------------------------------------------------------------------------------------------------
- 1 | 1 | c                                                                                                                               
-(1 row)
-
-DELETE FROM foo;
-SELECT * FROM foo;
- a | b | c 
----+---+---
-(0 rows)
-
--- @Description Tests that pg_class statistics are up-to-date when deleting and updating.
--- 
-DROP TABLE IF EXISTS foo_@amname@;
-CREATE TABLE foo_@amname@ (a INT, b INT, c CHAR(128)) DISTRIBUTED BY (a);
-CREATE INDEX foo_@amname@_index ON foo_@amname@(b);
-INSERT INTO foo_@amname@ SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-ANALYZE foo_@amname@;
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@';
- reltuples 
------------
-      1000
-(1 row)
-
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@_index';
- reltuples 
------------
-      1000
-(1 row)
-
-DELETE FROM foo_@amname@ WHERE a < 100;
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@';
- reltuples 
------------
-      1000
-(1 row)
-
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@_index';
- reltuples 
------------
-      1000
-(1 row)
-
-UPDATE foo_@amname@ SET b=42 WHERE a < 200;
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@';
- reltuples 
------------
-      1000
-(1 row)
-
-SELECT reltuples FROM pg_class WHERE relname = 'foo_@amname@_index';
- reltuples 
------------
-      1000
-(1 row)
-
-set enable_seqscan=false;
-SELECT COUNT(*) FROM foo_@amname@ WHERE b=42;
- count 
--------
-   100
-(1 row)
-
-reset enable_seqscan;
--- @Description Checks the behavior of TRUNCATE.
--- Note that the contents of the visimap is not checked here.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    10
-(1 row)
-
-DELETE FROM foo;
-SELECT COUNT(*) FROM foo;
- count 
--------
-     0
-(1 row)
-
-TRUNCATE foo;
-SELECT COUNT(*) FROM foo;
- count 
--------
-     0
-(1 row)
-
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,10) AS i;
-SELECT COUNT(*) FROM foo;
- count 
--------
-    10
-(1 row)
-
--- @Description Out of order Update (MPP-21144)
--- 
--- scenario 1
-drop table if exists uao_ooo_del_tab1;
-create table uao_ooo_del_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_del_tab2;
-create table uao_ooo_del_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_del_tab1 values (1,10);
-insert  into uao_ooo_del_tab2 values (1,11),(1,22);
-select * from uao_ooo_del_tab1 order by 2;
- i | j  
----+----
- 1 | 10
-(1 row)
-
-select * from uao_ooo_del_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-delete from uao_ooo_del_tab1 using uao_ooo_del_tab2 where uao_ooo_del_tab1.i = uao_ooo_del_tab2.i;
-select count(*) from uao_ooo_del_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from uao_ooo_del_tab1 ;
- count 
--------
-     0
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from uao_ooo_del_tab1 ;
- count 
--------
-     1
-(1 row)
-
-set gp_select_invisible = false;
--- scenario 2
-drop table if exists uao_ooo_del_tab1;
-create table uao_ooo_del_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_del_tab2;
-create table uao_ooo_del_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_del_tab1 values (1,10) ,(1,0) ;
-update uao_ooo_del_tab1 set j = j + 2 where j = 0;
-update uao_ooo_del_tab1 set j = j + 3 where j = 10;
-insert  into uao_ooo_del_tab2 values (1,11),(1,22),(1,33),(1,44),(1,55) ;
-update uao_ooo_del_tab2 set j = j + 1 where j = 11;
-update uao_ooo_del_tab2 set j = j + 2 where j = 22;
-select * from uao_ooo_del_tab1 order by 2;
- i | j  
----+----
- 1 |  2
- 1 | 13
-(2 rows)
-
-select * from uao_ooo_del_tab2 order by 2;
- i | j  
----+----
- 1 | 12
- 1 | 24
- 1 | 33
- 1 | 44
- 1 | 55
-(5 rows)
-
-delete from uao_ooo_del_tab1 using uao_ooo_del_tab2 where uao_ooo_del_tab1.i = uao_ooo_del_tab2.i;
-select count(*) from uao_ooo_del_tab2 ;
- count 
--------
-     5
-(1 row)
-
-select count(*) from uao_ooo_del_tab1 ;
- count 
--------
-     0
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from uao_ooo_del_tab1 ;
- count 
--------
-     4
-(1 row)
-
-set gp_select_invisible = false;
-vacuum uao_ooo_del_tab1;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_del_tab1 ;
- count 
--------
-     0
-(1 row)
-
-set gp_select_invisible = false;
--- scenario 3
-drop table if exists uao_ooo_upd_tab1;
-create table uao_ooo_upd_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_upd_tab2;
-create table uao_ooo_upd_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_upd_tab1 values (1,10) ,(1,10) ;
-insert  into uao_ooo_upd_tab2 values (1,11),(1,22),(1,33),(1,44),(1,55)  ;
-BEGIN;
-update uao_ooo_upd_tab1 set j = j + 3 where j = 10;
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 13
- 1 | 13
-(2 rows)
-
-select * from uao_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
- 1 | 33
- 1 | 44
- 1 | 55
-(5 rows)
-
-delete from uao_ooo_del_tab1 using uao_ooo_del_tab2 where uao_ooo_del_tab1.i = uao_ooo_del_tab2.i;
-select count(*) from uao_ooo_upd_tab2 ;
- count 
--------
-     5
-(1 row)
-
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 13
- 1 | 13
-(2 rows)
-
-ROLLBACK;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
- 1 | 10
-(2 rows)
-
-set gp_select_invisible = false;
-vacuum uao_ooo_upd_tab1;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
--- @Description Out of order Update (MPP-21144)
--- 
--- scenario 1
-drop table if exists uao_ooo_upd_tab1;
-create table uao_ooo_upd_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_upd_tab2;
-create table uao_ooo_upd_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_upd_tab1 values (1,10);
-insert  into uao_ooo_upd_tab2 values (1,11),(1,22);
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
-(1 row)
-
-select * from uao_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
-(2 rows)
-
-update uao_ooo_upd_tab1 set j = uao_ooo_upd_tab2.j from uao_ooo_upd_tab2 where uao_ooo_upd_tab1.i = uao_ooo_upd_tab2.i ;
-select count(*) from uao_ooo_upd_tab2 ;
- count 
--------
-     2
-(1 row)
-
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     1
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
--- scenario 2
-drop table if exists uao_ooo_upd_tab1;
-create table uao_ooo_upd_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_upd_tab2;
-create table uao_ooo_upd_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_upd_tab1 values (1,10) ,(1,10) ;
-analyze uao_ooo_upd_tab1;
-update uao_ooo_upd_tab1 set j = j + 3 where j = 10;
-insert  into uao_ooo_upd_tab2 values (1,11),(1,22),(1,33),(1,44),(1,55)  ;
-analyze uao_ooo_upd_tab2;
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 13
- 1 | 13
-(2 rows)
-
-select * from uao_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
- 1 | 33
- 1 | 44
- 1 | 55
-(5 rows)
-
-update uao_ooo_upd_tab1 set j = uao_ooo_upd_tab2.j from uao_ooo_upd_tab2 where uao_ooo_upd_tab1.i = uao_ooo_upd_tab2.i ;
-select count(*) from uao_ooo_upd_tab2 ;
- count 
--------
-     5
-(1 row)
-
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     6
-(1 row)
-
-set gp_select_invisible = false;
-vacuum uao_ooo_upd_tab1;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-set gp_select_invisible = false;
-select * from uao_ooo_upd_tab1 ;
- i | j  
----+----
- 1 | 11
- 1 | 11
-(2 rows)
-
--- scenario 3
-drop table if exists uao_ooo_upd_tab1;
-create table uao_ooo_upd_tab1 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-drop table if exists uao_ooo_upd_tab2;
-create table uao_ooo_upd_tab2 (i int, j int );
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-insert into  uao_ooo_upd_tab1 values (1,10) ,(1,10) ;
-insert  into uao_ooo_upd_tab2 values (1,11),(1,22),(1,33),(1,44),(1,55)  ;
-analyze uao_ooo_upd_tab1;
-analyze uao_ooo_upd_tab2;
-BEGIN;
-update uao_ooo_upd_tab1 set j = j + 3 where j = 10;
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 13
- 1 | 13
-(2 rows)
-
-select * from uao_ooo_upd_tab2 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 22
- 1 | 33
- 1 | 44
- 1 | 55
-(5 rows)
-
-update uao_ooo_upd_tab1 set j = uao_ooo_upd_tab2.j from uao_ooo_upd_tab2 where uao_ooo_upd_tab1.i = uao_ooo_upd_tab2.i ;
-select count(*) from uao_ooo_upd_tab2 ;
- count 
--------
-     5
-(1 row)
-
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 11
- 1 | 11
-(2 rows)
-
-ROLLBACK;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
- 1 | 10
-(2 rows)
-
-set gp_select_invisible = false;
-vacuum uao_ooo_upd_tab1;
-set gp_select_invisible = true;
-select count(*) from uao_ooo_upd_tab1 ;
- count 
--------
-     2
-(1 row)
-
-select * from uao_ooo_upd_tab1 order by 2;
- i | j  
----+----
- 1 | 10
- 1 | 10
-(2 rows)
-
-set gp_select_invisible = false;
--- @Description Tests basic update commands on ao tables when aborted
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-BEGIN;
-UPDATE foo SET b=42 WHERE a < 10;
-SELECT COUNT(b) FROM foo WHERE b = 42;
- count 
--------
-    10
-(1 row)
-
-SELECT COUNT(b) FROM foo WHERE b < 10;
- count 
--------
-     0
-(1 row)
-
-ROLLBACK;
-SELECT COUNT(b) FROM foo WHERE b = 42;
- count 
--------
-     1
-(1 row)
-
-SELECT COUNT(b) FROM foo WHERE b < 10;
- count 
--------
-     9
-(1 row)
-
-set gp_select_invisible=true;
-SELECT COUNT(b) FROM foo WHERE b = 42;
- count 
--------
-     1
-(1 row)
-
-SELECT COUNT(b) FROM foo WHERE b < 10;
- count 
--------
-     9
-(1 row)
-
-set gp_select_invisible=false;
--- @Description Tests basic update commands on ao tables.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1,1000) AS i;
-UPDATE foo SET b=42 WHERE a < 10;
-SELECT COUNT(b) FROM foo WHERE b = 42;
- count 
--------
-    10
-(1 row)
-
-SELECT COUNT(b) FROM foo WHERE b < 10;
- count 
--------
-     0
-(1 row)
-
-UPDATE foo SET b=1001 WHERE b < 4;
-DELETE FROM foo WHERE a < 4;
-UPDATE foo SET b=1002 WHERE a < 5;
--- @Description Tests the update command with many blocks.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-BEGIN;
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100000) AS i;
-COMMIT;
-SELECT SUM(b) FROM foo WHERE a = 17;
- sum 
------
- 187
-(1 row)
-
-UPDATE foo SET b = 2*b WHERE a = 17;
-SELECT SUM(b) FROM foo WHERE a = 17;
- sum 
------
- 374
-(1 row)
-
-BEGIN;
-UPDATE foo SET b = 2*b WHERE a = 17;
-COMMIT;
-SELECT SUM(b) FROM foo WHERE a = 17;
- sum 
------
- 748
-(1 row)
-
-BEGIN;
-UPDATE foo SET b = 2*b WHERE a = 17;
-SELECT SUM(b) FROM foo WHERE a = 17;
- sum  
-------
- 1496
-(1 row)
-
-ROLLBACK;
-SELECT SUM(b) FROM foo WHERE a = 17;
- sum 
------
- 748
-(1 row)
-
--- @description Tests AO update with a merge join
--- 
-drop table if exists foo;
-drop table if exists bar;
-CREATE TABLE foo (a INT, b int, c int, d int);
-CREATE TABLE bar (a INT, b int, c int, d int);
-INSERT INTO foo SELECT i as a,i,i,i  FROM generate_series(1, 100000) AS i;
-INSERT INTO bar SELECT i as a,i,i,i  FROM generate_series(1, 100000) AS i;
-set enable_hashjoin=off;
-set enable_nestloop=off;
-set enable_seqscan=off;
-set enable_bitmapscan=off;
-set enable_mergejoin=on;
-UPDATE foo SET b = bar.a FROM bar WHERE foo.a = bar.a AND foo.b = bar.b AND foo.c = bar.c AND foo.d = bar.d;
-reset enable_hashjoin;
-reset enable_nestloop;
-reset enable_seqscan;
-reset enable_bitmapscan;
-reset enable_mergejoin;
--- @Description Tests that update is supported in a subtransaction.
--- 
-DROP TABLE IF EXISTS foo;
-CREATE TABLE foo (a INT, b INT, c CHAR(128));
-CREATE INDEX foo_index ON foo(b);
-INSERT INTO foo SELECT i as a, i as b, 'hello world' as c FROM generate_series(1, 100) AS i;
-BEGIN;
-SAVEPOINT my_savepoint;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     1
-(1 row)
-
-UPDATE foo SET b = 1 WHERE a < 4;
-SAVEPOINT my_savepoint2;
-ROLLBACK To my_savepoint;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     1
-(1 row)
-
-UPDATE foo SET b = 1 WHERE a < 4;
-COMMIT;
-BEGIN;
-SAVEPOINT my_savepoint;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     3
-(1 row)
-
-UPDATE foo SET b = 1 WHERE a < 8;
-SAVEPOINT my_savepoint2;
-UPDATE foo SET b = 2 WHERE a < 12;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     0
-(1 row)
-
-ROLLBACK To my_savepoint2;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     7
-(1 row)
-
-ROLLBACK To my_savepoint;
-SELECT COUNT(*) FROM foo WHERE b = 1;
- count 
--------
-     3
-(1 row)
-
-COMMIT;
--- @Description test predicate pushdown
-DROP TABLE IF EXISTS taocs;
-NOTICE:  table "taocs" does not exist, skipping
-CREATE TABLE taocs(c1 int, c2 int, c3 int, c4 int, c5 int);
-insert into taocs select 1, i, i, i, i from generate_series(1, 15)i;
---set gp_enable_predicate_pushdown = on; -- default is on
-set gp_predicate_pushdown_sample_rows = 10;
-delete from taocs where c2 = 3 or c2 = 7 or c2 = 13;
-explain (costs off)
-select * from taocs where c4>5 and c3>3 and c2!=12 and c4<15 and c2!=10 and c3<15 and c2>1 and c2<15 and c2+c3!=28 and gp_segment_id=1;
-                                                                                 QUERY PLAN                                                                                 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Gather Motion 1:1  (slice1; segments: 1)
-   ->  Seq Scan on taocs
-         Filter: ((c4 > 5) AND (c3 > 3) AND (c2 <> 12) AND (c4 < 15) AND (c2 <> 10) AND (c3 < 15) AND (c2 > 1) AND (c2 < 15) AND (gp_segment_id = 1) AND ((c2 + c3) <> 28))
- Optimizer: Postgres query optimizer
-(4 rows)
-
-select * from taocs where c4>5 and c3>3 and c2!=12 and c4<15 and c2!=10 and c3<15 and c2>1 and c2<15 and c2+c3!=28 and gp_segment_id=1;
- c1 | c2 | c3 | c4 | c5 
-----+----+----+----+----
-  1 |  6 |  6 |  6 |  6
-  1 |  8 |  8 |  8 |  8
-  1 |  9 |  9 |  9 |  9
-  1 | 11 | 11 | 11 | 11
-(4 rows)
-
--- @Description Tests that speculative inserts are not supported (for
--- conflicting inserts and otherwise).
---
-CREATE TABLE spec_insert(i int unique, j int) distributed by (i);
-INSERT INTO spec_insert VALUES(1, 2);
-INSERT INTO spec_insert VALUES(1, 3) ON CONFLICT(i) DO NOTHING;
-ERROR:  INSERT ON CONFLICT is not supported for appendoptimized relations
-INSERT INTO spec_insert VALUES(1, 3) ON CONFLICT(i) DO UPDATE SET j = 3;
-ERROR:  INSERT ON CONFLICT is not supported for appendoptimized relations
-INSERT INTO spec_insert VALUES(2, 3) ON CONFLICT(i) DO NOTHING;
-ERROR:  INSERT ON CONFLICT is not supported for appendoptimized relations
-INSERT INTO spec_insert VALUES(2, 3) ON CONFLICT(i) DO UPDATE SET j = 4;
-ERROR:  INSERT ON CONFLICT is not supported for appendoptimized relations
diff --git a/src/test/regress/expected/uao_dml/uao_dml_cursor.out b/src/test/regress/expected/uao_dml/uao_dml_cursor.out
deleted file mode 100644
index 1ad7da0c837..00000000000
--- a/src/test/regress/expected/uao_dml/uao_dml_cursor.out
+++ /dev/null
@@ -1,429 +0,0 @@
-create schema uao_dml_cursor_@amname@;
-set search_path=uao_dml_cursor_@amname@;
-SET default_table_access_method=@amname@;
--- @Description BINARY CURSOR.
---
-DROP TABLE IF EXISTS sto_uao_emp_forcursor cascade;
-CREATE TABLE sto_uao_emp_forcursor (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_forcursor values
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_forcursor cascade;
-CREATE TABLE sto_uao_dept_forcursor (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(15)) distributed by (deptno);
-insert into sto_uao_dept_forcursor values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(4, 'OPERATIONS','SEATTLE');
-BEGIN;
-DECLARE 
-    all_emp_upd_rollback BINARY CURSOR FOR SELECT ename, loc FROM sto_uao_emp_forcursor  JOIN sto_uao_dept_forcursor
-                               on dept = deptno order by ename ;
-    FETCH FIRST from all_emp_upd_rollback;
- ename |   loc    
--------+----------
- ADAMS | NEW YORK
-(1 row)
-
-    update sto_uao_dept_forcursor set loc = 'NEW YORK CITY' where loc = 'NEW YORK';
-    MOVE 5 FROM all_emp_upd_rollback;
-    FETCH  1 from all_emp_upd_rollback ;
- ename  |   loc   
---------+---------
- HOOVER | ATLANTA
-(1 row)
-
-    CLOSE all_emp_upd_rollback;
-ROLLBACK;
-BEGIN;
-DECLARE all_dept BINARY CURSOR FOR SELECT dname,loc from sto_uao_dept_forcursor order by 1;
-fetch all from all_dept;
-   dname    |   loc    
-------------+----------
- ACCOUNTING | ST LOUIS
- OPERATIONS | SEATTLE
- RESEARCH   | NEW YORK
- SALES      | ATLANTA
-(4 rows)
-
-close all_dept;
-commit;
-BEGIN;
-DECLARE all_dept_del_rollback BINARY CURSOR FOR SELECT dname,loc from sto_uao_dept_forcursor order by 1;
-delete from sto_uao_dept_forcursor where loc = 'NEW YORK';
-fetch all from all_dept_del_rollback;
-   dname    |   loc    
-------------+----------
- ACCOUNTING | ST LOUIS
- OPERATIONS | SEATTLE
- RESEARCH   | NEW YORK
- SALES      | ATLANTA
-(4 rows)
-
-close all_dept_del_rollback;
-ROLLBACK;
-BEGIN;
-DECLARE all_dept_aft_del BINARY CURSOR FOR SELECT dname,loc from sto_uao_dept_forcursor order by 1;
-fetch all from all_dept_aft_del;
-   dname    |   loc    
-------------+----------
- ACCOUNTING | ST LOUIS
- OPERATIONS | SEATTLE
- RESEARCH   | NEW YORK
- SALES      | ATLANTA
-(4 rows)
-
-close all_dept_aft_del;
-commit;
-BEGIN;
-DECLARE 
-    all_emp_del_commit BINARY CURSOR FOR SELECT ename FROM sto_uao_emp_forcursor order by ename desc ;
-    FETCH FIRST from all_emp_del_commit;
-   ename    
-------------
- WASHINGTON
-(1 row)
-
-    delete FROM sto_uao_emp_forcursor where empno > 10;
-    FETCH 2 from all_emp_del_commit;
- ename 
--------
- TAFT
- ROSE
-(2 rows)
-
-    MOVE 5 FROM all_emp_del_commit;
-    FETCH  1 from all_emp_del_commit ;
-  ename  
----------
- JOHNSON
-(1 row)
-
-    FETCH NEXT from all_emp_del_commit;
-  ename  
----------
- JACKSON
-(1 row)
-
-    FETCH all from all_emp_del_commit;
-  ename   
-----------
- HOOVER
- HARDING
- GRANT
- GARFIELD
- FILLMORE
- CLINT
- ADAMS
-(7 rows)
-
-    CLOSE all_emp_del_commit;
-COMMIT;
-BEGIN;
-DECLARE 
-    all_emp_aft_del CURSOR FOR SELECT ename FROM sto_uao_emp_forcursor order by ename desc ;
-    FETCH all from all_emp_aft_del;
-  ename   
-----------
- TAFT
- POLK
- LINCOLN
- JOHNSON
- JACKSON
- HOOVER
- HARDING
- GRANT
- GARFIELD
- FILLMORE
-(10 rows)
-
-    CLOSE all_emp_aft_del;
-COMMIT;
-BEGIN;
-DECLARE 
-    all_emp_upd_commit BINARY CURSOR FOR SELECT ename, loc FROM sto_uao_emp_forcursor  JOIN sto_uao_dept_forcursor
-                               on dept = deptno order by ename ;
-    FETCH FIRST from all_emp_upd_commit;
-  ename   |   loc    
-----------+----------
- FILLMORE | NEW YORK
-(1 row)
-
-    FETCH 2 from all_emp_upd_commit;
-  ename   |   loc    
-----------+----------
- GARFIELD | SEATTLE
- GRANT    | NEW YORK
-(2 rows)
-
-    update sto_uao_dept_forcursor set loc = 'NEW YORK CITY' where loc = 'NEW YORK';
-    MOVE 5 FROM all_emp_upd_commit;
-    FETCH  1 from all_emp_upd_commit ;
- ename |   loc   
--------+---------
- POLK  | SEATTLE
-(1 row)
-
-    FETCH NEXT from all_emp_upd_commit;
- ename |   loc   
--------+---------
- TAFT  | ATLANTA
-(1 row)
-
-    FETCH all from all_emp_upd_commit;
- ename | loc 
--------+-----
-(0 rows)
-
-    CLOSE all_emp_upd_commit;
-COMMIT;
-BEGIN;
-DECLARE all_dept2 BINARY CURSOR FOR SELECT dname,loc from sto_uao_dept_forcursor order by 1;
-fetch all from all_dept2;
-   dname    |      loc      
-------------+---------------
- ACCOUNTING | ST LOUIS
- OPERATIONS | SEATTLE
- RESEARCH   | NEW YORK CITY
- SALES      | ATLANTA
-(4 rows)
-
-close all_dept2;
-commit;
-BEGIN;
-DECLARE 
-    all_emp_aft_upd BINARY CURSOR FOR SELECT ename, loc FROM sto_uao_emp_forcursor  JOIN sto_uao_dept_forcursor
-                               on dept = deptno order by ename ;
-    FETCH FIRST from all_emp_aft_upd;
-  ename   |      loc      
-----------+---------------
- FILLMORE | NEW YORK CITY
-(1 row)
-
-    FETCH 2 from all_emp_aft_upd;
-  ename   |      loc      
-----------+---------------
- GARFIELD | SEATTLE
- GRANT    | NEW YORK CITY
-(2 rows)
-
-    MOVE 5 FROM all_emp_aft_upd;
-    FETCH  1 from all_emp_aft_upd ;
- ename |   loc   
--------+---------
- POLK  | SEATTLE
-(1 row)
-
-    FETCH NEXT from all_emp_aft_upd;
- ename |   loc   
--------+---------
- TAFT  | ATLANTA
-(1 row)
-
-    FETCH all from all_emp_aft_upd;
- ename | loc 
--------+-----
-(0 rows)
-
-    CLOSE all_emp_aft_upd;
-COMMIT;
--- @Description WITH HOLD cursor.
---
-DROP TABLE IF EXISTS sto_uao_emp_forcursor cascade;
-CREATE TABLE sto_uao_emp_forcursor (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) 
-distributed by (empno);
-insert into sto_uao_emp_forcursor values
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-BEGIN;
-DECLARE 
-    all_emp_withhold BINARY CURSOR WITH HOLD FOR SELECT ename FROM sto_uao_emp_forcursor order by ename asc ;
-    FETCH ABSOLUTE 1 from all_emp_withhold;
- ename 
--------
- ADAMS
-(1 row)
-
-    FETCH 3 from all_emp_withhold;
-  ename   
-----------
- CLINT
- FILLMORE
- GARFIELD
-(3 rows)
-
-COMMIT;
--- fetch after commit +ve testcase
-FETCH next from all_emp_withhold;
- ename 
--------
- GRANT
-(1 row)
-
-close all_emp_withhold;
-BEGIN;
-DECLARE 
-    all_emp_withouthold BINARY CURSOR FOR SELECT ename FROM sto_uao_emp_forcursor order by ename asc ;
-    FETCH ABSOLUTE 1 from all_emp_withouthold;
- ename 
--------
- ADAMS
-(1 row)
-
-    FETCH 3 from all_emp_withouthold;
-  ename   
-----------
- CLINT
- FILLMORE
- GARFIELD
-(3 rows)
-
-COMMIT;
--- fetch after commit -ve testcase
-FETCH next from all_emp_withouthold;
-ERROR:  cursor "all_emp_withouthold" does not exist
-close all_emp_withouthold;
-ERROR:  cursor "all_emp_withouthold" does not exist
--- @Description UPDATEABLE BINARY cursor.
---
-DROP TABLE IF EXISTS sto_uao_emp_forcursor cascade;
-CREATE TABLE sto_uao_emp_forcursor (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_forcursor values
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_forcursor cascade;
-CREATE TABLE sto_uao_dept_forcursor (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(15)) distributed by (deptno);
-insert into sto_uao_dept_forcursor values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(4, 'OPERATIONS','SEATTLE');
-BEGIN;
-DECLARE 
-    all_emp_uao_upd_commit BINARY CURSOR FOR SELECT ename FROM sto_uao_emp_forcursor order by ename ;
-    FETCH forward 3 from  all_emp_uao_upd_commit;
-  ename   
-----------
- ADAMS
- CLINT
- FILLMORE
-(3 rows)
-
-    FETCH NEXT in all_emp_uao_upd_commit;
-  ename   
-----------
- GARFIELD
-(1 row)
-
-    update sto_uao_emp_forcursor set ename = ename || '_NEW'  where current of all_emp_uao_upd_commit;
-ERROR:  "sto_uao_emp_forcursor" is not simply updatable
-    FETCH NEXT from all_emp_uao_upd_commit;
-ERROR:  current transaction is aborted, commands ignored until end of transaction block
-    FETCH all from all_emp_uao_upd_commit;
-ERROR:  current transaction is aborted, commands ignored until end of transaction block
-    CLOSE all_emp_uao_upd_commit;
-ERROR:  current transaction is aborted, commands ignored until end of transaction block
-COMMIT;
-BEGIN;
-DECLARE 
-    all_emp_uao_aft_upd BINARY CURSOR FOR SELECT ename, loc FROM sto_uao_emp_forcursor  JOIN sto_uao_dept_forcursor
-                               on dept = deptno order by ename ;
-    FETCH all from all_emp_uao_aft_upd;
-   ename    |   loc    
-------------+----------
- ADAMS      | NEW YORK
- CLINT      | ST LOUIS
- FILLMORE   | NEW YORK
- GARFIELD   | SEATTLE
- GRANT      | NEW YORK
- HARDING    | ATLANTA
- HOOVER     | ATLANTA
- JACKSON    | SEATTLE
- JOHNSON    | SEATTLE
- LINCOLN    | SEATTLE
- MONROE     | NEW YORK
- More       | NEW YORK
- POLK       | SEATTLE
- ROOSEVELT  | ST LOUIS
- ROSE       | ATLANTA
- TAFT       | ATLANTA
- WASHINGTON | SEATTLE
-(17 rows)
-
-    CLOSE all_emp_uao_aft_upd;
-COMMIT;
diff --git a/src/test/regress/expected/uao_dml/uao_dml_select.out b/src/test/regress/expected/uao_dml/uao_dml_select.out
deleted file mode 100644
index b78385ed6c9..00000000000
--- a/src/test/regress/expected/uao_dml/uao_dml_select.out
+++ /dev/null
@@ -1,1444 +0,0 @@
-create schema uao_dml_select_@amname@;
-set search_path=uao_dml_select_@amname@;
-SET default_table_access_method=@amname@;
--- @Description select with aggregate function
---
-DROP TABLE IF EXISTS city_uao cascade;
-DROP TABLE IF EXISTS country_uao cascade;
-DROP TABLE IF EXISTS countrylanguage_uao cascade;
-BEGIN;
-CREATE TABLE city_uao (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao (id, name, countrycode, district, population) FROM '@abs_srcdir@/data/city.data';
-COPY country_uao (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao;
-ANALYZE country_uao;
-ANALYZE countrylanguage_uao;
---query with aggregate functions
-select
-(select max(city_uao.population) from city_uao ) as WORLD_MAX_POP,
-(select avg(city_uao.population) from city_uao) AS WORLD_AVG_POP,
- city_uao.name as populationwise_top_five_cities,city_uao.population
- from
- city_uao order by city_uao.population desc LIMIT 5;
- world_max_pop |    world_avg_pop    | populationwise_top_five_cities | population 
----------------+---------------------+--------------------------------+------------
-      10500000 | 350468.223584211817 | Mumbai (Bombay)                |   10500000
-      10500000 | 350468.223584211817 | Seoul                          |    9981619
-      10500000 | 350468.223584211817 | Sao Paulo                      |    9968485
-      10500000 | 350468.223584211817 | Shanghai                       |    9696300
-      10500000 | 350468.223584211817 | Jakarta                        |    9604900
-(5 rows)
-
-select
-(select min(city_uao.population) from city_uao ) as WORLD_MIN_POP,
-(select SUM(city_uao.population) from city_uao) AS WORLD_SUM_POP,
- city_uao.name as populationwise_top_five_cities,city_uao.population
- from
- city_uao order by city_uao.population desc LIMIT 5;
- world_min_pop | world_sum_pop | populationwise_top_five_cities | population 
----------------+---------------+--------------------------------+------------
-            42 |    1429559884 | Mumbai (Bombay)                |   10500000
-            42 |    1429559884 | Seoul                          |    9981619
-            42 |    1429559884 | Sao Paulo                      |    9968485
-            42 |    1429559884 | Shanghai                       |    9696300
-            42 |    1429559884 | Jakarta                        |    9604900
-(5 rows)
-
--- @Description select with between
---
--- Reuse the country_uao table from previous test.
--- Using  the BETWEEN clause
---query
-select *
-from
-country_uao
-where indepyear between 1800 and 1900
-and lifeexpectancy between 70 and 80
-and gnp between 80000 and 100000;
- code |   name    |   continent   |    region     | surfacearea | indepyear | population | lifeexpectancy |   gnp    |  gnpold  | localname |  governmentform  |    headofstate    | capital | code2 
-------+-----------+---------------+---------------+-------------+-----------+------------+----------------+----------+----------+-----------+------------------+-------------------+---------+-------
- VEN  | Venezuela | South America | South America |      912050 |      1811 |   24170000 |           73.1 | 95023.00 | 88434.00 | Venezuela | Federal Republic | Hugo Chavez Frias |    3539 | VE
-(1 row)
-
--- @Description select with CASE WHEN.. ELSE
---
-DROP TABLE IF EXISTS sto_uao_emp_limit_offset;
-CREATE TABLE sto_uao_emp_limit_offset (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_limit_offset values 
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-select ename , hiredate,
-CASE when hiredate < '01-01-1991' then 'Founders'
-when hiredate < '01-01-1996' then 'old timer'
-else 'new employee' 
-end as tag
-from sto_uao_emp_limit_offset  order by 1; 
-   ename    |  hiredate  |     tag      
-------------+------------+--------------
- ADAMS      | 03-15-1996 | new employee
- CLINT      | 10-12-2001 | new employee
- FILLMORE   | 08-09-1994 | old timer
- GARFIELD   | 05-01-1993 | old timer
- GRANT      | 03-30-1997 | new employee
- HARDING    | 02-02-1998 | new employee
- HOOVER     | 04-02-1990 | Founders
- JACKSON    | 01-01-1990 | Founders
- JOHNSON    | 12-17-1990 | Founders
- LINCOLN    | 06-23-1994 | old timer
- MONROE     | 12-03-2000 | new employee
- More       | 10-12-1994 | old timer
- POLK       | 09-22-1997 | new employee
- ROOSEVELT  | 10-12-1995 | old timer
- ROSE       | 10-12-1999 | new employee
- TAFT       | 01-02-1996 | new employee
- WASHINGTON | 04-16-1998 | new employee
-(17 rows)
-
--- @Description select inner/right join
---
-DROP TABLE IF EXISTS sto_uao_emp_crossjoin cascade;
-CREATE TABLE sto_uao_emp_crossjoin (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_crossjoin values
-(1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,7)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_crossjoin cascade;
-CREATE TABLE sto_uao_dept_crossjoin (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_crossjoin values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(5,'LOGISTICS','BOSTON')
-,(4, 'OPERATIONS','SEATTLE');
-select ename,loc from sto_uao_emp_crossjoin cross join sto_uao_dept_crossjoin
-order by 1 asc, 2 asc LIMIT 10;
- ename |   loc    
--------+----------
- ADAMS | ATLANTA
- ADAMS | BOSTON
- ADAMS | NEW YORK
- ADAMS | SEATTLE
- ADAMS | ST LOUIS
- CLINT | ATLANTA
- CLINT | BOSTON
- CLINT | NEW YORK
- CLINT | SEATTLE
- CLINT | ST LOUIS
-(10 rows)
-
--- @Description select distinct
---
-DROP TABLE IF EXISTS sto_uao_emp_seldistinct cascade;
-CREATE TABLE sto_uao_emp_seldistinct (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_seldistinct values
-(1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,7)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-SELECT distinct(dept) FROM sto_uao_emp_seldistinct order by dept;
- dept 
-------
-    1
-    2
-    3
-    4
-    7
-(5 rows)
-
--- @description : Create Data and execute select statements on UAO tables EXCEPT
---
-DROP TABLE IF EXISTS city_uao cascade;
-DROP TABLE IF EXISTS country_uao cascade;
-DROP TABLE IF EXISTS countrylanguage_uao cascade;
-BEGIN;
-CREATE TABLE city_uao (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao (id, name, countrycode, district, population) FROM stdin;
-COPY country_uao (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM stdin WITH NULL AS '';
-COPY countrylanguage_uao (countrycode, "language", isofficial, percentage) FROM stdin;
-COMMIT;
-ANALYZE city_uao;
-ANALYZE country_uao;
-ANALYZE countrylanguage_uao;
--- Using  EXCEPT clause
-select * from city_uao where population > 770000
-UNION
-select * from city_uao where population < 100000
-EXCEPT
-select * from city_uao where countrycode in ('MEX','USA');
-  id  |        name         | countrycode |     district     | population 
-------+---------------------+-------------+------------------+------------
- 1857 | Kelowna             | CAN         | British Colombia |      89442
- 2413 | La Habana           | CUB         | La Habana        |    2256000
-  184 | Belize City         | BLZ         | Belize City      |      55810
-  190 | Saint George        | BMU         | Saint Georges    |       1800
-  925 | Quetzaltenango      | GTM         | Quetzaltenango   |      90801
- 1856 | Sudbury             | CAN         | Ontario          |      92686
- 1858 | Barrie              | CAN         | Ontario          |      89269
- 2426 | Ciego de Avila      | CUB         | Ciego de Avila   |      98505
-  185 | Belmopan            | BLZ         | Cayo             |       7105
-  191 | Hamilton            | BMU         | Hamilton         |       1200
-  922 | Ciudad de Guatemala | GTM         | Guatemala        |     823301
- 1810 | Montreal            | CAN         | Quebec           |    1016376
- 1855 | Delta               | CAN         | British Colombia |      95411
-(13 rows)
-
--- @description : Create Data and execute select statements on UAO tables GROUP BY
---
-DROP TABLE IF EXISTS sto_uao_emp_groupby;
-NOTICE:  table "sto_uao_emp_groupby" does not exist, skipping
-CREATE TABLE sto_uao_emp_groupby (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_groupby values 
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_groupby;
-NOTICE:  table "sto_uao_dept_groupby" does not exist, skipping
-CREATE TABLE sto_uao_dept_groupby (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_groupby values 
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(4, 'OPERATIONS','SEATTLE');
--- Simple Group by
-select count(*) as num_of_emp, loc from sto_uao_dept_groupby, sto_uao_emp_groupby where sto_uao_dept_groupby.deptno = sto_uao_emp_groupby.dept group by loc order by 1 asc;
- num_of_emp |   loc    
-------------+----------
-          2 | ST LOUIS
-          4 | ATLANTA
-          5 | NEW YORK
-          6 | SEATTLE
-(4 rows)
-
-select  loc ,job, sum(sal) as sum_of_salary, count(*) as num_emp  from sto_uao_emp_groupby,sto_uao_dept_groupby where sto_uao_emp_groupby.dept=sto_uao_dept_groupby.deptno
-group by loc,job order by loc,job;
-   loc    |   job    | sum_of_salary | num_emp 
-----------+----------+---------------+---------
- ATLANTA  | MANAGER  |      52000.00 |       1
- ATLANTA  | SALES I  |      70000.00 |       3
- NEW YORK | ENGINEER |     121000.00 |       4
- NEW YORK | MANAGER  |      56000.00 |       1
- SEATTLE  | ADMIN    |      36000.00 |       2
- SEATTLE  | CEO      |      75000.00 |       1
- SEATTLE  | MANAGER  |      54000.00 |       1
- SEATTLE  | TECH     |      47500.00 |       2
- ST LOUIS | CPA      |      59000.00 |       2
-(9 rows)
-
--- Rollup
-select  loc ,job,comm,sum(sal),  count(*) as cnt from sto_uao_emp_groupby,sto_uao_dept_groupby where sto_uao_emp_groupby.dept=sto_uao_dept_groupby.deptno
-and loc in ('NEW YORK', 'ATLANTA')
-group by rollup (loc,job,comm) order by loc,job,comm;
-   loc    |   job    | comm  |    sum    | cnt 
-----------+----------+-------+-----------+-----
- ATLANTA  | MANAGER  | 15.00 |  52000.00 |   1
- ATLANTA  | MANAGER  |       |  52000.00 |   1
- ATLANTA  | SALES I  | 15.00 |  45000.00 |   2
- ATLANTA  | SALES I  | 20.00 |  25000.00 |   1
- ATLANTA  | SALES I  |       |  70000.00 |   3
- ATLANTA  |          |       | 122000.00 |   4
- NEW YORK | ENGINEER | 20.00 | 121000.00 |   4
- NEW YORK | ENGINEER |       | 121000.00 |   4
- NEW YORK | MANAGER  | 20.00 |  56000.00 |   1
- NEW YORK | MANAGER  |       |  56000.00 |   1
- NEW YORK |          |       | 177000.00 |   5
-          |          |       | 299000.00 |   9
-(12 rows)
-
--- Cube
-select  loc ,job,comm,sum(sal),  count(*) as cnt from sto_uao_emp_groupby,sto_uao_dept_groupby where sto_uao_emp_groupby.dept=sto_uao_dept_groupby.deptno
-and loc != 'SEATTLE'
-group by cube (loc,job,comm) order by loc,job,comm;
-   loc    |   job    | comm  |    sum    | cnt 
-----------+----------+-------+-----------+-----
- ATLANTA  | MANAGER  | 15.00 |  52000.00 |   1
- ATLANTA  | MANAGER  |       |  52000.00 |   1
- ATLANTA  | SALES I  | 15.00 |  45000.00 |   2
- ATLANTA  | SALES I  | 20.00 |  25000.00 |   1
- ATLANTA  | SALES I  |       |  70000.00 |   3
- ATLANTA  |          | 15.00 |  97000.00 |   3
- ATLANTA  |          | 20.00 |  25000.00 |   1
- ATLANTA  |          |       | 122000.00 |   4
- NEW YORK | ENGINEER | 20.00 | 121000.00 |   4
- NEW YORK | ENGINEER |       | 121000.00 |   4
- NEW YORK | MANAGER  | 20.00 |  56000.00 |   1
- NEW YORK | MANAGER  |       |  56000.00 |   1
- NEW YORK |          | 20.00 | 177000.00 |   5
- NEW YORK |          |       | 177000.00 |   5
- ST LOUIS | CPA      | 30.00 |  59000.00 |   2
- ST LOUIS | CPA      |       |  59000.00 |   2
- ST LOUIS |          | 30.00 |  59000.00 |   2
- ST LOUIS |          |       |  59000.00 |   2
-          | CPA      | 30.00 |  59000.00 |   2
-          | CPA      |       |  59000.00 |   2
-          | ENGINEER | 20.00 | 121000.00 |   4
-          | ENGINEER |       | 121000.00 |   4
-          | MANAGER  | 15.00 |  52000.00 |   1
-          | MANAGER  | 20.00 |  56000.00 |   1
-          | MANAGER  |       | 108000.00 |   2
-          | SALES I  | 15.00 |  45000.00 |   2
-          | SALES I  | 20.00 |  25000.00 |   1
-          | SALES I  |       |  70000.00 |   3
-          |          | 15.00 |  97000.00 |   3
-          |          | 20.00 | 202000.00 |   6
-          |          | 30.00 |  59000.00 |   2
-          |          |       | 358000.00 |  11
-(32 rows)
-
--- grouping sets
-select  loc ,job,comm,sum(sal) as sum from sto_uao_emp_groupby,sto_uao_dept_groupby where sto_uao_emp_groupby.dept=sto_uao_dept_groupby.deptno
-group by grouping sets ((loc,job),  (loc,comm)) 
-order by loc,job,comm;
-   loc    |   job    | comm  |    sum    
-----------+----------+-------+-----------
- ATLANTA  | MANAGER  |       |  52000.00
- ATLANTA  | SALES I  |       |  70000.00
- ATLANTA  |          | 15.00 |  97000.00
- ATLANTA  |          | 20.00 |  25000.00
- NEW YORK | ENGINEER |       | 121000.00
- NEW YORK | MANAGER  |       |  56000.00
- NEW YORK |          | 20.00 | 177000.00
- SEATTLE  | ADMIN    |       |  36000.00
- SEATTLE  | CEO      |       |  75000.00
- SEATTLE  | MANAGER  |       |  54000.00
- SEATTLE  | TECH     |       |  47500.00
- SEATTLE  |          | 10.00 |  18000.00
- SEATTLE  |          | 15.00 |  65500.00
- SEATTLE  |          | 20.00 |  54000.00
- SEATTLE  |          | 30.00 |  75000.00
- ST LOUIS | CPA      |       |  59000.00
- ST LOUIS |          | 30.00 |  59000.00
-(17 rows)
-
--- grouping set , rollup
-select  loc ,job, sum(sal) from sto_uao_emp_groupby,sto_uao_dept_groupby where sto_uao_emp_groupby.dept=sto_uao_dept_groupby.deptno
-group by grouping sets (loc, rollup (loc,job) ) 
-order by loc,job ;
-   loc    |   job    |    sum    
-----------+----------+-----------
- ATLANTA  | MANAGER  |  52000.00
- ATLANTA  | SALES I  |  70000.00
- ATLANTA  |          | 122000.00
- ATLANTA  |          | 122000.00
- NEW YORK | ENGINEER | 121000.00
- NEW YORK | MANAGER  |  56000.00
- NEW YORK |          | 177000.00
- NEW YORK |          | 177000.00
- SEATTLE  | ADMIN    |  36000.00
- SEATTLE  | CEO      |  75000.00
- SEATTLE  | MANAGER  |  54000.00
- SEATTLE  | TECH     |  47500.00
- SEATTLE  |          | 212500.00
- SEATTLE  |          | 212500.00
- ST LOUIS | CPA      |  59000.00
- ST LOUIS |          |  59000.00
- ST LOUIS |          |  59000.00
-          |          | 570500.00
-(18 rows)
-
--- @description : Create Data and execute select statements on UAO tables  HAVING
---
-DROP TABLE IF EXISTS city_uao cascade;
-DROP TABLE IF EXISTS country_uao cascade;
-DROP TABLE IF EXISTS countrylanguage_uao cascade;
-BEGIN;
-CREATE TABLE city_uao (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao (id, name, countrycode, district, population) FROM '@abs_srcdir@/data/city.data';
-COPY country_uao (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao;
-ANALYZE country_uao;
-ANALYZE countrylanguage_uao;
---queries with HAVING clause
-with notdiversecountries_uao as
-(select country_uao.code,country_uao.name,country_uao.capital,d.CNT
- from country_uao,
- (select countrylanguage_uao.countrycode,count(*) as CNT from countrylanguage_uao group by countrycode
-  HAVING count(*) < 3) d
- where d.countrycode = country_uao.code and country_uao.gnp > 100000)
-select country_uao.name COUNTRY,city_uao.name CAPITAL,count(*) LANGCNT from
-country_uao,city_uao,countrylanguage_uao
-where country_uao.code = countrylanguage_uao.countrycode and country_uao.capital = city_uao.id
-group by country_uao.name,city_uao.name
-HAVING count(*) NOT IN (select CNT from notdiversecountries_uao where notdiversecountries_uao.name = country_uao.name)
-order by country_uao.name
-LIMIT 10;
-       country       |     capital      | langcnt 
----------------------+------------------+---------
- Afghanistan         | Kabul            |       5
- Albania             | Tirana           |       3
- Algeria             | Alger            |       2
- American Samoa      | Fagatogo         |       3
- Andorra             | Andorra la Vella |       4
- Angola              | Luanda           |       9
- Anguilla            | The Valley       |       1
- Antigua and Barbuda | Saint Johns      |       2
- Argentina           | Buenos Aires     |       3
- Armenia             | Yerevan          |       2
-(10 rows)
-
--- @Description select inner/right join
---
-DROP TABLE IF EXISTS sto_uao_emp_rightjoin cascade;
-CREATE TABLE sto_uao_emp_rightjoin (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_rightjoin values
-(1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,7)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_rightjoin cascade;
-CREATE TABLE sto_uao_dept_rightjoin (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_rightjoin values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(5,'LOGISTICS','BOSTON')
-,(4, 'OPERATIONS','SEATTLE');
-select ename, loc from sto_uao_emp_rightjoin left inner join sto_uao_dept_rightjoin on  sto_uao_dept_rightjoin.deptno = sto_uao_emp_rightjoin.dept order by 1 asc, 2 asc; 
-ERROR:  syntax error at or near "inner"
-LINE 1: select ename, loc from sto_uao_emp_rightjoin left inner join...
-                                                          ^
--- @description : Create Data and execute select statements on UAO tables INTERSECT
---
-DROP TABLE IF EXISTS city_uao cascade;
-DROP TABLE IF EXISTS country_uao cascade;
-DROP TABLE IF EXISTS countrylanguage_uao cascade;
-BEGIN;
-CREATE TABLE city_uao (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao (id, name, countrycode, district, population) FROM stdin;
-COPY country_uao (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM stdin WITH NULL AS '';
-COPY countrylanguage_uao (countrycode, "language", isofficial, percentage) FROM stdin;
-COMMIT;
-ANALYZE city_uao;
-ANALYZE country_uao;
-ANALYZE countrylanguage_uao;
--- Using  EXCEPT clause
-select population from city_uao where countrycode = 'CAN'
-INTERSECT
-select population from city_uao where countrycode = 'MEX';
- population 
-------------
-      92686
-(1 row)
-
--- @description : Create Data and execute select statements on UAO tables LIMIT OFFSET 
---
-DROP TABLE IF EXISTS sto_uao_emp_limit_offset;
-CREATE TABLE sto_uao_emp_limit_offset (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_limit_offset values 
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-select * from sto_uao_emp_limit_offset  order by empno LIMIT 7 ;
- empno |  ename   |   job   | mgr |  hiredate  |   sal    | comm  | dept 
--------+----------+---------+-----+------------+----------+-------+------
-     1 | JOHNSON  | ADMIN   |   6 | 12-17-1990 | 18000.00 | 10.00 |    4
-     2 | HARDING  | MANAGER |   9 | 02-02-1998 | 52000.00 | 15.00 |    3
-     3 | TAFT     | SALES I |   2 | 01-02-1996 | 25000.00 | 20.00 |    3
-     4 | HOOVER   | SALES I |   2 | 04-02-1990 | 27000.00 | 15.00 |    3
-     5 | LINCOLN  | TECH    |   6 | 06-23-1994 | 22500.00 | 15.00 |    4
-     6 | GARFIELD | MANAGER |   9 | 05-01-1993 | 54000.00 | 20.00 |    4
-     7 | POLK     | TECH    |   6 | 09-22-1997 | 25000.00 | 15.00 |    4
-(7 rows)
-
-select * from sto_uao_emp_limit_offset  order by empno LIMIT 7 OFFSET 5;
- empno |   ename    |   job    | mgr |  hiredate  |   sal    | comm  | dept 
--------+------------+----------+-----+------------+----------+-------+------
-     6 | GARFIELD   | MANAGER  |   9 | 05-01-1993 | 54000.00 | 20.00 |    4
-     7 | POLK       | TECH     |   6 | 09-22-1997 | 25000.00 | 15.00 |    4
-     8 | GRANT      | ENGINEER |  10 | 03-30-1997 | 32000.00 | 20.00 |    2
-     9 | JACKSON    | CEO      |     | 01-01-1990 | 75000.00 | 30.00 |    4
-    10 | FILLMORE   | MANAGER  |   9 | 08-09-1994 | 56000.00 | 20.00 |    2
-    11 | ADAMS      | ENGINEER |  10 | 03-15-1996 | 34000.00 | 20.00 |    2
-    12 | WASHINGTON | ADMIN    |   6 | 04-16-1998 | 18000.00 | 15.00 |    4
-(7 rows)
-
--- @description : Create Data and execute select statements on UAO tables ORDER BY ASC DESC USING 
---
---
-DROP TABLE IF EXISTS city_uao_using cascade;
-DROP TABLE IF EXISTS country_uao_using cascade;
-DROP TABLE IF EXISTS countrylanguage_uao_using cascade;
-BEGIN;
-CREATE TABLE city_uao_using (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao_using (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao_using (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao_using (id, name, countrycode, district, population) FROM stdin;
-COPY country_uao_using (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao_using (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao_using;
-ANALYZE country_uao_using;
-ANALYZE countrylanguage_uao_using;
---query1
-with capitals_uao as 
-(select country_uao_using.code,id,city_uao_using.name from city_uao_using,country_uao_using 
- where city_uao_using.countrycode = country_uao_using.code AND city_uao_using.id = country_uao_using.capital) 
-select capitals_uao.code,language from 
-capitals_uao,countrylanguage_uao_using
-where capitals_uao.code = countrylanguage_uao_using.countrycode and isofficial='true'
-order by capitals_uao.code asc,countrylanguage_uao_using.language asc LIMIT 10;
- code |  language  
-------+------------
- AFG  | Dari
- AFG  | Pashto
- AIA  | English
- ALB  | Albaniana
- AND  | Catalan
- ANT  | Dutch
- ANT  | Papiamento
- ARE  | Arabic
- ARG  | Spanish
- ASM  | English
-(10 rows)
-
-with capitals_uao as
-(select country_uao_using.code,id,city_uao_using.name from city_uao_using,country_uao_using
- where city_uao_using.countrycode = country_uao_using.code AND city_uao_using.id = country_uao_using.capital)
-select capitals_uao.code,language from
-capitals_uao,countrylanguage_uao_using
-where capitals_uao.code = countrylanguage_uao_using.countrycode and isofficial='true'
-order by capitals_uao.code desc, 2 desc LIMIT 10;
- code |  language  
-------+------------
- NLD  | Dutch
- DZA  | Arabic
- ATG  | English
- ASM  | Samoan
- ASM  | English
- ARG  | Spanish
- ARE  | Arabic
- ANT  | Papiamento
- ANT  | Dutch
- AND  | Catalan
-(10 rows)
-
-with capitals_uao as
-(select country_uao_using.code,id,city_uao_using.name from city_uao_using,country_uao_using
- where city_uao_using.countrycode = country_uao_using.code AND city_uao_using.id = country_uao_using.capital)
-select capitals_uao.code,language from
-capitals_uao,countrylanguage_uao_using
-where capitals_uao.code = countrylanguage_uao_using.countrycode and isofficial='true'
-order by capitals_uao.code asc,countrylanguage_uao_using.language desc LIMIT 10;
- code |  language  
-------+------------
- AFG  | Pashto
- AFG  | Dari
- AIA  | English
- ALB  | Albaniana
- AND  | Catalan
- ANT  | Papiamento
- ANT  | Dutch
- ARE  | Arabic
- ARG  | Spanish
- ASM  | Samoan
-(10 rows)
-
-with capitals_uao as
-(select country_uao_using.code,id,city_uao_using.name from city_uao_using,country_uao_using
- where city_uao_using.countrycode = country_uao_using.code AND city_uao_using.id = country_uao_using.capital)
-select capitals_uao.code,language from
-capitals_uao,countrylanguage_uao_using
-where capitals_uao.code = countrylanguage_uao_using.countrycode and isofficial='true'
-order by capitals_uao.code using > , 2  using > LIMIT 10;
- code |  language  
-------+------------
- NLD  | Dutch
- DZA  | Arabic
- ATG  | English
- ASM  | Samoan
- ASM  | English
- ARG  | Spanish
- ARE  | Arabic
- ANT  | Papiamento
- ANT  | Dutch
- AND  | Catalan
-(10 rows)
-
-with capitals_uao as
-(select country_uao_using.code,id,city_uao_using.name from city_uao_using,country_uao_using
- where city_uao_using.countrycode = country_uao_using.code AND city_uao_using.id = country_uao_using.capital)
-select capitals_uao.code,language from
-capitals_uao,countrylanguage_uao_using
-where capitals_uao.code = countrylanguage_uao_using.countrycode and isofficial='true'
-order by capitals_uao.code USING < , 2 using < LIMIT 10;
- code |  language  
-------+------------
- AFG  | Dari
- AFG  | Pashto
- AIA  | English
- ALB  | Albaniana
- AND  | Catalan
- ANT  | Dutch
- ANT  | Papiamento
- ARE  | Arabic
- ARG  | Spanish
- ASM  | English
-(10 rows)
-
--- @Description select outer/left join
---
-DROP TABLE IF EXISTS sto_uao_emp_leftjoin cascade;
-CREATE TABLE sto_uao_emp_leftjoin (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_leftjoin values
-(1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,7)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_leftjoin cascade;
-CREATE TABLE sto_uao_dept_leftjoin (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_leftjoin values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(5,'LOGISTICS','BOSTON')
-,(4, 'OPERATIONS','SEATTLE');
-select ename, loc from sto_uao_emp_leftjoin left join sto_uao_dept_leftjoin on  sto_uao_dept_leftjoin.deptno = sto_uao_emp_leftjoin.dept order by 1 asc, 2 asc; 
-   ename    |   loc    
-------------+----------
- ADAMS      | NEW YORK
- CLINT      | ST LOUIS
- FILLMORE   | NEW YORK
- GARFIELD   | SEATTLE
- GRANT      | NEW YORK
- HARDING    | ATLANTA
- HOOVER     | ATLANTA
- JACKSON    | SEATTLE
- JOHNSON    | SEATTLE
- LINCOLN    | SEATTLE
- MONROE     | 
- More       | NEW YORK
- POLK       | SEATTLE
- ROOSEVELT  | ST LOUIS
- ROSE       | ATLANTA
- TAFT       | ATLANTA
- WASHINGTON | SEATTLE
-(17 rows)
-
--- @Description select with subquery
---
-DROP TABLE IF EXISTS country_uao_subq cascade;
-BEGIN;
-CREATE TABLE country_uao_subq (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-COPY country_uao_subq (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COMMIT;
-ANALYZE country_uao_subq;
--- Using subquery
-select *
-from
-country_uao_subq
-where code in (select code from country_uao_subq where gnp between 80000 and 100000)
-and code in (select code from country_uao_subq where lifeexpectancy between 70 and 80)
-and code in (select code from country_uao_subq where  indepyear between 1800 and 1900);
- code |   name    |   continent   |    region     | surfacearea | indepyear | population | lifeexpectancy |   gnp    |  gnpold  | localname |  governmentform  |    headofstate    | capital | code2 
-------+-----------+---------------+---------------+-------------+-----------+------------+----------------+----------+----------+-----------+------------------+-------------------+---------+-------
- VEN  | Venezuela | South America | South America |      912050 |      1811 |   24170000 |           73.1 | 95023.00 | 88434.00 | Venezuela | Federal Republic | Hugo Chavez Frias |    3539 | VE
-(1 row)
-
--- @Description select with with UNION , UNION ALL 
---
-DROP TABLE IF EXISTS city_uao_union cascade;
-DROP TABLE IF EXISTS country_uao_union cascade;
-DROP TABLE IF EXISTS countrylanguage_uao_union cascade;
-BEGIN;
-CREATE TABLE city_uao_union (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao_union (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao_union (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao_union (id, name, countrycode, district, population) FROM '@abs_srcdir@/data/city.data';
-COPY country_uao_union (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao_union (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao_union;
-ANALYZE country_uao_union;
-ANALYZE countrylanguage_uao_union;
---queries Using Union All and except
-with somecheapasiandiversecountries_uao as
-(
- select FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,count(*) ASIAN_COUNT from
- (
- select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
- from country_uao_union,city_uao_union
- where country_uao_union.capital = city_uao_union.id 
- and country_uao_union.gnp < 10000
- and country_uao_union.region = 'Southeast Asia'
- and country_uao_union.continent = 'Asia'
- 
- UNION ALL
- select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
- from country_uao_union,city_uao_union
- where country_uao_union.capital = city_uao_union.id 
- and country_uao_union.gnp < 10000
- and country_uao_union.region = 'Eastern Asia'
- and country_uao_union.continent = 'Asia'
- UNION ALL
- select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
- from country_uao_union,city_uao_union
- where country_uao_union.capital = city_uao_union.id 
- and country_uao_union.gnp < 10000
- and country_uao_union.region = 'Middle East'
- and country_uao_union.continent = 'Asia'
- ) FOO_uao, countrylanguage_uao_union
- where FOO_uao.code = countrylanguage_uao_union.countrycode
- group by FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,countrylanguage_uao_union.countrycode
- HAVING count(*) >=
- (select min(CNT) FROM
-   (select count(*) CNT,country_uao_union.code from countrylanguage_uao_union,country_uao_union
-    where countrylanguage_uao_union.countrycode=country_uao_union.code
-    and country_uao_union.continent = 'Asia'
-    and country_uao_union.region = 'Southern and Central Asia'
-    group by country_uao_union.code
-   ) FOO1_uao
- )
-)
-select FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,count(*) compared_with_cheap_asian_cnt
-from
-(
-select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
-from country_uao_union,city_uao_union
-where country_uao_union.capital = city_uao_union.id 
-and country_uao_union.continent = 'North America'
-UNION ALL
-select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
-from country_uao_union,city_uao_union
-where country_uao_union.capital =	city_uao_union.id	
-and country_uao_union.continent =	'South America'
-EXCEPT
-select country_uao_union.code,country_uao_union.name COUNTRY,city_uao_union.name CAPITAL,country_uao_union.headofstate
-from country_uao_union,city_uao_union
-where 
-country_uao_union.capital =     city_uao_union.id
-and country_uao_union.code='GTM'
-) FOO_uao,countrylanguage_uao_union
-where FOO_uao.code = countrylanguage_uao_union.countrycode
-group by FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate
-HAVING count(*)  >=
- (select min(ASIAN_COUNT) FROM
-   (select ASIAN_COUNT FROM somecheapasiandiversecountries_uao,country_uao_union
-    where somecheapasiandiversecountries_uao.code = country_uao_union.code
-    and country_uao_union.gnp >= country_uao_union.gnpold
-   ) ASIANCOUNT
- )
-order by compared_with_cheap_asian_cnt desc, 1 asc
-LIMIT 10;
- code |    country    |      capital      |          headofstate           | compared_with_cheap_asian_cnt 
-------+---------------+-------------------+--------------------------------+-------------------------------
- CAN  | Canada        | Ottawa            | Elisabeth II                   |                            12
- USA  | United States | Washington        | George W. Bush                 |                            12
- MEX  | Mexico        | Ciudad de Mexico  | Vicente Fox Quesada            |                             6
- PAN  | Panama        | Ciudad de Panama  | Mireya Elisa Moscoso Rodriguez |                             6
- BRA  | Brazil        | Brasilia          | Fernando Henrique Cardoso      |                             5
- COL  | Colombia      | Santafe de Bogota | Andres Pastrana Arango         |                             5
- ABW  | Aruba         | Oranjestad        | Beatrix                        |                             4
- BLZ  | Belize        | Belmopan          | Elisabeth II                   |                             4
- BOL  | Bolivia       | La Paz            | Hugo Banzer Suarez             |                             4
- CHL  | Chile         | Santiago de Chile | Ricardo Lagos Escobar          |                             4
-(10 rows)
-
--- @Description PostgreSQL port of the MySQL "World" database.
---
--- The sample data used in the world database is Copyright Statistics 
--- Finland, http://www.stat.fi/worldinfigures.
---
--- Modified to use it with GPDB
-DROP TABLE IF EXISTS city_uao cascade;
-DROP TABLE IF EXISTS country_uao cascade;
-DROP TABLE IF EXISTS countrylanguage_uao cascade;
-BEGIN;
-CREATE TABLE city_uao (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao (id, name, countrycode, district, population) FROM '@abs_srcdir@/data/city.data';
-COPY country_uao (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao;
-ANALYZE country_uao;
-ANALYZE countrylanguage_uao;
--- queries with one CTE that is referenced once
--- Using CTE in the FROM clause
---queries Using a CTE in the HAVING clause and Union All
-with somecheapasiandiversecountries_uao as
-(
- select FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,count(*) ASIAN_COUNT from
- (
- select country_uao.code,country_uao.name COUNTRY,city_uao.name CAPITAL,country_uao.headofstate
- from country_uao,city_uao
- where country_uao.capital = city_uao.id 
- and country_uao.gnp < 10000
- and country_uao.region = 'Southeast Asia'
- and country_uao.continent = 'Asia'
- UNION ALL
- select country_uao.code,country_uao.name COUNTRY,city_uao.name CAPITAL,country_uao.headofstate
- from country_uao,city_uao
- where country_uao.capital = city_uao.id 
- and country_uao.gnp < 10000
- and country_uao.region = 'Eastern Asia'
- and country_uao.continent = 'Asia'
- UNION ALL
- select country_uao.code,country_uao.name COUNTRY,city_uao.name CAPITAL,country_uao.headofstate
- from country_uao,city_uao
- where country_uao.capital = city_uao.id 
- and country_uao.gnp < 10000
- and country_uao.region = 'Middle East'
- and country_uao.continent = 'Asia'
- ) FOO_uao, countrylanguage_uao
- where FOO_uao.code = countrylanguage_uao.countrycode
- group by FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,countrylanguage_uao.countrycode
- HAVING count(*) >=
- (select min(CNT) FROM
-   (select count(*) CNT,country_uao.code from countrylanguage_uao,country_uao
-    where countrylanguage_uao.countrycode=country_uao.code
-    and country_uao.continent = 'Asia'
-    and country_uao.region = 'Southern and Central Asia'
-    group by country_uao.code
-   ) FOO1_uao
- )
-)
-select FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate,count(*) compared_with_cheap_asian_cnt
-from
-(
-select country_uao.code,country_uao.name COUNTRY,city_uao.name CAPITAL,country_uao.headofstate
-from country_uao,city_uao
-where country_uao.capital = city_uao.id 
-and country_uao.continent = 'North America'
-UNION ALL
-select country_uao.code,country_uao.name COUNTRY,city_uao.name CAPITAL,country_uao.headofstate
-from country_uao,city_uao
-where country_uao.capital =	city_uao.id	
-and country_uao.continent =	'South America'
-) FOO_uao,countrylanguage_uao
-where FOO_uao.code = countrylanguage_uao.countrycode
-group by FOO_uao.code,FOO_uao.COUNTRY,FOO_uao.CAPITAL,FOO_uao.headofstate
-HAVING count(*)  >=
- (select min(ASIAN_COUNT) FROM
-   (select ASIAN_COUNT FROM somecheapasiandiversecountries_uao,country_uao
-    where somecheapasiandiversecountries_uao.code = country_uao.code
-    and country_uao.gnp >= country_uao.gnpold
-   ) ASIANCOUNT
- )
-order by compared_with_cheap_asian_cnt desc , 1 desc
-LIMIT 10;
- code |    country    |       capital       |          headofstate           | compared_with_cheap_asian_cnt 
-------+---------------+---------------------+--------------------------------+-------------------------------
- USA  | United States | Washington          | George W. Bush                 |                            12
- CAN  | Canada        | Ottawa              | Elisabeth II                   |                            12
- PAN  | Panama        | Ciudad de Panama    | Mireya Elisa Moscoso Rodriguez |                             6
- MEX  | Mexico        | Ciudad de Mexico    | Vicente Fox Quesada            |                             6
- GTM  | Guatemala     | Ciudad de Guatemala | Alfonso Portillo Cabrera       |                             5
- COL  | Colombia      | Santafe de Bogota   | Andres Pastrana Arango         |                             5
- BRA  | Brazil        | Brasilia            | Fernando Henrique Cardoso      |                             5
- PRY  | Paraguay      | Asuncion            | Luis Angel Gonzalez Macchi     |                             4
- NIC  | Nicaragua     | Managua             | Arnoldo Aleman Lacayo          |                             4
- HND  | Honduras      | Tegucigalpa         | Carlos Roberto Flores Facusse  |                             4
-(10 rows)
-
--- @description : Create view and execute select from view
---
-DROP TABLE IF EXISTS sto_uao_emp_forview cascade;
-CREATE TABLE sto_uao_emp_forview (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_forview values 
- (1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,2)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_forview cascade;
-CREATE TABLE sto_uao_dept_forview (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_forview values 
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(4, 'OPERATIONS','SEATTLE');
--- Create view
-create or replace view sto_uao_emp_view as
-select empno,ename,job,mgr,hiredate,sal,comm,dname,loc from sto_uao_dept_forview, sto_uao_emp_forview where sto_uao_dept_forview.deptno = sto_uao_emp_forview.dept; 
-select * from sto_uao_emp_view  where mgr is not NULL order by 1;
- empno |   ename    |   job    | mgr |  hiredate  |   sal    | comm  |   dname    |   loc    
--------+------------+----------+-----+------------+----------+-------+------------+----------
-     1 | JOHNSON    | ADMIN    |   6 | 12-17-1990 | 18000.00 | 10.00 | OPERATIONS | SEATTLE
-     2 | HARDING    | MANAGER  |   9 | 02-02-1998 | 52000.00 | 15.00 | SALES      | ATLANTA
-     3 | TAFT       | SALES I  |   2 | 01-02-1996 | 25000.00 | 20.00 | SALES      | ATLANTA
-     4 | HOOVER     | SALES I  |   2 | 04-02-1990 | 27000.00 | 15.00 | SALES      | ATLANTA
-     5 | LINCOLN    | TECH     |   6 | 06-23-1994 | 22500.00 | 15.00 | OPERATIONS | SEATTLE
-     6 | GARFIELD   | MANAGER  |   9 | 05-01-1993 | 54000.00 | 20.00 | OPERATIONS | SEATTLE
-     7 | POLK       | TECH     |   6 | 09-22-1997 | 25000.00 | 15.00 | OPERATIONS | SEATTLE
-     8 | GRANT      | ENGINEER |  10 | 03-30-1997 | 32000.00 | 20.00 | RESEARCH   | NEW YORK
-    10 | FILLMORE   | MANAGER  |   9 | 08-09-1994 | 56000.00 | 20.00 | RESEARCH   | NEW YORK
-    11 | ADAMS      | ENGINEER |  10 | 03-15-1996 | 34000.00 | 20.00 | RESEARCH   | NEW YORK
-    12 | WASHINGTON | ADMIN    |   6 | 04-16-1998 | 18000.00 | 15.00 | OPERATIONS | SEATTLE
-    13 | MONROE     | ENGINEER |  10 | 12-03-2000 | 30000.00 | 20.00 | RESEARCH   | NEW YORK
-    14 | ROOSEVELT  | CPA      |   9 | 10-12-1995 | 35000.00 | 30.00 | ACCOUNTING | ST LOUIS
-    15 | More       | ENGINEER |   9 | 10-12-1994 | 25000.00 | 20.00 | RESEARCH   | NEW YORK
-    16 | ROSE       | SALES I  |  10 | 10-12-1999 | 18000.00 | 15.00 | SALES      | ATLANTA
-    17 | CLINT      | CPA      |   2 | 10-12-2001 | 24000.00 | 30.00 | ACCOUNTING | ST LOUIS
-(16 rows)
-
--- @Description select with where clause
---
-DROP TABLE IF EXISTS city_uao_where cascade;
-DROP TABLE IF EXISTS country_uao_where cascade;
-DROP TABLE IF EXISTS countrylanguage_uao_where cascade;
-BEGIN;
-CREATE TABLE city_uao_where (
-    id integer NOT NULL,
-    name text NOT NULL,
-    countrycode character(3) NOT NULL,
-    district text NOT NULL,
-    population integer NOT NULL
-) distributed by(id);
-CREATE TABLE country_uao_where (
-    code character(3) NOT NULL,
-    name text NOT NULL,
-    continent text NOT NULL,
-    region text NOT NULL,
-    surfacearea real NOT NULL,
-    indepyear smallint,
-    population integer NOT NULL,
-    lifeexpectancy real,
-    gnp numeric(10,2),
-    gnpold numeric(10,2),
-    localname text NOT NULL,
-    governmentform text NOT NULL,
-    headofstate text,
-    capital integer,
-    code2 character(2) NOT NULL
-) distributed by (code);
-CREATE TABLE countrylanguage_uao_where (
-    countrycode character(3) NOT NULL,
-    "language" text NOT NULL,
-    isofficial boolean NOT NULL,
-    percentage real NOT NULL
-) distributed by (countrycode,language);
-COPY city_uao_where (id, name, countrycode, district, population) FROM '@abs_srcdir@/data/city.data';
-COPY country_uao_where (code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2) FROM '@abs_srcdir@/data/country.data' WITH NULL AS '';
-COPY countrylanguage_uao_where (countrycode, "language", isofficial, percentage) FROM '@abs_srcdir@/data/countrylanguage.data';
-COMMIT;
-ANALYZE city_uao_where;
-ANALYZE country_uao_where;
-ANALYZE countrylanguage_uao_where;
--- Using  WHERE clause
-with lang_total_uao as
-( select lang_count,countrycode from
-  (
-  (
-   select count(*) as lang_count,country_uao_where.code,countrylanguage_uao_where.countrycode
-  from country_uao_where join countrylanguage_uao_where on (country_uao_where.code=countrylanguage_uao_where.countrycode and governmentform='Federal Republic')
-  group by country_uao_where.code,countrylanguage_uao_where.countrycode order by country_uao_where.code)
- 
-   UNION ALL
- 
-  (
-   select count(*) as lang_count,country_uao_where.code,countrylanguage_uao_where.countrycode
-  from country_uao_where join countrylanguage_uao_where on (country_uao_where.code=countrylanguage_uao_where.countrycode and governmentform='Monarchy')
-  group by country_uao_where.code,countrylanguage_uao_where.countrycode order by country_uao_where.code)
- 
- ) FOO1_uao
-)
-select * from
-(
-select count(*) as cnt,country_uao_where.code,country_uao_where.name 
-from
-country_uao_where,countrylanguage_uao_where
-where country_uao_where.code=countrylanguage_uao_where.countrycode group by country_uao_where.code,country_uao_where.name) AS FOO_uao
-where foo_uao.cnt = (select max(lang_count) from lang_total_uao) order by foo_uao.code;
- cnt | code |        name        
------+------+--------------------
-  12 | CAN  | Canada
-  12 | CHN  | China
-  12 | IND  | India
-  12 | RUS  | Russian Federation
-  12 | USA  | United States
-(5 rows)
-
--- @Description select wildcard 
---
-DROP TABLE IF EXISTS sto_uao_emp_wildcard cascade;
-CREATE TABLE sto_uao_emp_wildcard (
-   empno    INT  ,
-   ename    VARCHAR(10),
-   job      VARCHAR(9),
-   mgr      INT NULL,
-   hiredate DATE,
-   sal      NUMERIC(7,2),
-   comm     NUMERIC(7,2) NULL,
-   dept     INT) distributed by (empno);
-insert into sto_uao_emp_wildcard values
-(1,'JOHNSON','ADMIN',6,'12-17-1990',18000,10,4)
-,(2,'HARDING','MANAGER',9,'02-02-1998',52000,15,3)
-,(3,'TAFT','SALES I',2,'01-02-1996',25000,20,3)
-,(4,'HOOVER','SALES I',2,'04-02-1990',27000,15,3)
-,(5,'LINCOLN','TECH',6,'06-23-1994',22500,15,4)
-,(6,'GARFIELD','MANAGER',9,'05-01-1993',54000,20,4)
-,(7,'POLK','TECH',6,'09-22-1997',25000,15,4)
-,(8,'GRANT','ENGINEER',10,'03-30-1997',32000,20,2)
-,(9,'JACKSON','CEO',NULL,'01-01-1990',75000,30,4)
-,(10,'FILLMORE','MANAGER',9,'08-09-1994',56000,20,2)
-,(11,'ADAMS','ENGINEER',10,'03-15-1996',34000,20,2)
-,(12,'WASHINGTON','ADMIN',6,'04-16-1998',18000,15,4)
-,(13,'MONROE','ENGINEER',10,'12-03-2000',30000,20,7)
-,(14,'ROOSEVELT','CPA',9,'10-12-1995',35000,30,1)
-,(15,'More','ENGINEER',9,'10-12-1994',25000,20,2)
-,(16,'ROSE','SALES I',10,'10-12-1999',18000,15,3)
-,(17,'CLINT','CPA',2,'10-12-2001',24000,30,1);
-DROP TABLE IF EXISTS sto_uao_dept_wildcard cascade;
-CREATE TABLE sto_uao_dept_wildcard (
-   deptno INT NOT NULL,
-   dname  VARCHAR(14),
-   loc    VARCHAR(13)) distributed by (deptno);
-insert into sto_uao_dept_wildcard values
- (1,'ACCOUNTING','ST LOUIS')
-,(2,'RESEARCH','NEW YORK')
-,(3,'SALES','ATLANTA')
-,(5,'LOGISTICS','BOSTON')
-,(4, 'OPERATIONS','SEATTLE');
-select ename from sto_uao_emp_wildcard where dept in ( select deptno from  sto_uao_dept_wildcard  where dname like '%S')
-AND ename like 'H%' order by 1 asc LIMIT 15; 
-  ename  
----------
- HARDING
- HOOVER
-(2 rows)
-
--- @Description select with window 
---
-DROP TABLE IF EXISTS uao_orders;
-CREATE TABLE uao_orders(order_id serial , customer_id integer, 
-      order_datetime timestamp, order_total numeric(10,2));
-NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'order_id' as the Apache Cloudberry data distribution key for this table.
-HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-INSERT INTO uao_orders(customer_id, order_datetime, order_total)
-VALUES (1,'2009-05-01 10:00 AM', 500),
-    (1,'2009-05-15 11:00 AM', 650),
-    (2,'2009-05-11 11:00 PM', 100),
-    (2,'2009-05-12 11:00 PM', 5),
-       (3,'2009-04-11 11:00 PM', 100),
-          (1,'2009-05-20 11:00 AM', 3);
-select * from uao_orders order by order_id;
- order_id | customer_id |      order_datetime      | order_total 
-----------+-------------+--------------------------+-------------
-        1 |           1 | Fri May 01 10:00:00 2009 |      500.00
-        2 |           1 | Fri May 15 11:00:00 2009 |      650.00
-        3 |           2 | Mon May 11 23:00:00 2009 |      100.00
-        4 |           2 | Tue May 12 23:00:00 2009 |        5.00
-        5 |           3 | Sat Apr 11 23:00:00 2009 |      100.00
-        6 |           1 | Wed May 20 11:00:00 2009 |        3.00
-(6 rows)
-
-SELECT row_number()  OVER(window_custtime) As rtime_d, 
-n.customer_id, lead(order_id) OVER(window_custtime) As cr_num, n.order_id, n.order_total
-FROM uao_orders AS n 
-WINDOW window_custtime AS (PARTITION BY n.customer_id 
-                               ORDER BY n.customer_id, n.order_id, n.order_total)
-ORDER BY  1, 2;
- rtime_d | customer_id | cr_num | order_id | order_total 
----------+-------------+--------+----------+-------------
-       1 |           1 |      2 |        1 |      500.00
-       1 |           2 |      4 |        3 |      100.00
-       1 |           3 |        |        5 |      100.00
-       2 |           1 |      6 |        2 |      650.00
-       2 |           2 |        |        4 |        5.00
-       3 |           1 |        |        6 |        3.00
-(6 rows)
-
diff --git a/src/test/regress/expected/uao_dml/uao_dml_unique_index_delete.out b/src/test/regress/expected/uao_dml/uao_dml_unique_index_delete.out
deleted file mode 100644
index 3d9ce087e0b..00000000000
--- a/src/test/regress/expected/uao_dml/uao_dml_unique_index_delete.out
+++ /dev/null
@@ -1,136 +0,0 @@
-create schema uao_dml_unique_index_@amname@;
-set search_path=uao_dml_unique_index_@amname@;
-set default_table_access_method=@amname@;
--- Case 1: Inserting tx inserting a deleted key---------------------------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-INSERT INTO uao_unique_index_delete VALUES (1);
-DELETE FROM uao_unique_index_delete WHERE a = 1;
--- Should not raise a conflict as the key has been deleted.
-INSERT INTO uao_unique_index_delete VALUES (1);
-SELECT * FROM uao_unique_index_delete;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_delete;
--- Case 2: Inserting tx inserting a key whose delete was aborted----------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-INSERT INTO uao_unique_index_delete VALUES (1);
-BEGIN;
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-ABORT;
--- Should raise a conflict as the delete of the key was aborted.
-INSERT INTO uao_unique_index_delete VALUES (1);
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_delete_a_key"  (seg1 192.168.0.148:7003 pid=1637278)
-DETAIL:  Key (a)=(1) already exists.
-SELECT * FROM uao_unique_index_delete;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_delete;
--- Case 3: Inserting tx inserting a key deleted in the same tx------------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-INSERT INTO uao_unique_index_delete VALUES (1);
-BEGIN;
-DELETE FROM uao_unique_index_delete WHERE a = 1;
--- should succeed as the INSERT should see that the conflicting key was deleted.
-INSERT INTO uao_unique_index_delete VALUES (1);
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_delete;
--- Case 4: Deleting tx deletes a key already deleted in the same tx-------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-INSERT INTO uao_unique_index_delete VALUES (1);
-BEGIN;
-DELETE FROM uao_unique_index_delete WHERE a = 1;
--- should be a no-op as it should see the prior DELETE.
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
-(0 rows)
-
-DROP TABLE uao_unique_index_delete;
--- Case 5: Deleting tx deletes a key inserted in the same tx--------------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-BEGIN;
-INSERT INTO uao_unique_index_delete VALUES (1);
--- should be able to see and delete the inserted key.
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
-(0 rows)
-
-DROP TABLE uao_unique_index_delete;
--- Case 6: Deleting tx deletes a key absent from the table----------------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
--- should be a no-op.
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-INSERT INTO uao_unique_index_delete VALUES (1);
--- should be a no-op.
-DELETE FROM uao_unique_index_delete WHERE a = 2;
-SELECT * FROM uao_unique_index_delete;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_delete;
--- Case 7: Deleting tx deletes a key inserted in the same subtx-----------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-BEGIN;
-SAVEPOINT a;
-INSERT INTO uao_unique_index_delete VALUES (1);
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
-(0 rows)
-
-DROP TABLE uao_unique_index_delete;
--- Case 8: Deleting tx deletes a key deleted in the same subtx------------------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-BEGIN;
-SAVEPOINT a;
-INSERT INTO uao_unique_index_delete VALUES (1);
-DELETE FROM uao_unique_index_delete WHERE a = 1;
--- should be a no-op
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
-(0 rows)
-
-DROP TABLE uao_unique_index_delete;
--- Case 9: Deleting tx deletes a key whose earlier delete was rolled back-------
-CREATE TABLE uao_unique_index_delete (a INT unique);
-INSERT INTO uao_unique_index_delete VALUES (1);
-BEGIN;
-SAVEPOINT a;
-DELETE FROM uao_unique_index_delete WHERE a = 1;
-ROLLBACK TO SAVEPOINT a;
--- should be able to delete it again.
-DELETE FROM uao_unique_index_delete WHERE a = 1;
--- should be able to insert it now since it has been deleted
-INSERT INTO uao_unique_index_delete VALUES (1);
-COMMIT;
-SELECT * FROM uao_unique_index_delete;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_delete;
diff --git a/src/test/regress/expected/uao_dml/uao_dml_unique_index_update.out b/src/test/regress/expected/uao_dml/uao_dml_unique_index_update.out
deleted file mode 100644
index a89689e094b..00000000000
--- a/src/test/regress/expected/uao_dml/uao_dml_unique_index_update.out
+++ /dev/null
@@ -1,246 +0,0 @@
-create schema uao_dml_unique_index_update_@amname@;
-set search_path=uao_dml_unique_index_update_@amname@;
-set default_table_access_method=@amname@;
--- Case 1: Inserting tx inserting a key affected by an update--------------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
--- Should not raise a conflict as the key has been deleted the update.
-INSERT INTO uao_unique_index_update VALUES (1);
--- Should raise a conflict as the key has been inserted by the update
-INSERT INTO uao_unique_index_update VALUES (2);
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg0 192.168.0.148:7002 pid=1927811)
-DETAIL:  Key (a)=(2) already exists.
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
- 1
-(2 rows)
-
-DROP TABLE uao_unique_index_update;
--- Case 2: Inserting tx inserting a key whose update was aborted----------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
-BEGIN;
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-ABORT;
--- Should raise a conflict as the update of the key was aborted.
-INSERT INTO uao_unique_index_update VALUES (1);
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg1 192.168.0.148:7003 pid=1927812)
-DETAIL:  Key (a)=(1) already exists.
--- Should not raise a conflict as the update of the key was aborted.
-INSERT INTO uao_unique_index_update VALUES (2);
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
- 1
-(2 rows)
-
-DROP TABLE uao_unique_index_update;
--- Case 3: Inserting tx inserting a key updated in the same tx------------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
-BEGIN;
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
--- should succeed as the conflicting key was deleted by the update.
-INSERT INTO uao_unique_index_update VALUES (1);
--- should raise a conflict as the key was inserted by the update.
-INSERT INTO uao_unique_index_update VALUES (2);
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg0 192.168.0.148:7002 pid=1927811)
-DETAIL:  Key (a)=(2) already exists.
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 4: Updating tx deletes a key already updated in the same tx-------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
-BEGIN;
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
--- should be a no-op as the key has already been deleted by the update
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
--- should succeed as the key has been inserted by the 1st update
-UPDATE uao_unique_index_update SET a = 3 WHERE a = 2;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 3
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 5: Updating tx updates a key inserted in the same tx--------------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-BEGIN;
-INSERT INTO uao_unique_index_update VALUES (1);
--- should be able to see and update the inserted key.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
-(1 row)
-
--- Case 6: Updating tx updates a key to a key inserted in the same tx-----------
-CREATE TABLE uao_unique_index_update (a INT unique);
-ERROR:  relation "uao_unique_index_update" already exists
-INSERT INTO uao_unique_index_update VALUES (1);
-BEGIN;
-INSERT INTO uao_unique_index_update VALUES (2);
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg0 192.168.0.148:7002 pid=1927811)
-DETAIL:  Key (a)=(2) already exists.
--- should raise a conflict with the key inserted inside the same tx.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-ERROR:  current transaction is aborted, commands ignored until end of transaction block
-END;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
- 1
-(2 rows)
-
-DROP TABLE uao_unique_index_update;
--- Case 7: Updating tx tries to update a key absent from the table--------------
-CREATE TABLE uao_unique_index_update (a INT unique);
--- should be a no-op.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-INSERT INTO uao_unique_index_update VALUES (1);
--- should be a no-op.
-UPDATE uao_unique_index_update SET a = 3 WHERE a = 2;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 8: Update where pre-update key = post-update key------------------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
--- should succeed even though the pre-update and post-update values are equal.
-UPDATE uao_unique_index_update SET a = 1 WHERE a = 1;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 1
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 8_1: Update where pre-update key = post-update key
--- but updates span multiple visimap rows---------------------------------------
-CREATE TABLE uao_unique_index_update_1 (a INT unique, b INT) DISTRIBUTED REPLICATED;
-INSERT INTO uao_unique_index_update_1 SELECT a, 1 FROM generate_series (1, 32768) a;
-UPDATE uao_unique_index_update_1 SET b = 2;
--- If we were to select the contents of the visimap relation on any of the
--- segments we would see 2 entries at this point, one with first_row_no = 0 and
--- the other with first_row_no = 32768.
-UPDATE uao_unique_index_update_1 SET b = 3;
-SELECT DISTINCT b FROM uao_unique_index_update_1;
- b 
----
- 3
-(1 row)
-
-DROP TABLE uao_unique_index_update_1;
--- Case 9: Updating tx inserts a key that already exists------------------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1), (2);
--- should raise a conflict as the target value already exists.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg0 192.168.0.148:7002 pid=1929685)
-DETAIL:  Key (a)=(2) already exists.
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
- 1
-(2 rows)
-
-DROP TABLE uao_unique_index_update;
--- Case 10: Updating command tries to insert the same key more than once--------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update SELECT generate_series(1,5);
--- should raise a conflict as the second update will try to insert 6, which was
--- already inserted by the first update.
-UPDATE uao_unique_index_update SET a=6 WHERE a>2;
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg2 192.168.0.148:7004 pid=1669359)
-DETAIL:  Key (a)=(6) already exists.
-DROP TABLE uao_unique_index_update;
--- Case 11: Updating tx updates a key inserted in the same subtx----------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-BEGIN;
-SAVEPOINT a;
-INSERT INTO uao_unique_index_update VALUES(1);
-UPDATE uao_unique_index_update SET a=2 WHERE a=1;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 12: Updating tx updates a key updated in the same subtx-----------------
-CREATE TABLE uao_unique_index_update (a INT unique);
-BEGIN;
-SAVEPOINT a;
-INSERT INTO uao_unique_index_update VALUES(1);
-UPDATE uao_unique_index_update SET a=2 WHERE a=1;
--- should be a no-op
-UPDATE uao_unique_index_update SET a=2 WHERE a=1;
--- should succeed
-UPDATE uao_unique_index_update SET a=3 WHERE a=2;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 3
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 13: Updating tx updates a key whose earlier update was rolled back------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES(1);
-BEGIN;
-SAVEPOINT a;
-UPDATE uao_unique_index_update SET a=2 WHERE a=1;
-ROLLBACK TO SAVEPOINT a;
--- should be able to run the update again as we have rolled back.
-UPDATE uao_unique_index_update SET a=2 WHERE a=1;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
-(1 row)
-
-DROP TABLE uao_unique_index_update;
--- Case 14: Updating tx updates a key to a key inserted in the same subtx-------
-CREATE TABLE uao_unique_index_update (a INT unique);
-INSERT INTO uao_unique_index_update VALUES (1);
-BEGIN;
-SAVEPOINT a;
-INSERT INTO uao_unique_index_update VALUES (2);
--- should raise a conflict with the key inserted inside the same subtx.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-ERROR:  duplicate key value violates unique constraint "uao_unique_index_update_a_key"  (seg0 192.168.0.148:7002 pid=3411438)
-DETAIL:  Key (a)=(2) already exists.
-ROLLBACK TO SAVEPOINT a;
--- should be able to run the update again as we have rolled back.
-UPDATE uao_unique_index_update SET a = 2 WHERE a = 1;
-COMMIT;
-SELECT * FROM uao_unique_index_update;
- a 
----
- 2
-(1 row)
-
-DROP TABLE uao_unique_index_update;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org