hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject [5/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ with Ranger enabled.
Date Thu, 02 Mar 2017 01:55:09 GMT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond31.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond31.ans b/src/test/feature/Ranger/ans/adminsecond31.ans
new file mode 100644
index 0000000..dfeb2dc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond31.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop EXTERNAL TABLE ext_t2;
+DROP EXTERNAL TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond32.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond32.ans b/src/test/feature/Ranger/ans/adminsecond32.ans
new file mode 100644
index 0000000..b5ce0d4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond32.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create schema sa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  schema "sa" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond33.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond33.ans b/src/test/feature/Ranger/ans/adminsecond33.ans
new file mode 100644
index 0000000..d286367
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond33.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create temp table ta(i int);
+CREATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond34.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond34.ans b/src/test/feature/Ranger/ans/adminsecond34.ans
new file mode 100644
index 0000000..e0164ae
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond34.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create view av as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "av" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond35.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond35.ans b/src/test/feature/Ranger/ans/adminsecond35.ans
new file mode 100644
index 0000000..472bd3e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond35.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "aa" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond36.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond36.ans b/src/test/feature/Ranger/ans/adminsecond36.ans
new file mode 100644
index 0000000..c40975c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond36.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table sa.t(a int, b int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "t" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond37.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond37.ans b/src/test/feature/Ranger/ans/adminsecond37.ans
new file mode 100644
index 0000000..b5315a7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond37.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE SEQUENCE myseq START 1;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "myseq" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond38.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond38.ans b/src/test/feature/Ranger/ans/adminsecond38.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond38.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond39.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond39.ans b/src/test/feature/Ranger/ans/adminsecond39.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond39.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond4.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond4.ans b/src/test/feature/Ranger/ans/adminsecond4.ans
new file mode 100644
index 0000000..5a06518
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond4.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+select * from f4();
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond40.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond40.ans b/src/test/feature/Ranger/ans/adminsecond40.ans
new file mode 100644
index 0000000..7a178c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond40.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a VALUES (nextval('myseq'));
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond41.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond41.ans b/src/test/feature/Ranger/ans/adminsecond41.ans
new file mode 100644
index 0000000..2930484
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond41.ans
@@ -0,0 +1,16 @@
+-- start_ignore
+-- end_ignore
+select * from a order by i;
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond42.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond42.ans b/src/test/feature/Ranger/ans/adminsecond42.ans
new file mode 100644
index 0000000..09dd411
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond42.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+select generate_series(1,3);
+1
+2
+3

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond43.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond43.ans b/src/test/feature/Ranger/ans/adminsecond43.ans
new file mode 100644
index 0000000..2aa5133
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond43.ans
@@ -0,0 +1,16 @@
+-- start_ignore
+-- end_ignore
+select * from av;
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond44.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond44.ans b/src/test/feature/Ranger/ans/adminsecond44.ans
new file mode 100644
index 0000000..ce8e756
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond44.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT setval('myseq', 1);
+1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond45.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond45.ans b/src/test/feature/Ranger/ans/adminsecond45.ans
new file mode 100644
index 0000000..574b318
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond45.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "aaa" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond46.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond46.ans b/src/test/feature/Ranger/ans/adminsecond46.ans
new file mode 100644
index 0000000..a8582d8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond46.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+PREPARE
+INSERT 0 1
+DEALLOCATE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond47.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond47.ans b/src/test/feature/Ranger/ans/adminsecond47.ans
new file mode 100644
index 0000000..0d86b62
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond47.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+explain select * from a;
+Gather Motion 1:1  (slice1; segments: 1)  (cost=0.00..1.08 rows=8 width=4)
+  ->  Append-only Scan on a  (cost=0.00..1.08 rows=8 width=4)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond48.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond48.ans b/src/test/feature/Ranger/ans/adminsecond48.ans
new file mode 100644
index 0000000..1645c06
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond48.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  function "scube_accum" already exists with same argument types

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond49.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond49.ans b/src/test/feature/Ranger/ans/adminsecond49.ans
new file mode 100644
index 0000000..b3bda3e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond49.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  function "scube" already exists with same argument types

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond5.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond5.ans b/src/test/feature/Ranger/ans/adminsecond5.ans
new file mode 100644
index 0000000..9a6a74f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond5.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop function f4();
+DROP FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond50.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond50.ans b/src/test/feature/Ranger/ans/adminsecond50.ans
new file mode 100644
index 0000000..c0e6523
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond50.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;   
+ALTER AGGREGATE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond51.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond51.ans b/src/test/feature/Ranger/ans/adminsecond51.ans
new file mode 100644
index 0000000..aa4f869
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond51.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP AGGREGATE scube2(numeric);
+DROP AGGREGATE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond52.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond52.ans b/src/test/feature/Ranger/ans/adminsecond52.ans
new file mode 100644
index 0000000..af03391
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond52.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP FUNCTION scube_accum(numeric, numeric);
+DROP FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond53.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond53.ans b/src/test/feature/Ranger/ans/adminsecond53.ans
new file mode 100644
index 0000000..0439490
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond53.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TYPE mytype AS (f1 int, f2 int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  relation "mytype" already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond54.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond54.ans b/src/test/feature/Ranger/ans/adminsecond54.ans
new file mode 100644
index 0000000..a2a06e9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond54.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  function "getfoo" already exists with same argument types

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond55.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond55.ans b/src/test/feature/Ranger/ans/adminsecond55.ans
new file mode 100644
index 0000000..e2894c2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond55.ans
@@ -0,0 +1,17 @@
+-- start_ignore
+-- end_ignore
+select getfoo();
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(2,2)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond56.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond56.ans b/src/test/feature/Ranger/ans/adminsecond56.ans
new file mode 100644
index 0000000..7577294
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond56.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop type mytype cascade;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE:  drop cascades to function getfoo()
+DROP TYPE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond57.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond57.ans b/src/test/feature/Ranger/ans/adminsecond57.ans
new file mode 100644
index 0000000..1dd130e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond57.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+BEGIN
+DECLARE CURSOR
+1
+1
+COMMIT

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond58.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond58.ans b/src/test/feature/Ranger/ans/adminsecond58.ans
new file mode 100644
index 0000000..3b7fd19
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond58.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+BEGIN
+INSERT 0 1
+SAVEPOINT
+INSERT 0 1
+RELEASE
+COMMIT

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond59.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond59.ans b/src/test/feature/Ranger/ans/adminsecond59.ans
new file mode 100644
index 0000000..ac2d8c7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond59.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+\d
+public|a|table|usertest1|append only
+public|aa|table|usertest35|append only
+public|aaa|table|usertest45|append only
+public|av|view|usertest34|none
+public|myseq|sequence|usertest37|heap

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond6.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond6.ans b/src/test/feature/Ranger/ans/adminsecond6.ans
new file mode 100644
index 0000000..8691498
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond6.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop language plpythonu;
+DROP LANGUAGE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond60.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond60.ans b/src/test/feature/Ranger/ans/adminsecond60.ans
new file mode 100644
index 0000000..f235f1e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond60.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze a;
+ANALYZE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond61.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond61.ans b/src/test/feature/Ranger/ans/adminsecond61.ans
new file mode 100644
index 0000000..36b8749
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond61.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze;
+ANALYZE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond62.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond62.ans b/src/test/feature/Ranger/ans/adminsecond62.ans
new file mode 100644
index 0000000..3281aef
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond62.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum aa;
+VACUUM

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond63.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond63.ans b/src/test/feature/Ranger/ans/adminsecond63.ans
new file mode 100644
index 0000000..15dac5d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond63.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum analyze;
+VACUUM

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond64.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond64.ans b/src/test/feature/Ranger/ans/adminsecond64.ans
new file mode 100644
index 0000000..7565e97
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond64.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+truncate aa;
+TRUNCATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond65.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond65.ans b/src/test/feature/Ranger/ans/adminsecond65.ans
new file mode 100644
index 0000000..1f19c46
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond65.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+alter table a rename column i to j;
+ALTER TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond66.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond66.ans b/src/test/feature/Ranger/ans/adminsecond66.ans
new file mode 100644
index 0000000..6779298
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond66.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop SEQUENCE myseq;
+DROP SEQUENCE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond67.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond67.ans b/src/test/feature/Ranger/ans/adminsecond67.ans
new file mode 100644
index 0000000..7b67364
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond67.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop view av;
+DROP VIEW

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond68.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond68.ans b/src/test/feature/Ranger/ans/adminsecond68.ans
new file mode 100644
index 0000000..071be2a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond68.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aaa;
+DROP TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond69.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond69.ans b/src/test/feature/Ranger/ans/adminsecond69.ans
new file mode 100644
index 0000000..e203c88
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond69.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aa;
+DROP TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond7.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond7.ans b/src/test/feature/Ranger/ans/adminsecond7.ans
new file mode 100644
index 0000000..5026d33
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond7.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond70.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond70.ans b/src/test/feature/Ranger/ans/adminsecond70.ans
new file mode 100644
index 0000000..e7fbc71
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond70.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table a;
+DROP TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond71.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond71.ans b/src/test/feature/Ranger/ans/adminsecond71.ans
new file mode 100644
index 0000000..a9779cf
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond71.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop schema sa CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE:  drop cascades to append only table sa.t
+DROP SCHEMA

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond8.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond8.ans b/src/test/feature/Ranger/ans/adminsecond8.ans
new file mode 100644
index 0000000..03712a3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond8.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond9.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond9.ans b/src/test/feature/Ranger/ans/adminsecond9.ans
new file mode 100644
index 0000000..4f5faf3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond9.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR:  operator <# already exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal10_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal10_fail.ans b/src/test/feature/Ranger/ans/normal10_fail.ans
new file mode 100644
index 0000000..a8cb544
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal10_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest10;
+SET
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal10_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal10_success.ans b/src/test/feature/Ranger/ans/normal10_success.ans
new file mode 100644
index 0000000..6e4bc51
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal10_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest10;
+SET
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal11_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal11_success.ans b/src/test/feature/Ranger/ans/normal11_success.ans
new file mode 100644
index 0000000..ac36733
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal11_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest11;
+SET
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be superuser to create an operator class

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal12_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal12_success.ans b/src/test/feature/Ranger/ans/normal12_success.ans
new file mode 100644
index 0000000..b705160
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal12_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest12;
+SET
+drop OPERATOR CLASS sva_special_ops USING btree;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  operator class "sva_special_ops" does not exist for access method "btree"

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal13_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal13_fail.ans b/src/test/feature/Ranger/ans/normal13_fail.ans
new file mode 100644
index 0000000..ce0b5f8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal13_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest13;
+SET
+drop OPERATOR <# (text,text) CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  operator does not exist: text <# text

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal13_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal13_success.ans b/src/test/feature/Ranger/ans/normal13_success.ans
new file mode 100644
index 0000000..ff30c8a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal13_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest13;
+SET
+drop OPERATOR <# (text,text) CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of operator <#

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal14_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal14_fail.ans b/src/test/feature/Ranger/ans/normal14_fail.ans
new file mode 100644
index 0000000..e9314ec
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal14_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest14;
+SET
+drop FUNCTION si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function si_same(text, text) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal14_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal14_success.ans b/src/test/feature/Ranger/ans/normal14_success.ans
new file mode 100644
index 0000000..4f220db
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal14_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest14;
+SET
+drop FUNCTION si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of function si_same

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal15_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal15_fail.ans b/src/test/feature/Ranger/ans/normal15_fail.ans
new file mode 100644
index 0000000..9494640
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal15_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest15;
+SET
+drop FUNCTION si_lt(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function si_lt(text, text) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal15_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal15_success.ans b/src/test/feature/Ranger/ans/normal15_success.ans
new file mode 100644
index 0000000..b4ab33f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal15_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest15;
+SET
+drop FUNCTION si_lt(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of function si_lt

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal16_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal16_fail.ans b/src/test/feature/Ranger/ans/normal16_fail.ans
new file mode 100644
index 0000000..6fa2bbb
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal16_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest16;
+SET
+drop FUNCTION normalize_si(text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function normalize_si(text) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal16_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal16_success.ans b/src/test/feature/Ranger/ans/normal16_success.ans
new file mode 100644
index 0000000..9932360
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal16_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest16;
+SET
+drop FUNCTION normalize_si(text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of function normalize_si

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal17_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal17_success.ans b/src/test/feature/Ranger/ans/normal17_success.ans
new file mode 100644
index 0000000..2687926
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal17_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest17;
+SET
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);   
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be superuser to create resource queues

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal18_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal18_success.ans b/src/test/feature/Ranger/ans/normal18_success.ans
new file mode 100644
index 0000000..6b0c649
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal18_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest18;
+SET
+DROP RESOURCE QUEUE myqueue;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be superuser to drop resource queues

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal19_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal19_success.ans b/src/test/feature/Ranger/ans/normal19_success.ans
new file mode 100644
index 0000000..4cfa788
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal19_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest19;
+SET
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;    
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  permission denied to create tablespace "mytblspace"
+HINT:  Must be superuser to create a tablespace.

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal1_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal1_fail.ans b/src/test/feature/Ranger/ans/normal1_fail.ans
new file mode 100644
index 0000000..f803b85
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal1_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest1;
+SET
+create table a(i int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal1_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal1_success.ans b/src/test/feature/Ranger/ans/normal1_success.ans
new file mode 100644
index 0000000..433be29
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal1_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest1;
+SET
+create table a(i int);
+CREATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal20_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal20_fail.ans b/src/test/feature/Ranger/ans/normal20_fail.ans
new file mode 100644
index 0000000..744f4b3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal20_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest20;
+SET
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal20_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal20_success.ans b/src/test/feature/Ranger/ans/normal20_success.ans
new file mode 100644
index 0000000..2844ebe
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal20_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest20;
+SET
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+CREATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal21_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal21_fail.ans b/src/test/feature/Ranger/ans/normal21_fail.ans
new file mode 100644
index 0000000..028cd08
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal21_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest21;
+SET
+insert into foo(i) values(1234);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "foo" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal21_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal21_success.ans b/src/test/feature/Ranger/ans/normal21_success.ans
new file mode 100644
index 0000000..b39d6f1
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal21_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest21;
+SET
+insert into foo(i) values(1234);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal22_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal22_fail.ans b/src/test/feature/Ranger/ans/normal22_fail.ans
new file mode 100644
index 0000000..54baf87
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal22_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest22;
+SET
+drop table foo;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  table "foo" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal22_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal22_success.ans b/src/test/feature/Ranger/ans/normal22_success.ans
new file mode 100644
index 0000000..68e6742
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal22_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest22;
+SET
+drop table foo;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of relation foo

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal23_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal23_success.ans b/src/test/feature/Ranger/ans/normal23_success.ans
new file mode 100644
index 0000000..4f0e5f3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal23_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest23;
+SET
+drop tablespace mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of tablespace mytblspace

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal24_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal24_success.ans b/src/test/feature/Ranger/ans/normal24_success.ans
new file mode 100644
index 0000000..afc82d2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal24_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest24;
+SET
+COPY a FROM '/tmp/a.txt';
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be superuser to COPY to or from a file
+HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal25_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal25_fail.ans b/src/test/feature/Ranger/ans/normal25_fail.ans
new file mode 100644
index 0000000..f54f85e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal25_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest25;
+SET
+COPY a TO STDOUT WITH DELIMITER '|';
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal25_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal25_success.ans b/src/test/feature/Ranger/ans/normal25_success.ans
new file mode 100644
index 0000000..78fbd98
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal25_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest25;
+SET
+COPY a TO STDOUT WITH DELIMITER '|';
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal26_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal26_fail.ans b/src/test/feature/Ranger/ans/normal26_fail.ans
new file mode 100644
index 0000000..91ff794
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal26_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest26;
+SET
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY  INTEGER ,N_COMMENT    VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal26_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal26_success.ans b/src/test/feature/Ranger/ans/normal26_success.ans
new file mode 100644
index 0000000..3cebdd3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal26_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest26;
+SET
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY  INTEGER ,N_COMMENT    VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+CREATE EXTERNAL TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal27_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal27_fail.ans b/src/test/feature/Ranger/ans/normal27_fail.ans
new file mode 100644
index 0000000..ab32a6b
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal27_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest27;
+SET
+select * from ext_t order by N_NATIONKEY;   
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select * from ext_t order by N_NATIONKEY;
+                      ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "ext_t" does not exist
+LINE 1: select * from ext_t order by N_NATIONKEY;
+                      ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal27_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal27_success.ans b/src/test/feature/Ranger/ans/normal27_success.ans
new file mode 100644
index 0000000..8c61c43
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal27_success.ans
@@ -0,0 +1,31 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest27;
+SET
+select * from ext_t order by N_NATIONKEY;   
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: NOTICE:  Found 50 data formatting errors (50 or more input rows). Rejected related input data.
+0|ALGERIA                  |0| haggle. carefully final deposits detect slyly agai
+1|ARGENTINA                |1|al foxes promise slyly according to the regular accounts. bold requests alon
+2|BRAZIL                   |1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 
+3|CANADA                   |1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
+4|EGYPT                    |4|y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
+5|ETHIOPIA                 |0|ven packages wake quickly. regu
+6|FRANCE                   |3|refully final requests. regular, ironi
+7|GERMANY                  |3|l platelets. regular accounts x-ray: unusual, regular acco
+8|INDIA                    |2|ss excuses cajole slyly across the packages. deposits print aroun
+9|INDONESIA                |2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull
+10|IRAN                     |4|efully alongside of the slyly final dependencies. 
+11|IRAQ                     |4|nic deposits boost atop the quickly final requests? quickly regula
+12|JAPAN                    |2|ously. final, express gifts cajole a
+13|JORDAN                   |4|ic deposits are blithely about the carefully regular pa
+14|KENYA                    |0| pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+15|MOROCCO                  |0|rns. blithely bold courts among the closely regular packages use furiously bold platelets?
+16|MOZAMBIQUE               |0|s. ironic, unusual asymptotes wake blithely r
+17|PERU                     |1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+18|CHINA                    |2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos
+19|ROMANIA                  |3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account
+20|SAUDI ARABIA             |4|ts. silent requests haggle. closely express packages sleep across the blithely
+21|VIETNAM                  |2|hely enticingly express accounts. even, final 
+22|RUSSIA                   |3| requests against the platelets use never according to the quickly regular pint
+23|UNITED KINGDOM           |3|eans boost carefully special requests. accounts are. carefull
+24|UNITED STATES            |1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal28_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal28_fail.ans b/src/test/feature/Ranger/ans/normal28_fail.ans
new file mode 100644
index 0000000..0c000bc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal28_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest28;
+SET
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal28_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal28_success.ans b/src/test/feature/Ranger/ans/normal28_success.ans
new file mode 100644
index 0000000..be9eb64
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal28_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest28;
+SET
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+CREATE EXTERNAL TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal29_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal29_fail.ans b/src/test/feature/Ranger/ans/normal29_fail.ans
new file mode 100644
index 0000000..828dae4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal29_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest29;
+SET
+insert into ext_t2(i) values(234);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "ext_t2" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal29_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal29_success.ans b/src/test/feature/Ranger/ans/normal29_success.ans
new file mode 100644
index 0000000..85a5c4c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal29_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest29;
+SET
+insert into ext_t2(i) values(234);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal2_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal2_success.ans b/src/test/feature/Ranger/ans/normal2_success.ans
new file mode 100644
index 0000000..b410461
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal2_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest2;
+SET
+create language plpythonu;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be superuser to create procedural language

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal30_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal30_fail.ans b/src/test/feature/Ranger/ans/normal30_fail.ans
new file mode 100644
index 0000000..8f78f5f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal30_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest30;
+SET
+drop EXTERNAL TABLE ext_t;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  table "ext_t" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal30_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal30_success.ans b/src/test/feature/Ranger/ans/normal30_success.ans
new file mode 100644
index 0000000..ad6119f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal30_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest30;
+SET
+drop EXTERNAL TABLE ext_t;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of relation ext_t

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal31_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal31_fail.ans b/src/test/feature/Ranger/ans/normal31_fail.ans
new file mode 100644
index 0000000..271ff3d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal31_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest31;
+SET
+drop EXTERNAL TABLE ext_t2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  table "ext_t2" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal31_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal31_success.ans b/src/test/feature/Ranger/ans/normal31_success.ans
new file mode 100644
index 0000000..cc3635e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal31_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest31;
+SET
+drop EXTERNAL TABLE ext_t2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of relation ext_t2

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal32_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal32_fail.ans b/src/test/feature/Ranger/ans/normal32_fail.ans
new file mode 100644
index 0000000..1eab158
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal32_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest32;
+SET
+create schema sa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  permission denied for database hawq_feature_test_db

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal32_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal32_success.ans b/src/test/feature/Ranger/ans/normal32_success.ans
new file mode 100644
index 0000000..18dbc83
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal32_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest32;
+SET
+create schema sa;
+CREATE SCHEMA

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal33_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal33_fail.ans b/src/test/feature/Ranger/ans/normal33_fail.ans
new file mode 100644
index 0000000..2039883
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal33_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest33;
+SET
+create temp table ta(i int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  permission denied to create temporary tables in database "hawq_feature_test_db"

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal33_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal33_success.ans b/src/test/feature/Ranger/ans/normal33_success.ans
new file mode 100644
index 0000000..a6217bb
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal33_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest33;
+SET
+create temp table ta(i int);
+CREATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal34_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal34_fail.ans b/src/test/feature/Ranger/ans/normal34_fail.ans
new file mode 100644
index 0000000..9dc7ac3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal34_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest34;
+SET
+create view av as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: create view av as select * from a order by i;
+                                        ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+LINE 1: create view av as select * from a order by i;
+                                        ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal34_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal34_success.ans b/src/test/feature/Ranger/ans/normal34_success.ans
new file mode 100644
index 0000000..fc1a30c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal34_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest34;
+SET
+create view av as select * from a order by i;
+CREATE VIEW

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal35_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal35_fail.ans b/src/test/feature/Ranger/ans/normal35_fail.ans
new file mode 100644
index 0000000..36d1a06
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal35_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest35;
+SET
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: create table aa as select * from a order by i;
+                                         ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+LINE 1: create table aa as select * from a order by i;
+                                         ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal35_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal35_success.ans b/src/test/feature/Ranger/ans/normal35_success.ans
new file mode 100644
index 0000000..0957278
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal35_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest35;
+SET
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  skipping "aa" --- error returned: permission denied for relation(s): aa
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: INFO:  ANALYZE completed. Success: 0, Failure: 1 (aa)
+SELECT 2

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal36_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal36_fail.ans b/src/test/feature/Ranger/ans/normal36_fail.ans
new file mode 100644
index 0000000..93db827
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal36_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest36;
+SET
+create table sa.t(a int, b int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  permission denied for schema sa

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal36_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal36_success.ans b/src/test/feature/Ranger/ans/normal36_success.ans
new file mode 100644
index 0000000..a7cc1b4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal36_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest36;
+SET
+create table sa.t(a int, b int);
+CREATE TABLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal37_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal37_fail.ans b/src/test/feature/Ranger/ans/normal37_fail.ans
new file mode 100644
index 0000000..c6820d0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal37_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest37;
+SET
+CREATE SEQUENCE myseq START 1;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal37_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal37_success.ans b/src/test/feature/Ranger/ans/normal37_success.ans
new file mode 100644
index 0000000..a78bcc7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal37_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest37;
+SET
+CREATE SEQUENCE myseq START 1;
+CREATE SEQUENCE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal38_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal38_fail.ans b/src/test/feature/Ranger/ans/normal38_fail.ans
new file mode 100644
index 0000000..7a09017
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal38_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest38;
+SET
+insert into a values(1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal38_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal38_success.ans b/src/test/feature/Ranger/ans/normal38_success.ans
new file mode 100644
index 0000000..ad854c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal38_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest38;
+SET
+insert into a values(1);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal39_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal39_fail.ans b/src/test/feature/Ranger/ans/normal39_fail.ans
new file mode 100644
index 0000000..cc74786
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal39_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest39;
+SET
+insert into a values(1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal39_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal39_success.ans b/src/test/feature/Ranger/ans/normal39_success.ans
new file mode 100644
index 0000000..0293239
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal39_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest39;
+SET
+insert into a values(1);
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal3_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal3_success.ans b/src/test/feature/Ranger/ans/normal3_success.ans
new file mode 100644
index 0000000..cff11bc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal3_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest3;
+SET
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  permission denied for language plpythonu

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal40_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal40_fail.ans b/src/test/feature/Ranger/ans/normal40_fail.ans
new file mode 100644
index 0000000..1f0e53a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal40_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest40;
+SET
+insert into a VALUES (nextval('myseq'));
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal40_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal40_success.ans b/src/test/feature/Ranger/ans/normal40_success.ans
new file mode 100644
index 0000000..86dd8de
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal40_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest40;
+SET
+insert into a VALUES (nextval('myseq'));
+INSERT 0 1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal41_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal41_fail.ans b/src/test/feature/Ranger/ans/normal41_fail.ans
new file mode 100644
index 0000000..8ac9d96
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal41_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest41;
+SET
+select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select * from a order by i;
+                      ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+LINE 1: select * from a order by i;
+                      ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal41_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal41_success.ans b/src/test/feature/Ranger/ans/normal41_success.ans
new file mode 100644
index 0000000..a49b3f9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal41_success.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest41;
+SET
+select * from a order by i;
+1
+1
+1
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal42_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal42_fail.ans b/src/test/feature/Ranger/ans/normal42_fail.ans
new file mode 100644
index 0000000..db5b954
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal42_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest42;
+SET
+select generate_series(1,3);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select generate_series(1,3);
+               ^
+1
+2
+3

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal42_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal42_success.ans b/src/test/feature/Ranger/ans/normal42_success.ans
new file mode 100644
index 0000000..63f8bb3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal42_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest42;
+SET
+select generate_series(1,3);
+1
+2
+3

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal43_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal43_fail.ans b/src/test/feature/Ranger/ans/normal43_fail.ans
new file mode 100644
index 0000000..151c974
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal43_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest43;
+SET
+select * from av;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select * from av;
+                      ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "av" does not exist
+LINE 1: select * from av;
+                      ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal43_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal43_success.ans b/src/test/feature/Ranger/ans/normal43_success.ans
new file mode 100644
index 0000000..0740a4a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal43_success.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest43;
+SET
+select * from av;
+1
+1
+1
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal44_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal44_fail.ans b/src/test/feature/Ranger/ans/normal44_fail.ans
new file mode 100644
index 0000000..9d78edd
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal44_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest44;
+SET
+SELECT setval('myseq', 1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: SELECT setval('myseq', 1);
+               ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "myseq" does not exist
+LINE 1: SELECT setval('myseq', 1);
+               ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal44_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal44_success.ans b/src/test/feature/Ranger/ans/normal44_success.ans
new file mode 100644
index 0000000..bab96c3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal44_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest44;
+SET
+SELECT setval('myseq', 1);
+1

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal45_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal45_fail.ans b/src/test/feature/Ranger/ans/normal45_fail.ans
new file mode 100644
index 0000000..00bbb05
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal45_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest45;
+SET
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+                               ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+LINE 1: SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+                               ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal45_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal45_success.ans b/src/test/feature/Ranger/ans/normal45_success.ans
new file mode 100644
index 0000000..44e049c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal45_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest45;
+SET
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+SELECT 5

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal46_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal46_fail.ans b/src/test/feature/Ranger/ans/normal46_fail.ans
new file mode 100644
index 0000000..b3194f2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal46_fail.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest46;
+SET
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  prepared statement "fooplan" does not exist
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  prepared statement "fooplan" does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal46_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal46_success.ans b/src/test/feature/Ranger/ans/normal46_success.ans
new file mode 100644
index 0000000..9faf6b5
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal46_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest46;
+SET
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+PREPARE
+INSERT 0 1
+DEALLOCATE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal47_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal47_fail.ans b/src/test/feature/Ranger/ans/normal47_fail.ans
new file mode 100644
index 0000000..4b51dee
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal47_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest47;
+SET
+explain select * from a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: explain select * from a;
+                              ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  relation "a" does not exist
+LINE 1: explain select * from a;
+                              ^

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal47_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal47_success.ans b/src/test/feature/Ranger/ans/normal47_success.ans
new file mode 100644
index 0000000..f7f05ab
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal47_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest47;
+SET
+explain select * from a;
+Gather Motion 1:1  (slice1; segments: 1)  (cost=0.00..1.02 rows=2 width=4)
+  ->  Append-only Scan on a  (cost=0.00..1.02 rows=2 width=4)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal48_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal48_fail.ans b/src/test/feature/Ranger/ans/normal48_fail.ans
new file mode 100644
index 0000000..0d2cff9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal48_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest48;
+SET
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal48_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal48_success.ans b/src/test/feature/Ranger/ans/normal48_success.ans
new file mode 100644
index 0000000..c7bfa6d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal48_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest48;
+SET
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+CREATE FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal49_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal49_fail.ans b/src/test/feature/Ranger/ans/normal49_fail.ans
new file mode 100644
index 0000000..bcd38d9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal49_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest49;
+SET
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal49_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal49_success.ans b/src/test/feature/Ranger/ans/normal49_success.ans
new file mode 100644
index 0000000..5a1f409
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal49_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest49;
+SET
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+CREATE AGGREGATE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal4_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal4_fail.ans b/src/test/feature/Ranger/ans/normal4_fail.ans
new file mode 100644
index 0000000..2fb527d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal4_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest4;
+SET
+select * from f4();
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select * from f4();
+                      ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function f4() does not exist
+LINE 1: select * from f4();
+                      ^
+HINT:  No function matches the given name and argument types. You may need to add explicit type casts.

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal4_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal4_success.ans b/src/test/feature/Ranger/ans/normal4_success.ans
new file mode 100644
index 0000000..89b98e4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal4_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest4;
+SET
+select * from f4();
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal50_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal50_fail.ans b/src/test/feature/Ranger/ans/normal50_fail.ans
new file mode 100644
index 0000000..7e97ed0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal50_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest50;
+SET
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;   
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  aggregate scube(numeric) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal50_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal50_success.ans b/src/test/feature/Ranger/ans/normal50_success.ans
new file mode 100644
index 0000000..998ff58
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal50_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest50;
+SET
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;   
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of function scube

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal51_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal51_fail.ans b/src/test/feature/Ranger/ans/normal51_fail.ans
new file mode 100644
index 0000000..5af5c8d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal51_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest51;
+SET
+DROP AGGREGATE scube2(numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  aggregate scube2(numeric) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal51_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal51_success.ans b/src/test/feature/Ranger/ans/normal51_success.ans
new file mode 100644
index 0000000..4177514
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal51_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest51;
+SET
+DROP AGGREGATE scube2(numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  aggregate scube2(numeric) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal52_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal52_fail.ans b/src/test/feature/Ranger/ans/normal52_fail.ans
new file mode 100644
index 0000000..8a1b317
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal52_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest52;
+SET
+DROP FUNCTION scube_accum(numeric, numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function scube_accum(numeric, numeric) does not exist

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal52_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal52_success.ans b/src/test/feature/Ranger/ans/normal52_success.ans
new file mode 100644
index 0000000..97caee7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal52_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest52;
+SET
+DROP FUNCTION scube_accum(numeric, numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  must be owner of function scube_accum

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal53_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal53_fail.ans b/src/test/feature/Ranger/ans/normal53_fail.ans
new file mode 100644
index 0000000..c59bf8f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal53_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest53;
+SET
+CREATE TYPE mytype AS (f1 int, f2 int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal53_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal53_success.ans b/src/test/feature/Ranger/ans/normal53_success.ans
new file mode 100644
index 0000000..6b38957
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal53_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest53;
+SET
+CREATE TYPE mytype AS (f1 int, f2 int);
+CREATE TYPE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal54_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal54_fail.ans b/src/test/feature/Ranger/ans/normal54_fail.ans
new file mode 100644
index 0000000..d6e3d39
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal54_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest54;
+SET
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  no schema has been selected to create in

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal54_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal54_success.ans b/src/test/feature/Ranger/ans/normal54_success.ans
new file mode 100644
index 0000000..4b2e646
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal54_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest54;
+SET
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+CREATE FUNCTION

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal55_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal55_fail.ans b/src/test/feature/Ranger/ans/normal55_fail.ans
new file mode 100644
index 0000000..3b7a81d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal55_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest55;
+SET
+select getfoo();
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING:  usage privilege of namespace public is required.
+LINE 1: select getfoo();
+               ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR:  function getfoo() does not exist
+LINE 1: select getfoo();
+               ^
+HINT:  No function matches the given name and argument types. You may need to add explicit type casts.

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal55_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal55_success.ans b/src/test/feature/Ranger/ans/normal55_success.ans
new file mode 100644
index 0000000..90e172b
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal55_success.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest55;
+SET
+select getfoo();
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)



Mime
View raw message