[progress Communities] [progress Openedge Abl] Pivotal Greenplum And Hdb (hawq) Hide Child...

  • Thread starter Thread starter greenplum_support
  • Start date Start date
Status
Not open for further replies.
G

greenplum_support

Guest
Enhance both JDBC and ODBC drivers to exclude partitions from the list of tables. JDBC method is "DatabaseMetadata.getTables()" and I'm not sure the method for ODBC. In both Greenplum and HDB, partitions are are child tables so when you query the database to get all tables, the partitions are listed next to non-partitioned tables. Several customers have requested that we hide the partitions and only show the parent table. For reference, pgAdmin III, which uses the native library, has been enhanced to exclude partitions. Here is an excerpt of that code: query += wxT(" FROM pg_class rel\n") wxT(" LEFT OUTER JOIN pg_tablespace ta on ta.oid=rel.reltablespace\n") wxT(" LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0)\n") wxT(" LEFT OUTER JOIN pg_constraint c ON c.conrelid=rel.oid AND c.contype='p'\n"); if (collection->GetConnection()->GetIsGreenplum()) { query += wxT(" LEFT OUTER JOIN gp_distribution_policy gpd ON gpd.localoid=rel.oid\n"); //if (collection->GetConnection()->GetIsGreenplum() && collection->GetConnection()->BackendMinimumVersion(8, 2, 9)) // query += wxT(" LEFT OUTER JOIN pg_partition ON rel.oid = parrelid\n"); } // Greenplum: Eliminate (sub)partitions from the display, only show the parent partitioned table // and eliminate external tables if (collection->GetConnection()->GetIsGreenplum() && collection->GetConnection()->BackendMinimumVersion(8, 2, 9)) query += wxT("AND rel.relstorage <> 'x' AND rel.oid NOT IN (select parchildrelid from pg_partition_rule)"); https://ftp.postgresql.org/pub/pgadmin3/release/v1.14.3/src/pgadmin3-1.14.3.tar.gz It is located in file: pgadmin3-1.14.3/pgadmin/schema/pgTable.cpp

Continue reading...
 
Status
Not open for further replies.
Back
Top