hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [4/4] incubator-hawq git commit: HAWQ-769. Remove function, function_extensions, set_functions and goh_partition test from installcheck, disable hcatalog and exttab1 test temporarily
Date Wed, 15 Jun 2016 01:30:30 GMT
HAWQ-769. Remove function, function_extensions, set_functions and goh_partition test from installcheck,
disable hcatalog and exttab1 test temporarily


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

Branch: refs/heads/master
Commit: 66f0bda1fe79f04c29cb88f9ecfbea845defd269
Parents: a2e8ff7
Author: Ruilong Huo <rhuo@pivotal.io>
Authored: Tue Jun 14 16:22:04 2016 +0800
Committer: Ruilong Huo <rhuo@pivotal.io>
Committed: Tue Jun 14 16:22:04 2016 +0800

----------------------------------------------------------------------
 src/test/regress/expected/function.out          |  899 -------
 .../regress/expected/function_extensions.out    |  161 --
 src/test/regress/expected/goh_partition.out     | 2325 ------------------
 src/test/regress/expected/set_functions.out     |  275 ---
 src/test/regress/known_good_schedule            |    8 +-
 src/test/regress/sql/function.sql               |  439 ----
 src/test/regress/sql/function_extensions.sql    |  123 -
 src/test/regress/sql/goh_partition.sql          | 1297 ----------
 src/test/regress/sql/set_functions.sql          |  104 -
 9 files changed, 2 insertions(+), 5629 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/66f0bda1/src/test/regress/expected/function.out
