http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_partition_columns.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_partition_columns.html.md.erb 
b/markdown/reference/catalog/pg_partition_columns.html.md.erb
new file mode 100644
index 0000000..2205a24
--- /dev/null
+++ b/markdown/reference/catalog/pg_partition_columns.html.md.erb
@@ -0,0 +1,20 @@
+---
+title: pg_partition_columns
+---
+
+The `pg_partition_columns` system view is used to show the partition key 
columns of a partitioned table.
+
+<a id="topic1__ha179967"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_partition\_columns</span>
+
+| column                      | type     | references | description            
                                                                                
                              |
+|-----------------------------|----------|------------|--------------------------------------------------------------------------------------------------------------------------------------|
+| `schemaname`                | name     |            | The name of the 
schema the partitioned table is in.                                             
                                     |
+| `tablename`                 | name     |            | The table name of the 
top-level parent table.                                                         
                               |
+| `columnname`                | name     |            | The name of the 
partition key column.                                                           
                                     |
+| `partitionlevel`            | smallint |            | The level of this 
subpartition in the hierarchy.                                                  
                                   |
+| `position_in_partition_key` | integer  |            | For list partitions 
you can have a composite (multi-column) partition key. This shows the position 
of the column in a composite key. |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_partition_encoding.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_partition_encoding.html.md.erb 
b/markdown/reference/catalog/pg_partition_encoding.html.md.erb
new file mode 100644
index 0000000..e1dbabb
--- /dev/null
+++ b/markdown/reference/catalog/pg_partition_encoding.html.md.erb
@@ -0,0 +1,18 @@
+---
+title: pg_partition_encoding
+---
+
+The `pg_partition_encoding` system catalog table describes the available 
column compression options for a partition template.
+
+<a id="topic1__hb177831"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_attribute\_encoding</span>
+
+| column             | type       | modifers | storage  | description |
+|--------------------|------------|----------|----------|-------------|
+| `parencoid`        | oid        | not null | plain    |             |
+| `parencattnum`     | smallint   | not null | plain    |             |
+| `parencattoptions` | text \[ \] |          | extended |             |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_partition_rule.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_partition_rule.html.md.erb 
b/markdown/reference/catalog/pg_partition_rule.html.md.erb
new file mode 100644
index 0000000..9648132
--- /dev/null
+++ b/markdown/reference/catalog/pg_partition_rule.html.md.erb
@@ -0,0 +1,28 @@
+---
+title: pg_partition_rule
+---
+
+The `pg_partition_rule` system catalog table is used to track partitioned 
tables, their check constraints, and data containment rules. Each row of 
`pg_partition_rule` represents either a leaf partition (the bottom level 
partitions that contain data), or a branch partition (a top or mid-level 
partition that is used to define the partition hierarchy, but does not contain 
any data).
+
+<a id="topic1__hc179425"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_partition\_rule</span>
+
+
+| column              | type     | references                 | description    
                                                                                
                                                                                
                                                                                
                                                                                
                              |
