hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject incubator-hawq git commit: HAWQ-1171. Add UDF check before register
Date Tue, 29 Nov 2016 10:14:53 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master c80e4e35a -> 25ba61693


HAWQ-1171. Add UDF check before register


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

Branch: refs/heads/master
Commit: 25ba6169379fb7ae337a0a44640d93b3c345fe34
Parents: c80e4e3
Author: Wen Lin <wlin@pivotal.io>
Authored: Tue Nov 29 15:49:52 2016 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Tue Nov 29 15:49:52 2016 +0800

----------------------------------------------------------------------
 tools/bin/hawqregister | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/25ba6169/tools/bin/hawqregister
----------------------------------------------------------------------
diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister
index 4adbdcc..73ce204 100755
--- a/tools/bin/hawqregister
+++ b/tools/bin/hawqregister
@@ -1121,6 +1121,12 @@ def main(options, args):
         logger.error('Fail to connect to database, this script can only be run when database
is up.')
         return 1
 
+    # check if Function gp_relfile_insert_for_register exists
+    sql = 'select count(*) from pg_proc  where proname=\'gp_relfile_insert_for_register\''
+    if int(conn.query(sql).dictresult()[0]['count']) == 0 :
+        logger.error('Function \'gp_relfile_insert_for_register\' is not found, please run
\'hawq upgrade\' then try again.')
+        return 1
+
     failure_handler = FailureHandler(conn)
     # register
     if options.yml_config and ispartition(options.yml_config):


Mime
View raw message