hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangh43 <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-293. Enable writable external ta...
Date Tue, 05 Jan 2016 03:33:26 GMT
Github user zhangh43 commented on a diff in the pull request:

    --- Diff: src/backend/commands/tablecmds.c ---
    @@ -17666,6 +17666,12 @@ static Datum transformExecOnClause(List	*on_clause, int *preferred_segment_num)
     		else if (strcmp(defel->defname, "master") == 0)
    +			if(iswritable){
    +			  ereport(ERROR,
    +	 	      (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
    +			    errmsg("the ON master syntax for writable external tables is deprecated"),
    --- End diff --
    Only ON number is allowed, e.g. ON 3 will start 3 virtual segments to run the query.
    Here's an example to create a writable external table in Hawq 2.0:
    postgres=# create table a (i int);
    postgres=# insert into a values(1);
    INSERT 0 1
    postgres=# insert into a values(2);
    INSERT 0 1
    postgres=# insert into a values(10);
    INSERT 0 1
    postgres=# CREATE WRITABLE EXTERNAL WEB TABLE externala (output text)         EXECUTE
'cat > /tmp/externala' on 3 FORMAT 'TEXT'   DISTRIBUTED RANDOMLY;
    postgres=# insert into externala select * from a;
    INSERT 0 3
    You can check the result file in /tmp/externala:

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message