You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2016/07/20 02:54:39 UTC

incubator-hawq git commit: HAWQ-925. Set default locale, timezone & datastyle before running sql command/file

Repository: incubator-hawq
Updated Branches:
  refs/heads/master 69f3c9026 -> 2f95286e0


HAWQ-925. Set default locale, timezone & datastyle before running sql command/file


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2f95286e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2f95286e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2f95286e

Branch: refs/heads/master
Commit: 2f95286e06006a362f3db8410491cf1ccf52bd78
Parents: 69f3c90
Author: Paul Guo <pa...@gmail.com>
Authored: Mon Jul 18 19:48:54 2016 +0800
Committer: Paul Guo <pa...@gmail.com>
Committed: Tue Jul 19 15:29:36 2016 +0800

----------------------------------------------------------------------
 .../ans/alter-table-addcol-insert-alltypes.ans  |   6 +-
 src/test/feature/catalog/ans/date.ans           |   4 +-
 src/test/feature/catalog/sql/date.sql           |   2 +-
 .../ans/partition_negetive_and_basics.ans       | 166 +++++++++----------
 src/test/feature/test_main.cpp                  |  73 ++++++++
 src/test/regress/known_good_schedule            |  15 --
 6 files changed, 160 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
index 4aec294..3c50bdf 100644
--- a/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
+++ b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
@@ -29,8 +29,8 @@ INSERT INTO tmp
            '{1,2,3,4}');
 INSERT 0 1
 SELECT * FROM tmp;