+|---------------------|----------|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `paroid`            | oid      | pg\_partition.oid          | Row identifier 
of the partitioning level (from [pg\_partition](pg_partition.html#topic1)) to 
which this partition belongs. In the case of a branch partition, the 
corresponding table (identified by `pg_partition_rule`) is an empty container 
table. In case of a leaf partition, the table contains the rows for that 
partition containment rule. |
+| `parchildrelid`     | oid      | pg\_class.oid              | The table 
identifier of the partition (child table).                                      
                                                                                
                                                                                
                                                                                
                                   |
+| `parparentrule`     | oid      | pg\_partition\_rule.paroid | The row 
identifier of the rule associated with the parent table of this partition.      
                                                                                
                                                                                
                                                                                
                                     |
+| `parname`           | name     |                            | The given 
name of this partition.                                                         
                                                                                
                                                                                
                                                                                
                                   |
+| `parisdefault`      | boolean  |                            | Whether or 
not this partition is a default partition.                                      
                                                                                
                                                                                
                                                                                
                                  |
+| `parruleord`        | smallint |                            | For range 
partitioned tables, the rank of this partition on this level of the partition 
hierarchy.                                                                      
                                                                                
                                                                                
                                     |
+| `parrangestartincl` | boolean  |                            | For range 
partitioned tables, whether or not the starting value is inclusive.             
                                                                                
                                                                                
                                                                                
                                   |
+| `parrangeendincl`   | boolean  |                            | For range 
partitioned tables, whether or not the ending value is inclusive.               
                                                                                
                                                                                
                                                                                
                                   |
+| `parrangestart`     | text     |                            | For range 
partitioned tables, the starting value of the range.                            
                                                                                
                                                                                
                                                                                
                                   |
+| `parrangeend`       | text     |                            | For range 
partitioned tables, the ending value of the range.                              
                                                                                
                                                                                
                                                                                
                                   |
+| `parrangeevery`     | text     |                            | For range 
partitioned tables, the interval value of the `EVERY` clause.                   
                                                                                
                                                                                
                                                                                
                                   |
+| `parlistvalues`     | text     |                            | For list 
partitioned tables, the list of values assigned to this partition.              
                                                                                
                                                                                
                                                                                
                                    |
+| `parreloptions`     | text     |                            | An array 
describing the storage characteristics of the particular partition.             
                                                                                
                                                                                
                                                                                
                                    |
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_partition_templates.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_partition_templates.html.md.erb 
b/markdown/reference/catalog/pg_partition_templates.html.md.erb
new file mode 100644
index 0000000..ff397fb
--- /dev/null
+++ b/markdown/reference/catalog/pg_partition_templates.html.md.erb
@@ -0,0 +1,30 @@
+---
+title: pg_partition_templates
+---
+
+The `pg_partition_templates` system view is used to show the subpartitions 
that were created using a subpartition template.
+
+<a id="topic1__hd179967"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_partition\_templates</span>
+
+
+| column                    | type     | references | description              
                                                                                
                                                                                
                        |
+|---------------------------|----------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `schemaname`              | name     |            | The name of the schema 
the partitioned table is in.                                                    
                                                                                
                          |
+| `tablename`               | name     |            | The table name of the 
top-level parent table.                                                         
                                                                                
                           |
+| `partitionname`           | name     |            | The name of the 
subpartition (this is the name to use if referring to the partition in an 
`ALTER TABLE` command). `NULL` if the partition was not given a name at create 
time or generated by an `EVERY` clause. |
+| `partitiontype`           | text     |            | The type of 
subpartition (range or list).                                                   
                                                                                
                                     |
+| `partitionlevel`          | smallint |            | The level of this 
subpartition in the hierarchy.                                                  
                                                                                
                               |
+| `partitionrank`           | bigint   |            | For range partitions, 
the rank of the partition compared to other partitions of the same level.       
                                                                                
                           |
+| `partitionposition`       | smallint |            | The rule order position 
of this subpartition.                                                           
                                                                                
                         |
+| `partitionlistvalues`     | text     |            | For list partitions, 
the list value(s) associated with this subpartition.                            
                                                                                
                            |
+| `partitionrangestart`     | text     |            | For range partitions, 
the start value of this subpartition.                                           
                                                                                
                           |
+| `partitionstartinclusive` | boolean  |            | `T` if the start value 
is included in this subpartition. `F` if it is excluded.                        
                                                                                
                          |
+| `partitionrangeend`       | text     |            | For range partitions, 
the end value of this subpartition.                                             
                                                                                
                           |
+| `partitionendinclusive`   | boolean  |            | `T` if the end value is 
included in this subpartition. `F` if it is excluded.                           
                                                                                
                         |
+| `partitioneveryclause`    | text     |            | The `EVERY` clause 
(interval) of this subpartition.                                                
                                                                                
                              |
+| `partitionisdefault`      | boolean  |            | `T` if this is a 
default subpartition, otherwise `F`.                                            
                                                                                
                                |
+| `partitionboundary`       | text     |            | The entire partition 
specification for this subpartition.                                            
                                                                                
                            |
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_partitions.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_partitions.html.md.erb 
b/markdown/reference/catalog/pg_partitions.html.md.erb
new file mode 100644
index 0000000..2c0b26a
--- /dev/null
+++ b/markdown/reference/catalog/pg_partitions.html.md.erb
@@ -0,0 +1,30 @@
+---
+title: pg_partitions
+---
+
+The `pg_partitions` system view is used to show the structure of a partitioned 
table.
+
+<a id="topic1__he143898"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_partitions</span>
+
+| column                     | type     | references | description             
                                                                                
                                                                                
                      |
+|----------------------------|----------|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `schemaname`               | name     |            | The name of the schema 
the partitioned table is in.                                                    
                                                                                
                       |
+| `tablename`                | name     |            | The name of the 
top-level parent table.                                                         
                                                                                
                              |
+| `partitiontablename`       | name     |            | The relation name of 
the partitioned table (this is the table name to use if accessing the partition 
directly).                                                                      
                         |
+| `partitionname`            | name     |            | The name of the 
partition (this is the name to use if referring to the partition in an `ALTER 
TABLE` command). `NULL` if the partition was not given a name at create time or 
generated by an `EVERY` clause. |
+| `parentpartitiontablename` | name     |            | The relation name of 
the parent table one level up from this partition.                              
                                                                                
                         |
+| `parentpartitionname`      | name     |            | The given name of the 
parent table one level up from this partition.                                  
                                                                                
                        |
+| `partitiontype`            | text     |            | The type of partition 
(range or list).                                                                
                                                                                
                        |
+| `partitionlevel`           | smallint |            | The level of this 
partition in the hierarchy.                                                     
                                                                                
                            |
+| `partitionrank`            | bigint   |            | For range partitions, 
the rank of the partition compared to other partitions of the same level.       
                                                                                
                        |
+| `partitionposition`        | smallint |            | The rule order 
position of this partition.                                                     
                                                                                
                               |
+| `partitionlistvalues`      | text     |            | For list partitions, 
the list value(s) associated with this partition.                               
                                                                                
                         |
+| `partitionrangestart`      | text     |            | For range partitions, 
the start value of this partition.                                              
                                                                                
                        |
+| `partitionstartinclusive`  | boolean  |            | `T` if the start value 
is included in this partition. `F` if it is excluded.                           
                                                                                
                       |
+| `partitionrangeend`        | text     |            | For range partitions, 
the end value of this partition.                                                
                                                                                
                        |
+| `partitionendinclusive`    | boolean  |            | `T` if the end value 
is included in this partition. `F` if it is excluded.                           
                                                                                
                         |
+| `partitioneveryclause`     | text     |            | The `EVERY` clause 
(interval) of this partition.                                                   
                                                                                
                           |
+| `partitionisdefault`       | boolean  |            | `T` if this is a 
default partition, otherwise `F`.                                               
                                                                                
                             |
+| `partitionboundary`        | text     |            | The entire partition 
specification for this partition.                                               
                                                                                
                         |
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_pltemplate.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_pltemplate.html.md.erb 
b/markdown/reference/catalog/pg_pltemplate.html.md.erb
new file mode 100644
index 0000000..0aee00a
--- /dev/null
+++ b/markdown/reference/catalog/pg_pltemplate.html.md.erb
@@ -0,0 +1,22 @@
+---
+title: pg_pltemplate
+---
+
+The `pg_pltemplate` system catalog table stores template information for 
procedural languages. A template for a language allows the language to be 
created in a particular database by a simple `CREATE LANGUAGE` command, with no 
need to specify implementation details. Unlike most system catalogs, 
`pg_pltemplate` is shared across all databases of HAWQ system: there is only 
one copy of `pg_pltemplate` per system, not one per database. This allows the 
information to be accessible in each database as it is needed.
+
+There are not currently any commands that manipulate procedural language 
templates; to change the built-in information, a superuser must modify the 
table using ordinary `INSERT`, `DELETE`, or `UPDATE` commands.
+
+<a id="topic1__hf150092"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_pltemplate</span>
+
+| column           | type        | references | description                    
                       |
+|------------------|-------------|------------|-------------------------------------------------------|
+| `tmplname`       | name        |            | Name of the language this 
template is for             |
+| `tmpltrusted`    | boolean     |            | True if language is 
considered trusted                |
+| `tmplhandler`    | text        |            | Name of call handler function 
                        |
+| `tmplvalidator ` | text        |            | Name of validator function, 
or `NULL` if none           |
+| `tmpllibrary`    | text        |            | Path of shared library that 
implements language       |
+| `tmplacl`        | aclitem\[\] |            | Access privileges for 
template (not yet implemented). |
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_proc.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_proc.html.md.erb 
b/markdown/reference/catalog/pg_proc.html.md.erb
new file mode 100644
index 0000000..4d1d194
--- /dev/null
+++ b/markdown/reference/catalog/pg_proc.html.md.erb
@@ -0,0 +1,36 @@
+---
+title: pg_proc
+---
+
+The `pg_proc` system catalog table stores information about functions (or 
procedures), both built-in functions and those defined by `CREATE FUNCTION`. 
The table contains data for aggregate and window functions as well as plain 
functions. If `proisagg` is true, there should be a matching row in 
`pg_aggregate`. If `proiswin` is true, there should be a matching row in 
`pg_window`.
+
+For compiled functions, both built-in and dynamically loaded, `prosrc` 
contains the function's C-language name (link symbol). For all other 
currently-known language types, `prosrc` contains the function's source text. 
`probin` is unused except for dynamically-loaded C functions, for which it 
gives the name of the shared library file containing the function.
+
+<a id="topic1__hg150092"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_proc</span>
+
+| column           | type        | references        | description             
                                                                                
                                                                                
                                                                                
                                                                           |
+|------------------|-------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `proname`        | name        |                   | Name of the function.  
                                                                                
                                                                                
                                                                                
                                                                            |
+| `pronamespace`   | oid         | pg\_namespace.oid | The OID of the 
namespace that contains this function.                                          
                                                                                
                                                                                
                                                                                
    |
+| `proowner`       | oid         | pg\_authid.oid    | Owner of the function.  
                                                                                
                                                                                
                                                                                
                                                                           |
+| `prolang`        | oid         | pg\_language.oid  | Implementation language 
or call interface of this function.                                             
                                                                                
                                                                                
                                                                           |
+| `proisagg`       | boolean     |                   | Function is an 
aggregate function.                                                             
                                                                                
                                                                                
                                                                                
    |
+| `prosecdef`      | boolean     |                   | Function is a security 
definer (for example, a 'setuid' function).                                     
                                                                                
                                                                                
                                                                            |
+| `proisstrict`    | boolean     |                   | Function returns NULL 
if any call argument is NULL. In that case the function will not actually be 
called at all. Functions that are not strict must be prepared to handle NULL 
inputs.                                                                         
                                                                                
   |
+| `proretset`      | boolean     |                   | Function returns a set 
(multiple values of the specified data type).                                   
                                                                                
                                                                                
                                                                            |
+| `provolatile`    | char        |                   | Tells whether the 
function's result depends only on its input arguments, or is affected by 
outside factors. `i` = *immutable* (always delivers the same result for the 
same inputs), `s` = *stable* (results (for fixed inputs) do not change within a 
scan), or `v` = *volatile* (results may change at any time or functions with 
side-effects). |
+| `pronargs`       | smallint    |                   | Number of arguments.   
                                                                                
                                                                                
                                                                                
                                                                            |
+| `prorettype`     | oid         | pg\_type.oid      | Data type of the return 
value.                                                                          
                                                                                
                                                                                
                                                                           |
+| `proiswin`       | boolean     |                   | Function is neither an 
aggregate nor a scalar function, but a pure window function.                    
                                                                                
                                                                                
                                                                            |
+| `proargtypes`    | oidvector   | pg\_type.oid      | An array with the data 
types of the function arguments. This includes only input arguments (including 
`INOUT` arguments), and thus represents the call signature of the function.     
                                                                                
                                                                             |
+| `proallargtypes` | oid\[\]     | pg\_type.oid      | An array with the data 
types of the function arguments. This includes all arguments (including `OUT` 
and `INOUT` arguments); however, if all the arguments are `IN` arguments, this 
field will be null. Note that subscripting is 1-based, whereas for historical 
reasons proargtypes is subscripted from 0.                                      
 |
+| `proargmodes`    | char\[\]    |                   | An array with the 
modes of the function arguments: `i` = `IN`, `o` = `OUT` , `b` = `INOUT`. If 
all the arguments are IN arguments, this field will be null. Note that 
subscripts correspond to positions of proallargtypes not proargtypes.           
                                                                                
             |
+| `proargnames`    | text\[\]    |                   | An array with the 
names of the function arguments. Arguments without a name are set to empty 
strings in the array. If none of the arguments have a name, this field will be 
null. Note that subscripts correspond to positions of proallargtypes not 
proargtypes.                                                                    
              |
+| `prosrc `        | text        |                   | This tells the 
function handler how to invoke the function. It might be the actual source code 
of the function for interpreted languages, a link symbol, a file name, or just 
about anything else, depending on the implementation language/call convention.  
                                                                                
     |
+| `probin`         | bytea       |                   | Additional information 
about how to invoke the function. Again, the interpretation is 
language-specific.                                                              
                                                                                
                                                                                
             |
+| `proacl`         | aclitem\[\] |                   | Access privileges for 
the function as given by `GRANT`/`REVOKE`.                                      
                                                                                
                                                                                
                                                                             |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_resqueue.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_resqueue.html.md.erb 
b/markdown/reference/catalog/pg_resqueue.html.md.erb
new file mode 100644
index 0000000..0b8d414
--- /dev/null
+++ b/markdown/reference/catalog/pg_resqueue.html.md.erb
@@ -0,0 +1,30 @@
+---
+title: pg_resqueue
+---
+
+The `pg_resqueue` system catalog table contains information about HAWQ 
resource queues, which are used for managing resources. This table is populated 
only on the master. This table is defined in the `pg_global` tablespace, 
meaning it is globally shared across all databases in the system.
+
+<a id="topic1__hi141982"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_resqueue</span>
+
+| column                  | type                     | references | 
description                                                                     
                                                                                
                         |
+|-------------------------|--------------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `rsqname`               | name                     |            | The name 
of the resource queue.                                                          
                                                                                
                |
+| `parentoid`             | oid                      |            | OID of 
the parent queue of the resource queue.                                         
                                                                                
                  |
+| `activestats`           | integer                  |            | The 
maximum number of parallel active statements allowed for the resource queue.    
                                                                                
                     |
+| `memorylimit`           | text                     |            | The 
maximum amount of memory that can be consumed by the resource queue (expressed 
as a percentage of the cluster's memory.)                                       
                      |
+| `corelimit`             | text                     |            | The 
maximum amount of cores that can be consumed by the resource queue (expressed 
as a percentage of the cluster's cores.)                                        
                       |
+| `resovercommit`         | real                     |            | The ratio 
of resource consumption overcommit for the resource queue.                      
                                                                                
               |
+| `allocpolicy`           | text                     |            | The 
resource allocation policy name for the resource queue.                         
                                                                                
                     |
+| `vsegresourcequota`     | text                     |            | The 
virtual segment resource quota for the resource queue.                          
                                                                                
                     |
+| `nvsegupperlimit`       | integer                  |            | The upper 
limit of number of virtual segments allowed for one statement execution.        
                                                                                
               |
+| `nvseglowerlimit`       | integer                  |            | The lower 
limit of number of virtual segments allowed for one statement execution.        
                                                                                
               |
+| `nvsegupperlimitperseg` | real                     |            | The upper 
limit of number of virtual segments allowed for one statement execution. The 
limit is averaged by the number of segments in the cluster.                     
                  |
+| `nvseglowerlimitperseg` | real                     |            | The lower 
limit of number of virtual segments aloowed for one statement execution. The 
limit is averaged by the number of segments in the cluster.                     
                  |
+| `creationtime`          | timestamp with time zone |            | Time when 
the resource queue was created.                                                 
                                                                                
               |
+| `updatetime`            | timestamp with time zone |            | Time when 
the resource queue was last changed.                                            
                                                                                
               |
+| `status`                | text                     |            | Current 
status of the resource queue.Possible values are `branch`, which indicates a 
branch resource queue (has children), and `NULL`, which indicates a leaf-level 
queue (no children). |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_resqueue_status.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_resqueue_status.html.md.erb 
b/markdown/reference/catalog/pg_resqueue_status.html.md.erb
new file mode 100644
index 0000000..7c841c2
--- /dev/null
+++ b/markdown/reference/catalog/pg_resqueue_status.html.md.erb
@@ -0,0 +1,94 @@
+---
+title: pg_resqueue_status
+---
+
+The `pg_resqueue_status` view allows administrators to see status and activity 
for a workload management resource queue. It shows how many queries are waiting 
to run and how many queries are currently active in the system from a 
particular resource queue.
+
+<a id="topic1__fp141982"></a>
+<span class="tablecap">Table 1. pg\_resqueue\_status</span>
+
+<table>
+<colgroup>
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>column</th>
+<th>type</th>
+<th>references</th>
+<th>description</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td><code class="ph codeph">rsqname</code></td>
+<td>name</td>
+<td>pg_resqueue_ rsqname</td>
+<td>The name of the resource queue.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">segmem</code></td>
+<td>text</td>
+<td> </td>
+<td>The calculated virtual segment memory resource quota.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">segcore</code></td>
+<td>text</td>
+<td> </td>
+<td>The calculated virtual segment core resource quota.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">segsize</code></td>
+<td>text</td>
+<td> </td>
+<td>The number of virtual segments that can be allocated to the resource 
queue.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">segsizemax</code></td>
+<td>text</td>
+<td> </td>
+<td>The maximum number of virtual segments that can be allocated to the 
resource queue.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">inusemem</code></td>
+<td>text</td>
+<td> </td>
+<td>Aggregated in-use memory by running statements.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">inusecore</code></td>
+<td>text</td>
+<td> </td>
+<td>Aggregated in-use core by running statements.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">rsqholders</code></td>
+<td>text</td>
+<td> </td>
+<td>The number of resource holders for running statements. A resource holder 
is a running statement whose allocated resources from the resource manager has 
not been returned yet. In other words, the statement holds some resources 
allocated from the resource manager.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">resqwaiters</code></td>
+<td>text</td>
+<td> </td>
+<td>The number of resource requests that are queued and waiting for the 
resource.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">paused</code></td>
+<td>text</td>
+<td> </td>
+<td>The dynamic pause status of the resource queue. There are three possible 
statuses:
+<ul>
+<li><code class="ph codeph">T</code> : Queue is paused for the allocation of 
resources to queued and incoming requests.</li>
+<li><code class="ph codeph">F</code> : Queue is in a normal working 
status.</li>
+<li><code class="ph codeph">R</code> : Queue is paused and may have 
encountered resource fragmentation.</li>
+</ul></td>
+</tr>
+</tbody>
+</table>
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_rewrite.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_rewrite.html.md.erb 
b/markdown/reference/catalog/pg_rewrite.html.md.erb
new file mode 100644
index 0000000..9b2a76b
--- /dev/null
+++ b/markdown/reference/catalog/pg_rewrite.html.md.erb
@@ -0,0 +1,20 @@
+---
+title: pg_rewrite
+---
+
+The `pg_rewrite` system catalog table stores rewrite rules for tables and 
views. `pg_class.relhasrules` must be true if a table has any rules in this 
catalog.
+
+<a id="topic1__hm149830"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_rewrite</span>
+
+| column       | type     | references    | description                        
                                                                     |
+|--------------|----------|---------------|---------------------------------------------------------------------------------------------------------|
+| `rulename`   | name     |               | Rule name.                        
                                                                      |
+| `ev_class`   | oid      | pg\_class.oid | The table this rule is for.        
                                                                     |
+| `ev_attr`    | smallint |               | The column this rule is for 
(currently, always zero to indicate the whole table).                       |
+| `ev_type `   | char     |               | Event type that the rule is for: 
<ul><li> 1 = `SELECT` </li> <li>2 = `UPDATE`</li> <li>3 = `INSERT`</li> <li>4 = 
`DELETE`</li> </ul>                       |
+| `is_instead` | boolean  |               | True if the rule is an `INSTEAD` 
rule.                                                                    |
+| `ev_qual`    | text     |               | Expression tree (in the form of a 
`nodeToString()` representation) for the rule's qualifying condition. |
+| `ev_action`  | text     |               | Query tree (in the form of a 
`nodeToString()` representation) for the rule's action.                    |
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_roles.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_roles.html.md.erb 
b/markdown/reference/catalog/pg_roles.html.md.erb
new file mode 100644
index 0000000..9e70f46
--- /dev/null
+++ b/markdown/reference/catalog/pg_roles.html.md.erb
@@ -0,0 +1,31 @@
+---
+title: pg_roles
+---
+
+The view `pg_roles` provides access to information about database roles. This 
is simply a publicly readable view of [pg\_authid](pg_authid.html#topic1) that 
blanks out the password field. This view explicitly exposes the OID column of 
the underlying table, since that is needed to do joins to other catalogs.
+
+<a id="topic1__hn141982"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_roles</span>
+
+| column              | type                     | references       | 
description                                                                     
                                    |
+|---------------------|--------------------------|------------------|---------------------------------------------------------------------------------------------------------------------|
+| `rolname`           | name                     |                  | Role 
name                                                                            
                               |
+| `rolsuper`          | boolean                  |                  | Role 
has superuser privileges                                                        
                               |
+| `rolinherit`        | boolean                  |                  | Role 
automatically inherits privileges of roles it is a member of                    
                               |
+| `rolcreaterole`     | boolean                  |                  | Role 
may create more roles                                                           
                               |
+| `rolcreatedb`       | boolean                  |                  | Role 
may create databases                                                            
                               |
+| `rolcatupdate`      | boolean                  |                  | Role 
may update system catalogs directly. (Even a superuser may not do this unless 
this column is true.)            |
+| `rolcanlogin`       | boolean                  |                  | Role 
may log in. That is, this role can be given as the initial session 
authorization identifier                    |
+| `rolconnlimit`      | integer                  |                  | For 
roles that can log in, this sets maximum number of concurrent connections this 
role can make. -1 means no limit |
+| `rolpassword`       | text                     |                  | Not the 
password (always reads as \*\*\*\*\*\*\*\*)                                     
                            |
+| `rolvaliduntil `    | timestamp with time zone |                  | 
Password expiry time (only used for password authentication); NULL if no 
expiration                                 |
+| `rolconfig `        | text\[\]                 |                  | Session 
defaults for run-time configuration variables                                   
                            |
+| ` rolresqueue`      | oid                      | pg\_resqueue.oid | Object 
ID of the resource queue this role is assigned to.                              
                             |
+| `oid`               | oid                      | pg\_authid.oid   | Object 
ID of role                                                                      
                             |
+| `rolcreaterextgpfd` | boolean                  |                  | Role 
may create readable external tables that use the gpfdist protocol.              
                               |
+| `rolcreaterexthttp` | boolean                  |                  | Role 
may create readable external tables that use the http protocol.                 
                               |
+| `rolcreatewextgpfd` | boolean                  |                  | Role 
may create writable external tables that use the gpfdist protocol.              
                               |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_shdepend.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_shdepend.html.md.erb 
b/markdown/reference/catalog/pg_shdepend.html.md.erb
new file mode 100644
index 0000000..b966155
--- /dev/null
+++ b/markdown/reference/catalog/pg_shdepend.html.md.erb
@@ -0,0 +1,28 @@
+---
+title: pg_shdepend
+---
+
+The `pg_shdepend` system catalog table records the dependency relationships 
between database objects and shared objects, such as roles. This information 
allows HAWQ to ensure that those objects are unreferenced before attempting to 
delete them. See also [pg\_depend](pg_depend.html#topic1), which performs a 
similar function for dependencies involving objects within a single database. 
Unlike most system catalogs, `pg_shdepend` is shared across all databases of 
HAWQ system: there is only one copy of `pg_shdepend` per system, not one per 
database.
+
+In all cases, a `pg_shdepend` entry indicates that the referenced object may 
not be dropped without also dropping the dependent object. However, there are 
several subflavors identified by `deptype`:
+
+-   **SHARED\_DEPENDENCY\_OWNER (o)** — The referenced object (which must be 
a role) is the owner of the dependent object.
+-   **SHARED\_DEPENDENCY\_ACL (a)** — The referenced object (which must be a 
role) is mentioned in the ACL (access control list) of the dependent object.
+-   **SHARED\_DEPENDENCY\_PIN (p)** — There is no dependent object; this 
type of entry is a signal that the system itself depends on the referenced 
object, and so that object must never be deleted. Entries of this type are 
created only by system initialization. The columns for the dependent object 
contain zeroes. <a id="topic1__ho143898"></a>
+
+<span class="tablecap">Table 1. pg\_catalog.pg\_shdepend</span>
+
+| column         | type    | references       | description                    
                                                                            |
+|----------------|---------|------------------|------------------------------------------------------------------------------------------------------------|
+| `dbid`         | oid     | pg\_database.oid | The OID of the database the 
dependent object is in, or zero for a shared object.                           |
+| `classid`      | oid     | pg\_class.oid    | The OID of the system catalog 
the dependent object is in.                                                  |
+| `objid`        | oid     | any OID column   | The OID of the specific 
dependent object.                                                               
   |
+| `objsubid `    | integer |                  | For a table column, this is 
the column number. For all other object types, this column is zero.            |
+| `refclassid`   | oid     | pg\_class.oid    | The OID of the system catalog 
the referenced object is in (must be a shared catalog).                      |
+| `refobjid`     | oid     | any OID column   | The OID of the specific 
referenced object.                                                              
   |
+| `refobjsubid ` | integer |                  | For a table column, this is 
the referenced column number. For all other object types, this column is zero. |
+| `deptype`      | char    |                  | A code defining the specific 
semantics of this dependency relationship.                                    |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_shdescription.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_shdescription.html.md.erb 
b/markdown/reference/catalog/pg_shdescription.html.md.erb
new file mode 100644
index 0000000..133e326
--- /dev/null
+++ b/markdown/reference/catalog/pg_shdescription.html.md.erb
@@ -0,0 +1,18 @@
+---
+title: pg_shdescription
+---
+
+The `pg_shdescription` system catalog table stores optional descriptions 
(comments) for shared database objects. Descriptions can be manipulated with 
the `COMMENT` command and viewed with `psql`'s `\d` meta-commands. See also 
[pg\_description](pg_description.html#topic1), which performs a similar 
function for descriptions involving objects within a single database. Unlike 
most system catalogs, `pg_shdescription` is shared across all databases of a 
HAWQ system: there is only one copy of `pg_shdescription` per system, not one 
per database.
+
+<a id="topic1__hp143898"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_shdescription</span>
+
+
+| column        | type | references     | description                          
                         |
+|---------------|------|----------------|---------------------------------------------------------------|
+| `objoid`      | oid  | any OID column | The OID of the object this 
description pertains to.           |
+| `classoid`    | oid  | pg\_class.oid  | The OID of the system catalog this 
object appears in          |
+| `description` | text |                | Arbitrary text that serves as the 
description of this object. |
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stat_activity.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_stat_activity.html.md.erb 
b/markdown/reference/catalog/pg_stat_activity.html.md.erb
new file mode 100644
index 0000000..008ae8b
--- /dev/null
+++ b/markdown/reference/catalog/pg_stat_activity.html.md.erb
@@ -0,0 +1,30 @@
+---
+title: pg_stat_activity
+---
+
+The view `pg_stat_activity` shows one row per server process and details about 
it associated user session and query. The columns that report data on the 
current query are available unless the parameter `stats_command_string` has 
been turned off. Furthermore, these columns are only visible if the user 
examining the view is a superuser or the same as the user owning the process 
being reported on.
+
+<a id="topic1__hq141982"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_stat\_activity</span>
+
+| column             | type                     | references       | 
description                                                   |
+|--------------------|--------------------------|------------------|---------------------------------------------------------------|
+| `datid`            | oid                      | pg\_database.oid | Database 
OID                                                  |
+| `datname`          | name                     |                  | Database 
name                                                 |
+| `procpid`          | integer                  |                  | Process 
ID of the server process                              |
+| `sess_id`          | integer                  |                  | Session 
ID                                                    |
+| `usesysid`         | oid                      | pg\_authid.oid   | Role OID  
                                                    |
+| `usename`          | name                     |                  | Role 
name                                                     |
+| `current_query`    | text                     |                  | Current 
query that process is running                         |
+| `waiting`          | boolean                  |                  | True if 
waiting on a lock, false if not waiting               |
+| `query_start`      | timestamp with time zone |                  | Time 
query began execution                                    |
+| `backend_start`    | timestamp with time zone |                  | Time 
backend process was started                              |
+| `client_addr`      | inet                     |                  | Client 
address                                                |
+| `client_port`      | integer                  |                  | Client 
port                                                   |
+| `application_name` | text                     |                  | Client 
application name                                       |
+| `xact_start`       | timestamp with time zone |                  | 
Transaction start time                                        |
+| `waiting_resource` | boolean                  |                  | True if 
waiting for resource allocation, false if not waiting |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stat_last_operation.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_stat_last_operation.html.md.erb 
b/markdown/reference/catalog/pg_stat_last_operation.html.md.erb
new file mode 100644
index 0000000..b7f812b
--- /dev/null
+++ b/markdown/reference/catalog/pg_stat_last_operation.html.md.erb
@@ -0,0 +1,21 @@
+---
+title: pg_stat_last_operation
+---
+
+The `pg_stat_last_operation` table contains metadata tracking information 
about database objects (tables, views, etc.).
+
+<a id="topic1__hr138428"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_stat\_last\_operation</span>
+
+| column          | type                    | references     | description     
                                                                                
                                                                                
               |
+|-----------------|-------------------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `classid`       | oid                     | pg\_class.oid  | OID of the 
system catalog containing the object.                                           
                                                                                
                    |
+| `objid`         | oid                     | any OID column | OID of the 
object within its system catalog.                                               
                                                                                
                    |
+| `staactionname` | name                    |                | The action 
that was taken on the object.                                                   
                                                                                
                    |
+| `stasysid`      | oid                     | pg\_authid.oid | A foreign key 
to pg\_authid.oid.                                                              
                                                                                
                 |
+| `stausename`    | name                    |                | The name of 
the role that performed the operation on this object.                           
                                                                                
                   |
+| `stasubtype`    | text                    |                | The type of 
object operated on or the subclass of operation performed.                      
                                                                                
                   |
+| `statime`       | timestamp with timezone |                | The timestamp 
of the operation. This is the same timestamp that is written to the HAWQ server 
log files in case you need to look up more detailed information about the 
operation in the logs. |
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stat_last_shoperation.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_stat_last_shoperation.html.md.erb 
b/markdown/reference/catalog/pg_stat_last_shoperation.html.md.erb
new file mode 100644
index 0000000..0dc5a03
--- /dev/null
+++ b/markdown/reference/catalog/pg_stat_last_shoperation.html.md.erb
@@ -0,0 +1,23 @@
+---
+title: pg_stat_last_shoperation
+---
+
+The `pg_stat_last_shoperation` table contains metadata tracking information 
about global objects (roles, tablespaces, etc.).
+
+<a id="topic1__hs138428"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_stat\_last\_shoperation</span>
+
+
+| column          | type                    | references     | description     
                                                                                
                                                                                
               |
+|-----------------|-------------------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| classid         | oid                     | pg\_class.oid  | OID of the 
system catalog containing the object.                                           
                                                                                
                    |
+| `objid`         | oid                     | any OID column | OID of the 
object within its system catalog.                                               
                                                                                
                    |
+| `staactionname` | name                    |                | The action 
that was taken on the object.                                                   
                                                                                
                    |
+| `stasysid`      | oid                     |                |               
                                                                                
                                                                                
                 |
+| `stausename`    | name                    |                | The name of 
the role that performed the operation on this object.                           
                                                                                
                   |
+| `stasubtype`    | text                    |                | The type of 
object operated on or the subclass of operation performed.                      
                                                                                
                   |
+| `statime`       | timestamp with timezone |                | The timestamp 
of the operation. This is the same timestamp that is written to the HAWQ server 
log files in case you need to look up more detailed information about the 
operation in the logs. |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stat_operations.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_stat_operations.html.md.erb 
b/markdown/reference/catalog/pg_stat_operations.html.md.erb
new file mode 100644
index 0000000..65833f8
--- /dev/null
+++ b/markdown/reference/catalog/pg_stat_operations.html.md.erb
@@ -0,0 +1,87 @@
+---
+title: pg_stat_operations
+---
+
+The view `pg_stat_operations` shows details about the last operation performed 
on a database object (such as a table, index, view or database) or a global 
object (such as a role).
+
+<a id="topic1__ht141982"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_stat\_operations</span>
+
+
+<table>
+<colgroup>
+<col width="25%" />
+<col width="25%" />
+<col width="10%" />
+<col width="40%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>column</th>
+<th>type</th>
+<th>references</th>
+<th>description</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td><code class="ph codeph">classname</code></td>
+<td>text</td>
+<td> </td>
+<td>The name of the system table in the <code class="ph 
codeph">pg_catalog</code> schema where the record about this object is stored 
(<code class="ph codeph">pg_class</code>=relations, <code class="ph 
codeph">pg_database</code>=databases,
+<p><code class="ph codeph">pg_namespace</code>=schemas,</p>
+<p><code class="ph codeph">pg_authid</code>=roles)</p></td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">objname</code></td>
+<td>name</td>
+<td> </td>
+<td>The name of the object.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">objid</code></td>
+<td>oid</td>
+<td> </td>
+<td>The OID of the object.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">schemaname</code></td>
+<td>name</td>
+<td> </td>
+<td>The name of the schema where the object resides.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">usestatus</code></td>
+<td>text</td>
+<td> </td>
+<td>The status of the role who performed the last operation on the object 
(<code class="ph codeph">CURRENT</code>=a currently active role in the system, 
<code class="ph codeph">DROPPED</code>=a role that no longer exists in the 
system, <code class="ph codeph">CHANGED</code>=a role name that exists in the 
system, but has changed since the last operation was performed).</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">usename</code></td>
+<td>name</td>
+<td> </td>
+<td>The name of the role that performed the operation on this object.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">actionname</code></td>
+<td>name</td>
+<td> </td>
+<td>The action that was taken on the object.</td>
+</tr>
+<tr class="even">
+<td><code class="ph codeph">subtype</code></td>
+<td>text</td>
+<td> </td>
+<td>The type of object operated on or the subclass of operation performed.</td>
+</tr>
+<tr class="odd">
+<td><code class="ph codeph">statime</code></td>
+<td>timestamp with time zone</td>
+<td> </td>
+<td>The timestamp of the operation. This is the same timestamp that is written 
to the HAWQ server log files in case you need to look up more detailed 
information about the operation in the logs.</td>
+</tr>
+</tbody>
+</table>
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stat_partition_operations.html.md.erb
----------------------------------------------------------------------
diff --git 
a/markdown/reference/catalog/pg_stat_partition_operations.html.md.erb 
b/markdown/reference/catalog/pg_stat_partition_operations.html.md.erb
new file mode 100644
index 0000000..2d2fb17
--- /dev/null
+++ b/markdown/reference/catalog/pg_stat_partition_operations.html.md.erb
@@ -0,0 +1,28 @@
+---
+title: pg_stat_partition_operations
+---
+
+The `pg_stat_partition_operations` view shows details about the last operation 
performed on a partitioned table.
+
+<a id="topic1__hu141982"></a>
+<span class="tablecap">Table 1. 
pg\_catalog.pg\_stat\_partition\_operations</span>
+
+| column             | type                     | references | description     
                                                                                
                                                                                
                                                                                
                                       |
+|--------------------|--------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `classname`        | text                     |            | The name of 
the system table in the `pg_catalog` schema where the record about this object 
is stored (always `pg_class` for tables and partitions).                        
                                                                                
                                            |
+| `objname`          | name                     |            | The name of 
the object.                                                                     
                                                                                
                                                                                
                                           |
+| `objid`            | oid                      |            | The OID of the 
object.                                                                         
                                                                                
                                                                                
                                        |
+| `schemaname`       | name                     |            | The name of 
the schema where the object resides.                                            
                                                                                
                                                                                
                                           |
+| `usestatus`        | text                     |            | The status of 
the role who performed the last operation on the object (`CURRENT`=a currently 
active role in the system, `DROPPED`=a role that no longer exists in the 
system, `CHANGED`=a role name that exists in the system, but its definition has 
changed since the last operation was performed). |
+| `usename`          | name                     |            | The name of 
the role that performed the operation on this object.                           
                                                                                
                                                                                
                                           |
+| `actionname`       | name                     |            | The action 
that was taken on the object.                                                   
                                                                                
                                                                                
                                            |
+| `subtype`          | text                     |            | The type of 
object operated on or the subclass of operation performed.                      
                                                                                
                                                                                
                                           |
+| `statime`          | timestamp with time zone |            | The timestamp 
of the operation. This is the same timestamp that is written to the HAWQ server 
log files in case you need to look up more detailed information about the 
operation in the logs.                                                          
                                               |
+| `partitionlevel`   | smallint                 |            | The level of 
this partition in the hierarchy.                                                
                                                                                
                                                                                
                                          |
+| `parenttablename`  | name                     |            | The relation 
name of the parent table one level up from this partition.                      
                                                                                
                                                                                
                                          |
+| `parentschemaname` | name                     |            | The name of 
the schema where the parent table resides.                                      
                                                                                
                                                                                
                                           |
+| `parent_relid`     | oid                      |            | The OID of the 
parent table one level up from this partition.                                  
                                                                                
                                                                                
                                        |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_statistic.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_statistic.html.md.erb 
b/markdown/reference/catalog/pg_statistic.html.md.erb
new file mode 100644
index 0000000..b784da1
--- /dev/null
+++ b/markdown/reference/catalog/pg_statistic.html.md.erb
@@ -0,0 +1,30 @@
+---
+title: pg_statistic
+---
+
+The `pg_statistic` system catalog table stores statistical data about the 
contents of the database. Entries are created by `ANALYZE` and subsequently 
used by the query optimizer. There is one entry for each table column that has 
been analyzed. Note that all the statistical data is inherently approximate, 
even assuming that it is up-to-date.
+
+`pg_statistic` also stores statistical data about the values of index 
expressions. These are described as if they were actual data columns; in 
particular, `starelid` references the index. No entry is made for an ordinary 
non-expression index column, however, since it would be redundant with the 
entry for the underlying table column.
+
+Since different kinds of statistics may be appropriate for different kinds of 
data, `pg_statistic` is designed not to assume very much about what sort of 
statistics it stores. Only extremely general statistics (such as nullness) are 
given dedicated columns in `pg_statistic`. Everything else is stored in slots, 
which are groups of associated columns whose content is identified by a code 
number in one of the slot's columns.
+
+`pg_statistic` should not be readable by the public, since even statistical 
information about a table's contents may be considered sensitive (for example: 
minimum and maximum values of a salary column). `pg_stats` is a publicly 
readable view on `pg_statistic` that only exposes information about those 
tables that are readable by the current user. See 
[pg\_stats](pg_stats.html#topic1), for more information on this view.
+
+<a id="topic1__hv156260"></a>
+<span class="tablecap">Table 1. pg\_catalog.pg\_statistic</span>
+
+| column        | type     | references           | description                
                                                                                
                                                                                
                                                                                
                                                                                
                                               |
+|---------------|----------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `starelid`    | oid      | pg\_class.oid        | The table or index that 
the described column belongs to.                                                
                                                                                
                                                                                
                                                                                
                                                  |
+| `staattnum`   | smallint | pg\_attribute.attnum | The number of the 
described column.                                                               
                                                                                
                                                                                
                                                                                
                                                        |
+| `stanullfrac` | real     |                      | The fraction of the 
column's entries that are null.                                                 
                                                                                
                                                                                
                                                                                
                                                      |
+| `stawidth`    | integer  |                      | The average stored width, 
in bytes, of nonnull entries.                                                   
                                                                                
                                                                                
                                                                                
                                                |
+| `stadistinct` | real     |                      | The number of distinct 
nonnull data values in the column. A value greater than zero is the actual 
number of distinct values. A value less than zero is the negative of a fraction 
of the number of rows in the table (for example, a column in which values 
appear about twice on the average could be represented by `stadistinct` = 
-0.5). A zero value means the number of distinct values is unknown. |
+| `stakindN`    | smallint |                      | A code number indicating 
the kind of statistics stored in the `N`th slot of the `pg_statistic` row.      
                                                                                
                                                                                
                                                                                
                                                 |
+| `staopN`      | oid      | pg\_operator.oid     | An operator used to derive 
the statistics stored in the `N`th slot. For example, a histogram slot would 
show the `<` operator that defines the sort order of the data.                  
                                                                                
                                                                                
                                                  |
+| `stanumbersN` | real\[\] |                      | Numerical statistics of 
the appropriate kind for the `N`th slot, or NULL if the slot kind does not 
involve numerical values.                                                       
                                                                                
                                                                                
                                                       |
+| `stavaluesN`  | anyarray |                      | Column data values of the 
appropriate kind for the `N`th slot, or NULL if the slot kind does not store 
any data values. Each array's element values are actually of the specific 
column's data type, so there is no way to define these columns' type more 
specifically than `anyarray`.                                                   
                                                               |
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/de1e2e07/markdown/reference/catalog/pg_stats.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/catalog/pg_stats.html.md.erb 
b/markdown/reference/catalog/pg_stats.html.md.erb
new file mode 100644
index 0000000..f7cb0f4
--- /dev/null
+++ b/markdown/reference/catalog/pg_stats.html.md.erb
@@ -0,0 +1,27 @@
+---
+title: pg_stats
+---
+
+The `pg_stats` is a publicly readable view on `pg_statistic` that only exposes 
information about those tables that are readable by the current user. The 
`pg_stats` view presents the contents of `pg_statistic` in a friendlier format.
+
+All the statistical data is inherently approximate, even assuming that it is 
up-to-date. The `pg_stats` schema must be extended whenever new slot types are 
defined.
+
+<a id="topic1__table_ckx_t2w_jv"></a>
+<span class="tablecap">Table 1. pg\_stats</span>
+
+| Name                | Type     | References                                  
                               | Description                                    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                        |
+|---------------------|----------|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| schemaname          | name     | 
[pg\_namespace](pg_namespace.html#topic1).nspname. | The name of the schema 
containing the table.                                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                |
+| tablename           | name     | [pg\_class](pg_class.html#topic1).relname   
       | The name of the table.                                                 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                |
+| attname             | name     | 
[pg\_attribute](pg_attribute.html#topic1).attname  | The name of the column 
this row describes.                                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                |
+| null\_frac          | real     |                                            
                                | The fraction of column entries that are null. 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                         |
+| avg\_width          | integer  |                                            
                                | The average storage width in bytes of the 
column's entries, calculated as `avg(pg_column_size(column_name))`.             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                             |
+| n\_distinct         | real     |                                            
                                | A positive number is an estimate of the 
number of distinct values in the column; the number is not expected to vary 
with the number of rows. A negative value is the number of distinct values 
divided by the number of rows, that is, the ratio of rows with distinct values 
for the column, negated. This form is used when the number of distinct values 
increases with the number of rows. A unique column, for example, has an 
`n_distinct` value of -1.0. Columns with an average width greater than 1024 are 
considered unique. |
+| most\_common-vals   | anyarray |                                            
                                | An array containing the most common values in 
the column, or null if no values seem to be more common. If the `n_distinct` 
column is -1, `most_common_vals` is null. The length of the array is the lesser 
of the number of actual distinct column values or the value of the 
`default_statistics_target` configuration parameter. The number of values can 
be overridden for a column using `ALTER TABLE                   table SET 
COLUMN column SET STATISTICS                   N`.                              
                 |
+| most\_common\_freqs | real\[\] |                                            
                                | An array containing the frequencies of the 
values in the `most_common_vals` array. This is the number of occurrences of 
the value divided by the total number of rows. The array is the same length as 
the `most_common_vals` array. It is null if `most_common_vals` is null.         
                                                                                
                                                                                
                                                                                
|
+| histogram\_bounds   | anyarray |                                            
                                | An array of values that divide the column 
values into groups of approximately the same size. A histogram can be defined 
only if there is a `max()` aggregate function for the column. The number of 
groups in the histogram is the same as the `most_common_vals` array size.       
                                                                                
                                                                                
                                                                                
   |
+| correlation         | real     |                                            
                                | HAWQ does not calculate the correlation 
statistic.                                                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               |
+
+
+
+


Reply via email to