Repository: incubator-hawq
Updated Branches:
  refs/heads/master b75c2c359 -> 649828ff7


HAWQ-681. Removed hcatalog_enable GUC.


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

Branch: refs/heads/master
Commit: 649828ff7953a88d30f4969679547dd39eddf1fa
Parents: b75c2c3
Author: Oleksandr Diachenko <[email protected]>
Authored: Fri Apr 15 14:40:24 2016 -0700
Committer: Oleksandr Diachenko <[email protected]>
Committed: Mon Apr 18 15:53:17 2016 -0700

----------------------------------------------------------------------
 src/backend/catalog/namespace.c                |  8 --------
 src/backend/utils/adt/pxf_functions.c          |  8 --------
 src/backend/utils/misc/guc.c                   | 13 -------------
 src/include/utils/guc.h                        |  3 ---
 src/test/regress/input/hcatalog_lookup.source  |  9 ---------
 src/test/regress/output/hcatalog_lookup.source | 16 ++++------------
 6 files changed, 4 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/backend/catalog/namespace.c
----------------------------------------------------------------------
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 0de311f..4685bfa 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -245,14 +245,6 @@ RangeVarGetRelid(const RangeVar *relation, bool failOK, 
bool allowHcatalog)
                                                relation->catalogname, 
relation->schemaname,
                                                relation->relname)));
                }
-               if (!hcatalog_enable)
-               {
-                       ereport(ERROR,
-                               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                errmsg("HCatalog querying is not enabled, 
query for \"%s.%s.%s\" is not allowed in this context",
-                                               relation->catalogname, 
relation->schemaname,
-                                               relation->relname)));
-               }
 
                /* Pull relation metadata via the hcat proxy(pxf) only if 
relation doesn't exist*/
                if(!RelationExists(relation, dboid))

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/backend/utils/adt/pxf_functions.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/adt/pxf_functions.c 
b/src/backend/utils/adt/pxf_functions.c
index a3a2662..ee19a8b 100644
--- a/src/backend/utils/adt/pxf_functions.c
+++ b/src/backend/utils/adt/pxf_functions.c
@@ -94,14 +94,6 @@ Datum pxf_get_item_fields(PG_FUNCTION_ARGS)
        text *profile = PG_GETARG_TEXT_P(0);
        text *pattern = PG_GETARG_TEXT_P(1);
 
-
-       if (!hcatalog_enable)
-       {
-               ereport(ERROR,
-                       (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                        errmsg("HCatalog querying is not enabled")));
-       }
-
        /* stuff done only on the first call of the function */
        if (SRF_IS_FIRSTCALL())
        {

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 3125c58..8e047a2 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -623,9 +623,6 @@ bool   pxf_service_singlecluster = false;
 char   *pxf_remote_service_login = NULL;
 char   *pxf_remote_service_secret = NULL;
 
-/* HCatalog GUC */
-bool   hcatalog_enable = false;
-
 /* Time based authentication GUC */
 char  *gp_auth_time_override_str = NULL;
 
@@ -4326,16 +4323,6 @@ static struct config_bool ConfigureNamesBool[] =
     },
 
        {
-               {"hcatalog_enable", PGC_USERSET, EXTERNAL_TABLES,
-                       gettext_noop("Enables HCatalog querying"),
-                       NULL,
-                       GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
-               },
-               &hcatalog_enable,
-               false, NULL, NULL
-       },
-
-       {
                {"gp_disable_catalog_access_on_segment", PGC_USERSET, 
DEVELOPER_OPTIONS,
                 gettext_noop("Disables non-builtin object access on segments"),
                 NULL,

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/include/utils/guc.h
----------------------------------------------------------------------
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index c70c491..7da1dec 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -513,9 +513,6 @@ extern bool   pxf_service_singlecluster;
 extern char   *pxf_remote_service_login;
 extern char   *pxf_remote_service_secret;
 
-/* Hcatalog GUC */
-extern bool   hcatalog_enable;
-
 /* Time based authentication GUC */
 extern char  *gp_auth_time_override_str;
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/test/regress/input/hcatalog_lookup.source
----------------------------------------------------------------------
diff --git a/src/test/regress/input/hcatalog_lookup.source 
b/src/test/regress/input/hcatalog_lookup.source
index 2e3b5ea..1756596 100644
--- a/src/test/regress/input/hcatalog_lookup.source
+++ b/src/test/regress/input/hcatalog_lookup.source
@@ -2,16 +2,9 @@
 -- test hcatalog lookup
 -- --------------------------------------
 
--- Negative test with GUC disabled
-SET hcatalog_enable = false;
-SELECT * from hcatalog.db.t;
-
 SELECT * FROM pxf_get_item_fields('Hive', '*');
  \d hcatalog.*.*
 
--- enable GUC
-SET hcatalog_enable = true;
-
 SELECT * FROM pxf_get_item_fields('Hive', '*abc*abc*');
 \d hcatalog.*abc*.*abc*
 \d hcatalog
@@ -188,8 +181,6 @@ DROP FUNCTION convert_to_internal_schema(text);
 DROP FUNCTION trigger_func();
 DROP USER newuser;
 DROP TABLE hcatalog;
--- disable GUC
-SET hcatalog_enable = false;
 
 --negative test: cannot connect to "hcatalog" database
 \connect hcatalog;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/649828ff/src/test/regress/output/hcatalog_lookup.source
----------------------------------------------------------------------
diff --git a/src/test/regress/output/hcatalog_lookup.source 
b/src/test/regress/output/hcatalog_lookup.source
index 8eefb49..ac2a4f6 100644
--- a/src/test/regress/output/hcatalog_lookup.source
+++ b/src/test/regress/output/hcatalog_lookup.source
@@ -1,18 +1,12 @@
 -- --------------------------------------
 -- test hcatalog lookup
 -- --------------------------------------
--- Negative test with GUC disabled
-SET hcatalog_enable = false;
-SELECT * from hcatalog.db.t;
-ERROR:  HCatalog querying is not enabled, query for "hcatalog.db.t" is not 
allowed in this context
-LINE 1: SELECT * from hcatalog.db.t;
-                      ^
 SELECT * FROM pxf_get_item_fields('Hive', '*');
-ERROR:  HCatalog querying is not enabled
+ path | itemname | fieldname | fieldtype 
+------+----------+-----------+-----------
+(0 rows)
+
 \d hcatalog.*.*
-ERROR:  HCatalog querying is not enabled
--- enable GUC
-SET hcatalog_enable = true;
 SELECT * FROM pxf_get_item_fields('Hive', '*abc*abc*');
  path | itemname | fieldname | fieldtype 
 ------+----------+-----------+-----------
@@ -342,8 +336,6 @@ DROP FUNCTION convert_to_internal_schema(text);
 DROP FUNCTION trigger_func();
 DROP USER newuser;
 DROP TABLE hcatalog;
--- disable GUC
-SET hcatalog_enable = false;
 --negative test: cannot connect to "hcatalog" database
 \connect hcatalog;
 \connect: FATAL:  "hcatalog" database is only for system use
\ No newline at end of file

Reply via email to