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 DD45D200BB1 for ; Wed, 19 Oct 2016 20:24:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAA65160ADC; Wed, 19 Oct 2016 18:24:39 +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 140AD160AEA for ; Wed, 19 Oct 2016 20:24:38 +0200 (CEST) Received: (qmail 15420 invoked by uid 500); 19 Oct 2016 18:24:38 -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 15392 invoked by uid 99); 19 Oct 2016 18:24:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2016 18:24:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A66B3C10C3 for ; Wed, 19 Oct 2016 18:24:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tmNRduShcYrg for ; Wed, 19 Oct 2016 18:24:35 +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 5AF9F5FDF9 for ; Wed, 19 Oct 2016 18:24:35 +0000 (UTC) Received: (qmail 59734 invoked by uid 99); 19 Oct 2016 17:24:34 -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; Wed, 19 Oct 2016 17:24:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E133FE69A3; Wed, 19 Oct 2016 17:24:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yozie@apache.org To: commits@hawq.incubator.apache.org Date: Wed, 19 Oct 2016 17:24:37 -0000 Message-Id: In-Reply-To: <231e9529aef84066a2e353535f47ad3a@git.apache.org> References: <231e9529aef84066a2e353535f47ad3a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/6] incubator-hawq-docs git commit: make david's requested changes archived-at: Wed, 19 Oct 2016 18:24:40 -0000 make david's requested changes Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/commit/168cb22a Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/tree/168cb22a Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/diff/168cb22a Branch: refs/heads/develop Commit: 168cb22a0cc719441a46c98ff3c505cb88bffd2f Parents: 1332870 Author: Lisa Owen Authored: Wed Oct 19 09:08:30 2016 -0700 Committer: Lisa Owen Committed: Wed Oct 19 09:08:30 2016 -0700 ---------------------------------------------------------------------- plext/UsingProceduralLanguages.html.md.erb | 2 +- plext/builtin_langs.html.md.erb | 26 ++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/168cb22a/plext/UsingProceduralLanguages.html.md.erb ---------------------------------------------------------------------- diff --git a/plext/UsingProceduralLanguages.html.md.erb b/plext/UsingProceduralLanguages.html.md.erb index ea23982..bef1b93 100644 --- a/plext/UsingProceduralLanguages.html.md.erb +++ b/plext/UsingProceduralLanguages.html.md.erb @@ -2,7 +2,7 @@ title: Using Languages and Extensions in HAWQ --- -HAWQ supports user-defined functions created with the SQL and C built-in languages, including supporting user-defined aliases for internal functions. +HAWQ supports user-defined functions that are created with the SQL and C built-in languages, and also supports user-defined aliases for internal functions. HAWQ also supports user-defined functions written in languages other than SQL and C. These other languages are generically called *procedural languages* (PLs) and are extensions to the core HAWQ functionality. HAWQ specifically supports the PL/Java, PL/Perl, PL/pgSQL, PL/Python, and PL/R procedural languages. http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/168cb22a/plext/builtin_langs.html.md.erb ---------------------------------------------------------------------- diff --git a/plext/builtin_langs.html.md.erb b/plext/builtin_langs.html.md.erb index a630732..931f2f2 100644 --- a/plext/builtin_langs.html.md.erb +++ b/plext/builtin_langs.html.md.erb @@ -9,13 +9,13 @@ HAWQ supports user-defined functions created with the SQL and C built-in languag ## Enabling Built-in Language Support -Support for SQL, internal, and C language user-defined functions is enabled by default for all HAWQ databases. +Support for SQL and C language user-defined functions and aliasing of internal functions is enabled by default for all HAWQ databases. -## SQL +## Defining SQL Functions -SQL functions execute an arbitrary list of SQL statements. The SQL statements in the body of an SQL function must be separated by semicolons. The final statement in a non-void-returning SQL function must be a [SELECT](../reference/sql/SELECT.html) that returns data of the type specified by the function's return type. The function will return a single or set of rows corresponding to this last SQL query. +SQL functions execute an arbitrary list of SQL statements. The SQL statements in the body of a SQL function must be separated by semicolons. The final statement in a non-void-returning SQL function must be a [SELECT](../reference/sql/SELECT.html) that returns data of the type specified by the function's return type. The function will return a single or set of rows corresponding to this last SQL query. -The following example creates and calls an SQL function to count the number of rows of the database named `orders`: +The following example creates and calls a SQL function to count the number of rows of the database named `orders`: ``` sql gpadmin=# CREATE FUNCTION count_orders() RETURNS bigint AS $$ @@ -29,15 +29,15 @@ gpadmin=# select count_orders(); (1 row) ``` -For additional information on creating SQL functions, refer to [Query Language (SQL) Functions](https://www.postgresql.org/docs/8.2/static/xfunc-sql.html) in the PostgreSQL documentation. +For additional information about creating SQL functions, refer to [Query Language (SQL) Functions](https://www.postgresql.org/docs/8.2/static/xfunc-sql.html) in the PostgreSQL documentation. -## Internal +## Aliasing Internal Functions -Many HAWQ internal functions are written in C. These functions are declared during initialization of the database cluster and statically linked to the HAWQ server. See [Built-in Functions and Operators](../query/functions-operators.html#topic29) for detailed information on HAWQ internal functions. +Many HAWQ internal functions are written in C. These functions are declared during initialization of the database cluster and statically linked to the HAWQ server. See [Built-in Functions and Operators](../query/functions-operators.html#topic29) for detailed information about HAWQ internal functions. -While users cannot define new internal functions, they can create aliases for existing internal functions. +You cannot define new internal functions, but you can create aliases for existing internal functions. -The following example creates a new function named `all_caps` that will be defined as an alias for the `upper` HAWQ internal function: +The following example creates a new function named `all_caps` that is an alias for the `upper` HAWQ internal function: ``` sql @@ -52,11 +52,11 @@ gpadmin=# SELECT all_caps('change me'); ``` -For more information on aliasing internal functions, refer to [Internal Functions](https://www.postgresql.org/docs/8.2/static/xfunc-internal.html) in the PostgreSQL documentation. +For more information about aliasing internal functions, refer to [Internal Functions](https://www.postgresql.org/docs/8.2/static/xfunc-internal.html) in the PostgreSQL documentation. -## C +## Defining C Functions -User-defined functions written in C must be compiled into shared libraries to be loaded by the HAWQ server on demand. This dynamic loading distinguishes C language functions from internal functions that are written in C. +You must compile user-defined functions written in C into shared libraries so that the HAWQ server can load them on demand. This dynamic loading distinguishes C language functions from internal functions that are written in C. The [CREATE FUNCTION](../reference/sql/CREATE-FUNCTION.html) call for a user-defined C function must include both the name of the shared library and the name of the function. @@ -106,5 +106,5 @@ gpadmin=# SELECT double_it_c(27); The shared library `.so` extension may be omitted. -For additional information on using the C language to create functions, refer to [C-Language Functions](https://www.postgresql.org/docs/8.2/static/xfunc-c.html) in the PostgreSQL documentation. +For additional information about using the C language to create functions, refer to [C-Language Functions](https://www.postgresql.org/docs/8.2/static/xfunc-c.html) in the PostgreSQL documentation.