Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Goal

The distribution policy on any Pivotal Greenplum Database can be easily found with "\d " , or can be retrieved from gp_distribution_policy table and matching with pg_attributes, but there is no direct SQL query that is available which can be queried to obtain distribution policy on each table from catalog tables.

In this document we will create a function that can help you create a simple SQL to retrieve information of the tables distribution policy.

Execution

  • Create the ddl on the database
psql -d <database-name> -f create_ddl.sql
  • Execute the query to extract the information
psql -d <database-name> -f distribution-policy.sql