hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsyuan <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-123. Add 'Partition by' descript...
Date Thu, 12 Nov 2015 00:34:59 GMT
Github user hsyuan commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/93#discussion_r44608139
  
    --- Diff: src/bin/psql/describe.c ---
    @@ -2676,6 +2686,80 @@ add_distributed_by_footer(const char* oid, PQExpBufferData *inoutbuf,
PQExpBuffe
     }
     
     /*
    + * Add a 'partition by' description to the footer.
    + */
    +static int
    +add_partition_by_footer(const char* oid, PQExpBufferData *inoutbuf, PQExpBufferData *buf)
    +{
    +	PGresult	*result = NULL;
    +
    +	/* check if current relation is root partition, if it is root partition, at least 1
row returns */
    +	printfPQExpBuffer(buf, "SELECT parrelid FROM pg_catalog.pg_partition WHERE parrelid
= '%s'", oid);
    +	result = PSQLexec(buf->data, false);
    +
    +	if (!result)
    +		return 1;
    +	int nRows = PQntuples(result);
    +	int nPartKey = 0;
    +
    +	PQclear(result);
    +
    +	if(nRows)
    --- End diff --
    
    oops. Will add space. :smile: 


---
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.
---

Mime
View raw message