- initial | a |  b   |  c   |  d  |  e  | f |           g           |           h            | i |                                      j                                       |   k    |   l   |  m  |        n        |       p       |     q     |           r           |              s              |          t          |                   u                   |          v          |    w     |     x     |     y     |     z     
----------+---+------+------+-----+-----+---+-----------------------+------------------------+---+------------------------------------------------------------------------------+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+---------------------------------------+---------------------+----------+-----------+-----------+-----------
-         | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | 1995-05-01 00:30:30+00 | c | {"1995-05-01 00:30:30+00","1992-08-24 14:43:07+00","1970-01-01 00:00:00+00"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["1970-01-01 00:00:00+00" "infinity"] | 1970-01-01 00:00:00 | 01:00:10 | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
+ initial | a |  b   |  c   |  d  |  e  | f |           g           |              h               | i |                                               j                                                |   k    |   l   |  m  |        n        |       p       |     q     |           r           |              s              |          t          |                      u                      |            v             |    w     |     x     |     y     |     z     
+---------+---+------+------+-----+-----+---+-----------------------+------------------------------+---+------------------------------------------------------------------------------------------------+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+---------------------------------------------+--------------------------+----------+-----------+-----------+-----------
+         | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | Mon May 01 00:30:30 1995 UTC | c | {"Mon May 01 00:30:30 1995 UTC","Mon Aug 24 14:43:07 1992 UTC","Thu Jan 01 00:00:00 1970 UTC"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["Thu Jan 01 00:00:00 1970 UTC" "infinity"] | Thu Jan 01 00:00:00 1970 | 01:00:10 | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
 (1 row)
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/feature/catalog/ans/date.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/catalog/ans/date.ans b/src/test/feature/catalog/ans/date.ans
index 1fe3ad4..57bcd01 100755
--- a/src/test/feature/catalog/ans/date.ans
+++ b/src/test/feature/catalog/ans/date.ans
@@ -834,8 +834,8 @@ SELECT date '1999 08 01';
  1999-08-01
 (1 row)
 
-RESET datestyle;
-RESET
+SET datestyle TO 'Postgres,MDY';
+SET
 --
 -- Simple math
 -- Leave most of it for the horology tests

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/feature/catalog/sql/date.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/catalog/sql/date.sql b/src/test/feature/catalog/sql/date.sql
index 7ed6e15..aef5b81 100644
--- a/src/test/feature/catalog/sql/date.sql
+++ b/src/test/feature/catalog/sql/date.sql
@@ -186,7 +186,7 @@ SELECT date '01 08 1999';
 SELECT date '99 08 01';
 SELECT date '1999 08 01';
 
-RESET datestyle;
+SET datestyle TO 'Postgres,MDY';
 
 --
 -- Simple math

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/feature/partition/ans/partition_negetive_and_basics.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/partition/ans/partition_negetive_and_basics.ans b/src/test/feature/partition/ans/partition_negetive_and_basics.ans
index 7f1adad..744e6a6 100755
--- a/src/test/feature/partition/ans/partition_negetive_and_basics.ans
+++ b/src/test/feature/partition/ans/partition_negetive_and_basics.ans
@@ -1,7 +1,3 @@
--- start_ignore
-SET SEARCH_PATH=TestPartition_TestPartitionNegativeAndBasics;
-SET
--- end_ignore
 set enable_partition_rules = false;
 SET
 set gp_enable_hash_partitioned_tables = true;
@@ -660,48 +656,48 @@ INSERT 0 1
 select * from rank order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  1 |    1 | 2001-01-15 | M
-  2 |    1 | 2002-02-15 | M
-  3 |    1 | 2003-03-15 | M
-  4 |    1 | 2004-04-15 | M
-  5 |    1 | 2005-05-15 | M
-  6 |    1 | 2001-01-15 | F
-  7 |    1 | 2002-02-15 | F
-  8 |    1 | 2003-03-15 | F
-  9 |    1 | 2004-04-15 | F
- 10 |    1 | 2005-05-15 | F
+  1 |    1 | 01-15-2001 | M
+  2 |    1 | 02-15-2002 | M
+  3 |    1 | 03-15-2003 | M
+  4 |    1 | 04-15-2004 | M
+  5 |    1 | 05-15-2005 | M
+  6 |    1 | 01-15-2001 | F
+  7 |    1 | 02-15-2002 | F
+  8 |    1 | 03-15-2003 | F
+  9 |    1 | 04-15-2004 | F
+ 10 |    1 | 05-15-2005 | F
 (10 rows)
 
 select * from rank_1_prt_boys order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  1 |    1 | 2001-01-15 | M
-  2 |    1 | 2002-02-15 | M
-  3 |    1 | 2003-03-15 | M
-  4 |    1 | 2004-04-15 | M
-  5 |    1 | 2005-05-15 | M
+  1 |    1 | 01-15-2001 | M
+  2 |    1 | 02-15-2002 | M
+  3 |    1 | 03-15-2003 | M
+  4 |    1 | 04-15-2004 | M
+  5 |    1 | 05-15-2005 | M
 (5 rows)
 
 select * from rank_1_prt_girls order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  6 |    1 | 2001-01-15 | F
-  7 |    1 | 2002-02-15 | F
-  8 |    1 | 2003-03-15 | F
-  9 |    1 | 2004-04-15 | F
- 10 |    1 | 2005-05-15 | F
+  6 |    1 | 01-15-2001 | F
+  7 |    1 | 02-15-2002 | F
+  8 |    1 | 03-15-2003 | F
+  9 |    1 | 04-15-2004 | F
+ 10 |    1 | 05-15-2005 | F
 (5 rows)
 
 select * from rank_1_prt_girls_2_prt_1 order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  6 |    1 | 2001-01-15 | F
+  6 |    1 | 01-15-2001 | F
 (1 row)
 
 select * from rank_1_prt_girls_2_prt_2 order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  7 |    1 | 2002-02-15 | F
+  7 |    1 | 02-15-2002 | F
 (1 row)
 
 drop table rank cascade;
@@ -1009,48 +1005,48 @@ INSERT 0 1
 select * from rank order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  1 |    1 | 2001-01-15 | M
-  2 |    1 | 2002-02-15 | M
-  3 |    1 | 2003-03-15 | M
-  4 |    1 | 2004-04-15 | M
-  5 |    1 | 2005-05-15 | M
-  6 |    1 | 2001-01-15 | F
-  7 |    1 | 2002-02-15 | F
-  8 |    1 | 2003-03-15 | F
-  9 |    1 | 2004-04-15 | F
- 10 |    1 | 2005-05-15 | F
+  1 |    1 | 01-15-2001 | M
+  2 |    1 | 02-15-2002 | M
+  3 |    1 | 03-15-2003 | M
+  4 |    1 | 04-15-2004 | M
+  5 |    1 | 05-15-2005 | M
+  6 |    1 | 01-15-2001 | F
+  7 |    1 | 02-15-2002 | F
+  8 |    1 | 03-15-2003 | F
+  9 |    1 | 04-15-2004 | F
+ 10 |    1 | 05-15-2005 | F
 (10 rows)
 
 select * from rank_1_prt_boys order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  1 |    1 | 2001-01-15 | M
-  2 |    1 | 2002-02-15 | M
-  3 |    1 | 2003-03-15 | M
-  4 |    1 | 2004-04-15 | M
-  5 |    1 | 2005-05-15 | M
+  1 |    1 | 01-15-2001 | M
+  2 |    1 | 02-15-2002 | M
+  3 |    1 | 03-15-2003 | M
+  4 |    1 | 04-15-2004 | M
+  5 |    1 | 05-15-2005 | M
 (5 rows)
 
 select * from rank_1_prt_girls order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  6 |    1 | 2001-01-15 | F
-  7 |    1 | 2002-02-15 | F
-  8 |    1 | 2003-03-15 | F
-  9 |    1 | 2004-04-15 | F
- 10 |    1 | 2005-05-15 | F
+  6 |    1 | 01-15-2001 | F
+  7 |    1 | 02-15-2002 | F
+  8 |    1 | 03-15-2003 | F
+  9 |    1 | 04-15-2004 | F
+ 10 |    1 | 05-15-2005 | F
 (5 rows)
 
 select * from rank_1_prt_girls_2_prt_1 order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  6 |    1 | 2001-01-15 | F
+  6 |    1 | 01-15-2001 | F
 (1 row)
 
 select * from rank_1_prt_girls_2_prt_2 order by 1, 2, 3, 4;
  id | rank |    year    | gender 
 ----+------+------------+--------
-  7 |    1 | 2002-02-15 | F
+  7 |    1 | 02-15-2002 | F
 (1 row)
 
 drop table rank cascade;
@@ -1089,7 +1085,7 @@ INSERT 0 1
 insert into ggg values (9, 9);
 INSERT 0 1
 insert into ggg values (10, 10);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:566: ERROR:  no partition for partitioning key  (seg1 localhost:40000 pid=9097)
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:566: ERROR:  no partition for partitioning key  (seg5 localhost:40000 pid=172591)
 select * from ggg order by 1, 2;
  id | a 
 ----+---
@@ -1214,25 +1210,25 @@ select count(*) from foz_1_prt_1;
 select min(d), max(d) from foz;
     min     |    max     
 ------------+------------
- 2001-01-02 | 2003-09-28
+ 01-02-2001 | 09-28-2003
 (1 row)
 
 select min(d), max(d) from foz_1_prt_1;
     min     |    max     
 ------------+------------
- 2001-01-02 | 2001-12-31
+ 01-02-2001 | 12-31-2001
 (1 row)
 
 select min(d), max(d) from foz_1_prt_2;
     min     |    max     
 ------------+------------
- 2002-01-01 | 2002-12-31
+ 01-01-2002 | 12-31-2002
 (1 row)
 
 select min(d), max(d) from foz_1_prt_3;
     min     |    max     
 ------------+------------
- 2003-01-01 | 2003-09-28
+ 01-01-2003 | 09-28-2003
 (1 row)
 
 select min(d), max(d) from foz_1_prt_4;
@@ -1321,7 +1317,7 @@ psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:690: NOTICE:  CREATE
 ALTER TABLE
 -- works - anonymous partition MPP-3350
 alter table hhh add partition end ('2010-02-01');
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:693: NOTICE:  CREATE TABLE will create partition "hhh_1_prt_r418565524" for table "hhh"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:693: NOTICE:  CREATE TABLE will create partition "hhh_1_prt_r652516349" for table "hhh"
 ALTER TABLE
 -- MPP-3607 - ADD PARTITION with open intervals
 create table no_end1 (aa int, bb int) partition by range (bb)
@@ -1589,7 +1585,7 @@ insert into j select i from generate_series(1, 8) i;
 INSERT 0 8
 alter table j split partition for(1) at (2, 3) into (partition fa, partition
 fb);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:870: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_54636"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:870: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_43517"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:870: NOTICE:  dropped partition "a" for relation "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:870: NOTICE:  CREATE TABLE will create partition "j_1_prt_fa" for table "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:870: NOTICE:  CREATE TABLE will create partition "j_1_prt_fb" for table "j"
@@ -1609,10 +1605,10 @@ select * from j_1_prt_fb;
 (2 rows)
 
 alter table j split partition for(5) at (6);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  exchanged partition "b" of relation "j" with relation "pg_temp_54636"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  exchanged partition "b" of relation "j" with relation "pg_temp_43517"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  dropped partition "b" for relation "j"
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  CREATE TABLE will create partition "j_1_prt_r613391202" for table "j"
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  CREATE TABLE will create partition "j_1_prt_r1064781686" for table "j"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  CREATE TABLE will create partition "j_1_prt_r630513650" for table "j"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:873: NOTICE:  CREATE TABLE will create partition "j_1_prt_r1373370768" for table "j"
 ALTER TABLE
 select * from j;
  i 
@@ -1662,7 +1658,7 @@ insert into k select i from generate_series(1, 30) i;
 INSERT 0 30
 alter table k split default partition start(15) end(20) into
 (partition mydef, partition foo);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:889: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_54743"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:889: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_43624"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:889: NOTICE:  dropped partition "mydef" for relation "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:889: NOTICE:  CREATE TABLE will create partition "k_1_prt_foo" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:889: NOTICE:  CREATE TABLE will create partition "k_1_prt_mydef" for table "k"
@@ -1679,7 +1675,7 @@ select * from k_1_prt_foo;
 
 alter table k split default partition start(22) exclusive end(25) inclusive
 into (partition bar, partition mydef);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:892: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_54743"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:892: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_43624"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:892: NOTICE:  dropped partition "mydef" for relation "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:892: NOTICE:  CREATE TABLE will create partition "k_1_prt_bar" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:892: NOTICE:  CREATE TABLE will create partition "k_1_prt_mydef" for table "k"
@@ -1693,7 +1689,7 @@ select * from k_1_prt_bar;
 (3 rows)
 
 alter table k split partition bar at (23) into (partition baz, partition foz);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:894: NOTICE:  exchanged partition "bar" of relation "k" with relation "pg_temp_54743"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:894: NOTICE:  exchanged partition "bar" of relation "k" with relation "pg_temp_43624"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:894: NOTICE:  dropped partition "bar" for relation "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:894: NOTICE:  CREATE TABLE will create partition "k_1_prt_baz" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:894: NOTICE:  CREATE TABLE will create partition "k_1_prt_foz" for table "k"
@@ -1749,16 +1745,16 @@ into (partition aa, partition nodate);
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:909: ERROR:  default partition name missing from INTO clause
 alter table k split default partition start ('2009-01-01') end ('2009-02-01')
 into (partition aa, partition default_part);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:911: NOTICE:  exchanged partition "default_part" of relation "k" with relation "pg_temp_54865"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:911: NOTICE:  exchanged partition "default_part" of relation "k" with relation "pg_temp_43746"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:911: NOTICE:  dropped partition "default_part" for relation "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:911: NOTICE:  CREATE TABLE will create partition "k_1_prt_aa" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:911: NOTICE:  CREATE TABLE will create partition "k_1_prt_default_part" for table "k"
 ALTER TABLE
 -- check that it works without INTO
 alter table k split default partition start ('2009-02-01') end ('2009-03-01');
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  exchanged partition "default_part" of relation "k" with relation "pg_temp_54865"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  exchanged partition "default_part" of relation "k" with relation "pg_temp_43746"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  dropped partition "default_part" for relation "k"
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  CREATE TABLE will create partition "k_1_prt_r336210435" for table "k"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  CREATE TABLE will create partition "k_1_prt_r1447646233" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:913: NOTICE:  CREATE TABLE will create partition "k_1_prt_default_part" for table "k"
 ALTER TABLE
 drop table k;
@@ -1773,15 +1769,15 @@ CREATE TABLE
 alter table k split partition mydef at (5) into (partition foo, partition bar);
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:918: ERROR:  default partition name missing from INTO clause
 alter table k split partition mydef at (5) into (partition foo, partition mydef);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:919: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_54997"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:919: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_43878"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:919: NOTICE:  dropped partition "mydef" for relation "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:919: NOTICE:  CREATE TABLE will create partition "k_1_prt_foo" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:919: NOTICE:  CREATE TABLE will create partition "k_1_prt_mydef" for table "k"
 ALTER TABLE
 alter table k split partition mydef at (10);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_54997"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  exchanged partition "mydef" of relation "k" with relation "pg_temp_43878"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  dropped partition "mydef" for relation "k"
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  CREATE TABLE will create partition "k_1_prt_r1262328667" for table "k"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  CREATE TABLE will create partition "k_1_prt_r14307969" for table "k"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:920: NOTICE:  CREATE TABLE will create partition "k_1_prt_mydef" for table "k"
 ALTER TABLE
 drop table k;
@@ -1793,7 +1789,7 @@ psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:925: NOTICE:  CREATE
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:925: NOTICE:  CREATE TABLE will create partition "j_1_prt_b" for table "j"
 CREATE TABLE
 alter table j split partition for(1) at (1,2) into (partition fa, partition fb);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:926: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_55059"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:926: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_43940"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:926: NOTICE:  dropped partition "a" for relation "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:926: NOTICE:  CREATE TABLE will create partition "j_1_prt_fa" for table "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:926: NOTICE:  CREATE TABLE will create partition "j_1_prt_fb" for table "j"
@@ -1812,7 +1808,7 @@ psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:933: NOTICE:  CREATE
 CREATE TABLE
 alter table j split partition for(1) at (1,2) into (partition f1a, partition
 f1b);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:935: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_55099"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:935: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_43980"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:935: NOTICE:  dropped partition "a" for relation "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:935: NOTICE:  CREATE TABLE will create partition "j_1_prt_f1a" for table "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:935: NOTICE:  CREATE TABLE will create partition "j_1_prt_f1b" for table "j"
@@ -1826,7 +1822,7 @@ psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:939: NOTICE:  CREATE
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:939: NOTICE:  CREATE TABLE will create partition "j_1_prt_a" for table "j"
 CREATE TABLE
 alter table j split partition for(1) at (5) into (partition f1a, partition f1b);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:940: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_55145"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:940: NOTICE:  exchanged partition "a" of relation "j" with relation "pg_temp_44026"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:940: NOTICE:  dropped partition "a" for relation "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:940: NOTICE:  CREATE TABLE will create partition "j_1_prt_f1a" for table "j"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:940: NOTICE:  CREATE TABLE will create partition "j_1_prt_f1b" for table "j"
@@ -1877,7 +1873,7 @@ select * from pt_table_1_prt_2 order by d;
 (2 rows)
 
 insert into pt_table_1_prt_others values(1,1,1,1);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:952: ERROR:  the data does not belong to partition: pt_table_1_prt_others  (seg0 localhost:40000 pid=9140)
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:952: ERROR:  the data does not belong to partition: pt_table_1_prt_others  (seg0 localhost:40000 pid=173094)
 select * from pt_table order by b,d;
  a | b | c | d 
 ---+---+---+---
@@ -1942,8 +1938,8 @@ INSERT 0 1
 select * from pt_check order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2010-01-10 | part 1
-       2 | 2010-01-21 | part 2
+       1 | 01-10-2010 | part 1
+       2 | 01-21-2010 | part 2
 (2 rows)
 
 --Split partition '2010-01-10' into 2 parts (Jan 1-15 and Jan 16-31).
@@ -1957,13 +1953,13 @@ ALTER TABLE
 Select * from pt_check_1_prt_jan1thru15 order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2010-01-10 | part 1
+       1 | 01-10-2010 | part 1
 (1 row)
 
 Select * from pt_check_1_prt_jan16thru31 order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       2 | 2010-01-21 | part 2
+       2 | 01-21-2010 | part 2
 (1 row)
 
 -- GPSQL-278 - default partitions
@@ -2006,15 +2002,15 @@ INSERT 0 1
 select * from pt_check order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2011-01-10 | part 1
-       2 | 2011-02-21 | part 2
+       1 | 01-10-2011 | part 1
+       2 | 02-21-2011 | part 2
 (2 rows)
 
 --Split default partition into 2 parts (Jan 2011 and default).
 ALTER TABLE pt_check SPLIT DEFAULT PARTITION
 	START ('2011-01-01') INCLUSIVE END ('2011-02-01') EXCLUSIVE
 	INTO (PARTITION jan2011, DEFAULT PARTITION);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1013: NOTICE:  exchanged partition "defpt" of relation "pt_check" with relation "pg_temp_55357"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1013: NOTICE:  exchanged partition "defpt" of relation "pt_check" with relation "pg_temp_44238"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1013: NOTICE:  dropped partition "defpt" for relation "pt_check"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1013: NOTICE:  CREATE TABLE will create partition "pt_check_1_prt_jan2011" for table "pt_check"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1013: NOTICE:  CREATE TABLE will create partition "pt_check_1_prt_defpt" for table "pt_check"
@@ -2023,13 +2019,13 @@ ALTER TABLE
 select * from pt_check_1_prt_jan2011 order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2011-01-10 | part 1
+       1 | 01-10-2011 | part 1
 (1 row)
 
 select * from pt_check_1_prt_defpt order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       2 | 2011-02-21 | part 2
+       2 | 02-21-2011 | part 2
 (1 row)
 
 -- GPSQL-278 - default partitions
@@ -2072,15 +2068,15 @@ INSERT 0 1
 select * from pt_check order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2011-01-10 | part 1
-       2 | 2011-02-21 | part 2
+       1 | 01-10-2011 | part 1
+       2 | 02-21-2011 | part 2
 (2 rows)
 
 --Split default partition into 2 parts (Jan 2011 and default).
 ALTER TABLE pt_check SPLIT DEFAULT PARTITION
 	START ('2011-01-01') INCLUSIVE END ('2011-02-01') EXCLUSIVE
 	INTO (DEFAULT PARTITION, PARTITION jan2011);
-psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1042: NOTICE:  exchanged partition "defpt" of relation "pt_check" with relation "pg_temp_55488"
+psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1042: NOTICE:  exchanged partition "defpt" of relation "pt_check" with relation "pg_temp_44369"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1042: NOTICE:  dropped partition "defpt" for relation "pt_check"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1042: NOTICE:  CREATE TABLE will create partition "pt_check_1_prt_jan2011" for table "pt_check"
 psql:/tmp/TestPartition_TestPartitionNegativeAndBasics.sql:1042: NOTICE:  CREATE TABLE will create partition "pt_check_1_prt_defpt" for table "pt_check"
@@ -2089,13 +2085,13 @@ ALTER TABLE
 select * from pt_check_1_prt_jan2011 order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       1 | 2011-01-10 | part 1
+       1 | 01-10-2011 | part 1
 (1 row)
 
 select * from pt_check_1_prt_defpt order by col1;
  distcol |   ptcol    |  col1  
 ---------+------------+--------
-       2 | 2011-02-21 | part 2
+       2 | 02-21-2011 | part 2
 (1 row)
 
 --- allow the creation of multi-level partition tables with templates

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/feature/test_main.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/test_main.cpp b/src/test/feature/test_main.cpp
index 70e0f53..41142ec 100644
--- a/src/test/feature/test_main.cpp
+++ b/src/test/feature/test_main.cpp
@@ -1,6 +1,79 @@
+#include <sys/types.h>
+#include <pwd.h>
 #include "gtest/gtest.h"
+#include "psql.h"
+#include "sql_util.h"
+
+using std::string;
+
+class TestPrepare
+{
+  private:
+    const string testDbName = "hawq_feature_test";
+    std::unique_ptr<hawq::test::PSQL> conn;
+	void init_hawq_test();
+  public:
+    TestPrepare();
+    ~TestPrepare();
+};
+
+#define PSQL_RUN_AND_ASSERT() \
+  conn->runSQLCommand(cmd); \
+  ASSERT_EQ(0, conn->getLastStatus()) << conn->getLastResult();
+
+void TestPrepare::init_hawq_test()
+{
+  string user = HAWQ_USER;
+  if(user.empty()) {
+    struct passwd *pw;
+    uid_t uid = geteuid();
+    pw = getpwuid(uid);
+    user.assign(pw->pw_name);
+  }
+
+  conn.reset(new hawq::test::PSQL(HAWQ_DB, HAWQ_HOST, HAWQ_PORT, user, HAWQ_PASSWORD));
+
+  // Create the test db and set some default guc values so that test outputs
+  // could be consistent. We do not drop the database in advance since keeping the
+  // previous environment could probably help reproducing and resolving some failing
+  // test issues, so you need to drop the database yourself when necessary, before
+  // running the tests.
+  string cmd;
+  cmd  = "create database " + testDbName;
+  // Do not check return value since probably the db has existed.
+  conn->runSQLCommand(cmd);
+  cmd  = "alter database " + testDbName + " set lc_messages to 'C'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set lc_monetary to 'C'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set lc_numeric to 'C'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set lc_time to 'C'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set timezone_abbreviations to 'Default'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set timezone to 'PST8PDT'";
+  PSQL_RUN_AND_ASSERT();
+  cmd  = "alter database " + testDbName + " set datestyle to 'postgres,MDY'";
+  PSQL_RUN_AND_ASSERT();
+}
+
+TestPrepare::TestPrepare()
+{
+  init_hawq_test();
+
+  // The test will use the newly created database.
+  setenv("PGDATABASE", testDbName.c_str(), 1);
+}
+
+TestPrepare::~TestPrepare()
+{
+}
 
 int main(int argc, char** argv) {
+
+  TestPrepare tp;
+
   ::testing::InitGoogleTest(&argc, argv);
 
   return RUN_ALL_TESTS();

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2f95286e/src/test/regress/known_good_schedule
----------------------------------------------------------------------
diff --git a/src/test/regress/known_good_schedule b/src/test/regress/known_good_schedule
index 71564b9..eb95086 100755
--- a/src/test/regress/known_good_schedule
+++ b/src/test/regress/known_good_schedule
@@ -1,6 +1,5 @@
 # $PostgreSQL: pgsql/src/test/regress/serial_schedule,v 1.33 2006/08/30 23:34:22 tgl Exp $
 # This should probably be in an order similar to parallel_schedule.
-test: type_sanity
 test: errortbl
 test: goh_create_type_composite
 ignore: goh_create_table
@@ -19,18 +18,6 @@ test: goh_gp_dist_random
 ignore: gpsql_fault_tolerance
 test: goh_portals
 ignore: goh_set_schema
-test: boolean
-test: char
-test: name
-test: varchar
-test: text
-test: int2
-test: int4
-test: int8
-test: oid
-test: float4
-ignore: float8
-test: money
 ignore: bit
 ignore: numeric
 ignore: strings
@@ -41,8 +28,6 @@ ignore: box
 ignore: path
 ignore: polygon
 ignore: circle
-test: date
-test: time
 ignore: timetz
 ignore: timestamp
 ignore: timestamptz