DUMP_TABLE_PARTITION_KEYS

Dumps the partition keys of all projections for the specified table.

Syntax

DUMP_TABLE_PARTITION_KEYS ( 'table‑name' )

Parameters

table‑name The name of the table.

Privilege

  • SELECT privilege on table
  • USAGE privileges on schema

Examples

The following example creates a simple table called states and partitions the data by state:

=> CREATE TABLE states (year INTEGER NOT NULL, 
       state VARCHAR NOT NULL) 
       PARTITION BY state;
=> CREATE PROJECTION states_p (state, year) AS 
       SELECT * FROM states
       ORDER BY state, year UNSEGMENTED ALL NODES;

Now dump the partition keys of all projections anchored on table states:

=> SELECT DUMP_TABLE_PARTITION_KEYS( 'states' );
      DUMP_TABLE_PARTITION_KEYS                                                               --------------------------------------------------------------------------------------------
 Partition keys on node v_vmart_node0001
  Projection 'states_p'
   Storage [ROS container]
     No of partition keys: 1
     Partition keys: VT
   Storage [ROS container]
     No of partition keys: 1
     Partition keys: PA
   Storage [ROS container]
     No of partition keys: 1
     Partition keys: NY
   Storage [ROS container]
     No of partition keys: 1
     Partition keys: MA

 Partition keys on node v_vmart_node0002
...
(1 row)