----------------------------------------------------------------------
diff --git a/src/test/regress/expected/function.out b/src/test/regress/expected/function.out
deleted file mode 100644
index bda1ded..0000000
--- a/src/test/regress/expected/function.out
+++ /dev/null
@@ -1,899 +0,0 @@
--- SETUP
-DROP TABLE IF EXISTS foo;
-NOTICE:  table "foo" does not exist, skipping
-CREATE TABLE foo AS SELECT * FROM generate_series(1, 10) x;
-CREATE FUNCTION f(x INT) RETURNS INT AS $$
-BEGIN
-RETURN x;
-END
-$$ LANGUAGE PLPGSQL;
--- DDL, CREATE FUNCTION
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proname FROM pg_proc WHERE proname = 'g';
- proname 
----------
- g
-(1 row)
-
-SELECT proname FROM gp_dist_random('pg_proc') WHERE proname = 'g';
- proname 
----------
-(0 rows)
-
-DROP FUNCTION g(int);
--- DDL, CREATE OR REPLACE FUNCTION
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proname FROM pg_proc WHERE proname = 'g';
- proname 
----------
- g
-(1 row)
-
-SELECT proname FROM gp_dist_random('pg_proc') WHERE proname = 'g';
- proname 
----------
-(0 rows)
-
-CREATE OR REPLACE FUNCTION g(x INT) RETURNS INT AS $$
-BEGIN
-RETURN (-1) * x;
-END
-$$ LANGUAGE PLPGSQL;
-SELECT proname, prosrc FROM pg_proc WHERE proname = 'g';
- proname |      prosrc      
----------+------------------
- g       |                  
-         : BEGIN            
-         : RETURN (-1) * x; 
-         : END              
-         : 
-(1 row)
-
-SELECT proname, prosrc FROM gp_dist_random('pg_proc') WHERE proname = 'g';
- proname | prosrc 
----------+--------
-(0 rows)
-
-DROP FUNCTION g(int);
--- DDL, DROP FUNCTION
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-DROP FUNCTION g(int);
-SELECT oid, proname FROM pg_proc WHERE proname = 'g';
- oid | proname 
------+---------
-(0 rows)
-
-SELECT oid, proname FROM gp_dist_random('pg_proc') WHERE proname = 'g';
- oid | proname 
------+---------
-(0 rows)
-
--- DDL, DROP FUNCTION, NEGATIVE
-DROP FUNCTION g(int);
-ERROR:  function g(integer) does not exist
--- DDL, CREATE FUNCTION, RECORD
-CREATE FUNCTION foo(int) RETURNS record AS 'SELECT * FROM foo WHERE x=$1' LANGUAGE SQL;
-SELECT foo(5);
- foo 
------
- (5)
-(1 row)
-
-DROP FUNCTION foo(int);
-CREATE FUNCTION foo(int) RETURNS foo AS 'SELECT * FROM foo WHERE x=$1' LANGUAGE SQL;
-SELECT foo(5);
- foo 
------
- (5)
-(1 row)
-
-DROP FUNCTION foo(int);
--- DDL, CREATE FUNCTION, SRF
-CREATE FUNCTION g(x setof int) RETURNS INT
-    AS $$ SELECT 1 $$ LANGUAGE SQL;
-DROP FUNCTION g(setof int);
-CREATE FUNCTION g() RETURNS setof INT
-    AS $$ SELECT 1 $$ LANGUAGE SQL;
-DROP FUNCTION g();
--- DDL, CREATE FUNCTION, TABLE, NEGATIVE
-CREATE FUNCTION g() RETURNS TABLE(x int)
-    AS $$ SELECT * FROM foo $$ LANGUAGE SQL;
-DROP FUNCTION g();
-CREATE FUNCTION g(anytable) RETURNS int
-    AS 'does_not_exist', 'does_not_exist' LANGUAGE C;
-ERROR:  TABLE functions not supported
--- DDL, CREATE FUNCTION, SECURITY DEFINER
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE SECURITY DEFINER;
-DROP FUNCTION g(int);
--- DDL, ALTER FUNCTION
--- DDL, STRICT
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-SELECT g(NULL);
- g 
----
- 1
-(1 row)
-
-ALTER FUNCTION g(int) STRICT;
-SELECT g(NULL);
- g 
----
-  
-(1 row)
-
-DROP FUNCTION g(int);
--- DDL, ALTER FUNCTION, OWNER
-CREATE ROLE superuser SUPERUSER;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-SET ROLE superuser;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-SELECT a.rolname FROM pg_proc p, pg_authid a where p.proowner = a.oid and proname = 'g';
-  rolname  
------------
- superuser
-(1 row)
-
-ALTER FUNCTION g(int) OWNER TO u1;
-SELECT a.rolname FROM pg_proc p, pg_authid a where p.proowner = a.oid and proname = 'g';
- rolname 
----------
- u1
-(1 row)
-
-DROP FUNCTION g(int);
-RESET ROLE;
-DROP ROLE u1;
-DROP ROLE superuser;
--- DDL, ALTER FUNCTION, RENAME
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-SELECT g(0);
- g 
----
- 1
-(1 row)
-
-ALTER FUNCTION g(int) RENAME TO h;
-SELECT h(0);
- h 
----
- 1
-(1 row)
-
-DROP FUNCTION h(int);
--- DDL, ALTER FUNCTION, SET SCHEMA
-CREATE SCHEMA bar;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-SELECT g(0);
- g 
----
- 1
-(1 row)
-
-ALTER FUNCTION g(int) SET SCHEMA bar;
-SELECT bar.g(0);
- g 
----
- 1
-(1 row)
-
-DROP SCHEMA bar CASCADE;
-NOTICE:  drop cascades to function bar.g(integer)
--- DDL, ALTER FUNCTION, SECURITY DEFINER
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-ALTER FUNCTION g(int) SECURITY DEFINER;
-DROP FUNCTION g(int); 
--- DCL, GRANT/REVOKE
--- GRANT { EXECUTE | ALL [ PRIVILEGES ] }
---    ON FUNCTION funcname ( [ [ argmode ] [ argname ] argtype [, ...] ] ) [, ...]
---    TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]
--- REVOKE [ GRANT OPTION FOR ]
---    { EXECUTE | ALL [ PRIVILEGES ] }
---    ON FUNCTION funcname ( [ [ argmode ] [ argname ] argtype [, ...] ] ) [, ...]
---    FROM { username | GROUP groupname | PUBLIC } [, ...]
---    [ CASCADE | RESTRICT ]
--- DCL, GRANT/REVOKE, EXECUTE
-CREATE ROLE superuser SUPERUSER;
-SET ROLE superuser;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-GRANT SELECT ON TABLE foo TO u1;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proacl FROM pg_proc where proname = 'g';
- proacl 
---------
- 
-(1 row)
-
-REVOKE ALL ON FUNCTION g(int) FROM PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-SET ROLE superuser;
-GRANT EXECUTE ON FUNCTION g(int) TO u1;
-SELECT proacl FROM pg_proc where proname = 'g';
-                 proacl                 
-----------------------------------------
- {superuser=X/superuser,u1=X/superuser}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE superuser;
-REVOKE EXECUTE ON FUNCTION g(int) FROM u1;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-RESET ROLE;
-DROP FUNCTION g(int);
-REVOKE SELECT ON TABLE foo FROM u1;
-DROP ROLE u1;
-DROP ROLE superuser;
--- DCL, GRANT/REVOKE, PUBLIC
-CREATE ROLE superuser SUPERUSER;
-SET ROLE superuser;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-GRANT SELECT ON TABLE foo TO u1;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proacl FROM pg_proc where proname = 'g';
- proacl 
---------
- 
-(1 row)
-
-REVOKE ALL ON FUNCTION g(int) FROM PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-SET ROLE superuser;
-GRANT EXECUTE ON FUNCTION g(int) TO PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-                proacl                
---------------------------------------
- {superuser=X/superuser,=X/superuser}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE superuser;
-REVOKE EXECUTE ON FUNCTION g(int) FROM PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-RESET ROLE;
-DROP FUNCTION g(int);
-REVOKE SELECT ON TABLE foo FROM u1;
-DROP ROLE u1;
-DROP ROLE superuser;
--- DCL, GRANT/REVOKE, Groups
-CREATE ROLE superuser SUPERUSER;
-SET ROLE superuser;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-CREATE ROLE u2 IN GROUP u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-GRANT SELECT ON TABLE foo TO u1;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proacl FROM pg_proc where proname = 'g';
- proacl 
---------
- 
-(1 row)
-
-REVOKE ALL ON FUNCTION g(int) FROM PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE u2;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-SET ROLE superuser;
-GRANT EXECUTE ON FUNCTION g(int) TO u1;
-SELECT proacl FROM pg_proc where proname = 'g';
-                 proacl                 
-----------------------------------------
- {superuser=X/superuser,u1=X/superuser}
-(1 row)
-
-SET ROLE u2;
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE superuser;
-REVOKE EXECUTE ON FUNCTION g(int) FROM u1;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SET ROLE u2;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-RESET ROLE;
-DROP FUNCTION g(int);
-REVOKE SELECT ON TABLE foo FROM u1;
-DROP ROLE u1;
-DROP ROLE u2;
-DROP ROLE superuser;
--- DCL, GRANT/REVOKE, WITH GRANT OPTION
-CREATE ROLE superuser SUPERUSER;
-SET ROLE superuser;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-CREATE ROLE u2;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-GRANT SELECT ON TABLE foo TO PUBLIC;
-CREATE FUNCTION g(int) RETURNS INTEGER AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
-SELECT proacl FROM pg_proc where proname = 'g';
- proacl 
---------
- 
-(1 row)
-
-REVOKE ALL ON FUNCTION g(int) FROM PUBLIC;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE u2;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-SET ROLE superuser;
-GRANT ALL ON FUNCTION g(int) TO u1 WITH GRANT OPTION;
-SET ROLE u1;
-GRANT ALL ON FUNCTION g(int) TO u2;
-SELECT proacl FROM pg_proc where proname = 'g';
-                     proacl                      
--------------------------------------------------
- {superuser=X/superuser,u1=X*/superuser,u2=X/u1}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE u2;
-SELECT g(1);
- g 
----
- 1
-(1 row)
-
-SELECT count(g(x)) FROM foo;
- count 
--------
-    10
-(1 row)
-
-SET ROLE superuser;
-REVOKE ALL ON FUNCTION g(int) FROM u1 CASCADE;
-SELECT proacl FROM pg_proc where proname = 'g';
-         proacl          
--------------------------
- {superuser=X/superuser}
-(1 row)
-
-SET ROLE u1;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-SET ROLE u2;
-SELECT g(1);
-ERROR:  permission denied for function g
-SELECT count(g(x)) FROM foo;
-ERROR:  permission denied for function g
-RESET ROLE;
-DROP FUNCTION g(int);
-REVOKE SELECT ON TABLE foo FROM PUBLIC;
-DROP ROLE u1;
-DROP ROLE u2;
-DROP ROLE superuser;
--- DML, CaseExpr
-SELECT CASE WHEN x % 2 = 0 THEN f(x) ELSE 0 END FROM foo ORDER BY x;
- case 
-------
-    0
-    2
-    0
-    4
-    0
-    6
-    0
-    8
-    0
-   10
-(10 rows)
-
--- DML, OpExpr
-SELECT f(x) + f(x) FROM foo ORDER BY x;
- ?column? 
-----------
-        2
-        4
-        6
-        8
-       10
-       12
-       14
-       16
-       18
-       20
-(10 rows)
-
-SELECT f(x) + f(x) + f(x) FROM foo ORDER BY x;
- ?column? 
-----------
-        3
-        6
-        9
-       12
-       15
-       18
-       21
-       24
-       27
-       30
-(10 rows)
-
-SELECT f(x) + f(x) - f(x) FROM foo ORDER BY x;
- ?column? 
-----------
-        1
-        2
-        3
-        4
-        5
-        6
-        7
-        8
-        9
-       10
-(10 rows)
-
--- DML, FuncExpr
-CREATE FUNCTION g(x INT) RETURNS INT AS $$
-BEGIN
-RETURN x;
-END
-$$ LANGUAGE PLPGSQL;
-SELECT g(f(x)) FROM foo ORDER BY x;
- g  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
-DROP FUNCTION g(int);
--- DML, BoolExpr
-SELECT x % 2 = 0 AND f(x) % 2 = 1 FROM foo ORDER BY x;
- ?column? 
-----------
- f
- f
- f
- f
- f
- f
- f
- f
- f
- f
-(10 rows)
-
--- DML, DistinctExpr
-SELECT x IS DISTINCT FROM f(x) from foo ORDER BY x;
- ?column? 
-----------
- f
- f
- f
- f
- f
- f
- f
- f
- f
- f
-(10 rows)
-
--- DML, PercentileExpr
-SELECT MEDIAN(f(x)) FROM foo;
- median 
---------
-    5.5
-(1 row)
-
--- DML, Complex Expression
-CREATE FUNCTION g(x INT) RETURNS INT AS $$
-BEGIN
-RETURN x;
-END
-$$ LANGUAGE PLPGSQL;
-SELECT CASE
-	WHEN x % 2 = 0 THEN g(g(x)) + g(g(x))
-	WHEN f(x) % 2 = 1 THEN g(g(x)) - g(g(x))
-	END FROM foo ORDER BY x;
- case 
-------
-    0
-    4
-    0
-    8
-    0
-   12
-    0
-   16
-    0
-   20
-(10 rows)
-
-DROP FUNCTION g(int);
--- DML, Qual
-SELECT x FROM foo WHERE f(x) % 2 = 0 ORDER BY x;
- x  
-----
-  2
-  4
-  6
-  8
- 10
-(5 rows)
-
--- DML, FROM
-SELECT * FROM f(5);
- f 
----
- 5
-(1 row)
-
--- DML, Grouping
-SELECT DISTINCT f(x) FROM foo ORDER BY f(x);
- f  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
-SELECT f(x) FROM foo GROUP BY f(x) ORDER BY f(x);
- f  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
--- DML, Join
-SELECT a.x FROM foo a, foo b WHERE f(a.x) = f(b.x) ORDER BY x;
- x  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
-SELECT a.x FROM foo a JOIN foo b ON f(a.x) = f(b.x) ORDER BY x;
- x  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
--- DML, Windowing
-SELECT avg(x) OVER (PARTITION BY f(x)) FROM foo ORDER BY x;
- avg 
------
-   1
-   2
-   3
-   4
-   5
-   6
-   7
-   8
-   9
-  10
-(10 rows)
-
--- DML, CTE
-WITH t AS (SELECT x from foo)
-	SELECT f(x) from t ORDER BY x;
- f  
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
-(10 rows)
-
--- DML, InitPlan
-SELECT UNNEST(ARRAY(SELECT x FROM foo)) ORDER BY 1;
- unnest 
---------
-      1
-      2
-      3
-      4
-      5
-      6
-      7
-      8
-      9
-     10
-(10 rows)
-
-SELECT UNNEST(ARRAY(SELECT f(1)));
- unnest 
---------
-      1
-(1 row)
-
--- PROPERTIES, VOLATILITY, IMMUTABLE
-CREATE FUNCTION g() RETURNS float AS 'SELECT random();' LANGUAGE SQL IMMUTABLE;
-SELECT COUNT(DISTINCT(g())) > 1 FROM foo;
- ?column? 
-----------
- f
-(1 row)
-
-DROP FUNCTION g();
--- PROPERTIES, VOLATILITY, STABLE
-CREATE FUNCTION g() RETURNS float AS 'SELECT random();' LANGUAGE SQL STABLE;
-SELECT COUNT(DISTINCT(g())) > 1 FROM foo;
- ?column? 
-----------
- f
-(1 row)
-
-DROP FUNCTION g();
--- PROPERTIES, VOLATILITY, VOLATILE
-CREATE FUNCTION g() RETURNS float AS 'SELECT random();' LANGUAGE SQL VOLATILE;
-SELECT COUNT(DISTINCT(g())) > 1 FROM foo;
- ?column? 
-----------
- t
-(1 row)
-
-DROP FUNCTION g();
------------------
--- NEGATIVE TESTS
------------------
-SELECT h(1);
-ERROR:  function h(integer) does not exist
-LINE 1: SELECT h(1);
-               ^
-HINT:  No function matches the given name and argument types. You may need to add explicit
type casts.
--- DML, InitPlan
-SELECT UNNEST(ARRAY(SELECT f(x) from foo));
- unnest 
---------
-      2
-      4
-      6
-      8
-     10
-      1
-      3
-      5
-      7
-      9
-(10 rows)
-
--- LANGUAGES not yet supported
--- CREATE LANGUAGE plr;
--- CREATE LANGUAGE plpython;
--- CREATE LANGUAGE pljava;
--- CREATE LANGUAGE plperl;
--- NESTED FUNCTION
-CREATE FUNCTION inner(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
-CREATE FUNCTION outer(x INT) RETURNS INT AS $$
-BEGIN
-RETURN inner(x);
-END
-$$ LANGUAGE PLPGSQL;
-SELECT outer(0);
- outer 
--------
-     1
-(1 row)
-
-SELECT outer(0) FROM foo;
-ERROR:  function inner(integer) does not exist  (seg1 localhost:40000 pid=89015)
-DETAIL:  PL/pgSQL function "outer" line 2 at return
-DROP FUNCTION outer(int);
-DROP FUNCTION inner(int);
--- TEARDOWN
-DROP TABLE foo;
--- HAWQ-510
-drop table if exists testEntryDB;
-NOTICE:  table "testentrydb" does not exist, skipping
-create table testEntryDB(key int, value int) distributed randomly;
-insert into testEntryDB values(1, 0);
-select t2.key, t2.value
-from   (select key, value from testEntryDB where value = 0) as t1,
-       (select generate_series(1,2)::int as key, 0::int as value) as t2
-where  t1.value=t2.value;
- key | value
------+-------
-   1 |     0
-   2 |     0
-(2 rows)
-
-drop table testEntryDB;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/66f0bda1/src/test/regress/expected/function_extensions.out
----------------------------------------------------------------------
diff --git a/src/test/regress/expected/function_extensions.out b/src/test/regress/expected/function_extensions.out
deleted file mode 100644
index 3cf8081..0000000
--- a/src/test/regress/expected/function_extensions.out
+++ /dev/null
@@ -1,161 +0,0 @@
--- -----------------------------------------------------------------
--- Test extensions to functions (MPP-16060)
--- 	1. data access indicators
--- -----------------------------------------------------------------
--- test prodataaccess
-create function func1(int, int) returns int as
-$$
-  select $1 + $2;
-$$ language sql immutable contains sql;
--- check prodataaccess column in pg_proc
-select proname, prodataaccess from pg_proc where proname = 'func1';
- proname | prodataaccess 
----------+---------------
- func1   | c
-(1 row)
-
--- check prodataaccess in pg_attribute
-select relname, attname, attlen from pg_class c, pg_attribute
-where attname = 'prodataaccess' and attrelid = c.oid and c.relname = 'pg_proc';
- relname |    attname    | attlen 
----------+---------------+--------
- pg_proc | prodataaccess |      1
-(1 row)
-
-create function func2(a anyelement, b anyelement, flag bool)
-returns anyelement as
-$$
-  select $1 + $2;
-$$ language sql reads sql data;
--- check prodataaccess column in pg_proc
-select proname, prodataaccess from pg_proc where proname = 'func2';
- proname | prodataaccess 
----------+---------------
- func2   | r
-(1 row)
-
-create function func3() returns oid as
-$$
-  select oid from pg_class where relname = 'pg_type';
-$$ language sql modifies sql data volatile;
--- check prodataaccess column in pg_proc
-select proname, prodataaccess from pg_proc where proname = 'func3';
- proname | prodataaccess 
----------+---------------
- func3   | m
-(1 row)
-
--- check default value of prodataaccess
-drop function func1(int, int);
-create function func1(int, int) returns varchar as $$
-declare
-	v_name varchar(20) DEFAULT 'zzzzz';
-begin
-	select relname from pg_class into v_name where oid=$1;
-	return v_name;
-end;
-$$ language plpgsql;
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func1';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func1   |             | n
-(1 row)
-
-create function func4(int, int) returns int as
-$$
-  select $1 + $2;
-$$ language sql;
--- check prodataaccess column
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func4';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func4   |             | c
-(1 row)
-
--- change prodataaccess option
-create or replace function func4(int, int) returns int as
-$$
-  select $1 + $2;
-$$ language sql modifies sql data;
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func4';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func4   |             | m
-(1 row)
-
--- upper case language name
-create or replace function func5(int) returns int as
-$$
-  select $1;
-$$ language "SQL";
--- check prodataaccess column
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func5';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func5   |             | c
-(1 row)
-
--- alter function with data access
-alter function func5(int) reads sql data;
--- check prodataaccess column
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func5';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func5   |             | r
-(1 row)
-
--- alter function with data access
-alter function func5(int) modifies sql data;
--- check prodataaccess column
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func5';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func5   |             | m
-(1 row)
-
--- alter function with data access
-alter function func5(int) no sql;
-ERROR:  conflicting options
-HINT:  A SQL function cannot specify NO SQL.
--- alter function with data access
-alter function func5(int) volatile contains sql;
-alter function func5(int) immutable reads sql data;
-ERROR:  conflicting options
-HINT:  IMMUTABLE conflicts with READS SQL DATA.
-alter function func5(int) immutable modifies sql data;
-ERROR:  conflicting options
-HINT:  IMMUTABLE conflicts with MODIFIES SQL DATA.
--- data_access indicators for plpgsql
-drop function func1(int, int);
-create or replace function func1(int, int) returns varchar as $$
-declare
-	v_name varchar(20) DEFAULT 'zzzzz';
-begin
-	select relname from pg_class into v_name where oid=$1;
-	return v_name;
-end;
-$$ language plpgsql reads sql data;
-select proname, proargnames, prodataaccess from pg_proc where proname = 'func1';
- proname | proargnames | prodataaccess 
----------+-------------+---------------
- func1   |             | r
-(1 row)
-
--- check conflicts
-drop function func1(int, int);
-create function func1(int, int) returns int as
-$$
-  select $1 + $2;
-$$ language sql immutable no sql;
-ERROR:  conflicting options
-HINT:  A SQL function cannot specify NO SQL.
-create function func1(int, int) returns int as
-$$
-  select $1 + $2;
-$$ language sql immutable reads sql data;
-ERROR:  conflicting options
-HINT:  IMMUTABLE conflicts with READS SQL DATA.
-drop function func2(anyelement, anyelement, bool);
-drop function func3();
-drop function func4(int, int);
-drop function func5(int);


Mime
View raw message