Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C113200BCC for ; Tue, 29 Nov 2016 11:17:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7A87E160B15; Tue, 29 Nov 2016 10:17:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C3BF3160B05 for ; Tue, 29 Nov 2016 11:17:28 +0100 (CET) Received: (qmail 12033 invoked by uid 500); 29 Nov 2016 10:17:28 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 12023 invoked by uid 99); 29 Nov 2016 10:17:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 10:17:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8A28E1A7A86 for ; Tue, 29 Nov 2016 10:17:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id O-RmL1sIWk6t for ; Tue, 29 Nov 2016 10:17:25 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 954EC5FC2A for ; Tue, 29 Nov 2016 10:17:24 +0000 (UTC) Received: (qmail 3914 invoked by uid 99); 29 Nov 2016 10:14:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 10:14:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E879AE01F4; Tue, 29 Nov 2016 10:14:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wlin@apache.org To: commits@hawq.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-1171. Add UDF check before register Date: Tue, 29 Nov 2016 10:14:53 +0000 (UTC) archived-at: Tue, 29 Nov 2016 10:17:29 -0000 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 Authored: Tue Nov 29 15:49:52 2016 +0800 Committer: Wen Lin 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):