There was a catalog change on how external tables are identified.
The patch allows the code to work with 3.2, 3.3, or 3.4 releases of external tables.
[Chuck McDevitt]
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7940
a7884b65-44f6-0310-8a51-
81a127f17b15
wxT("SELECT c.oid, c.xmin, c.relname, pg_get_userbyid(c.relowner) AS exttableowner, c.relacl AS relacl, description \n")
wxT(" FROM pg_class c\n")
wxT(" LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0)\n")
- wxT(" WHERE (c.relkind = 'x'::char)\n")
+ wxT(" WHERE (c.relkind = 'x' OR (c.relkind = 'r' AND c.relstorage = 'x'))\n")
wxT(" AND relnamespace = ") + collection->GetSchema()->GetOidStr() + wxT("\n")
+ restriction
+ wxT(" ORDER BY relname"));
query += wxT(" WHERE relkind IN ('r','s','t') AND relnamespace = ") + collection->GetSchema()->GetOidStr() + wxT("\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.oid NOT IN (select parchildrelid from pg_partition_rule)");
+ query += wxT("AND rel.relstorage <> 'x' AND rel.oid NOT IN (select parchildrelid from pg_partition_rule)");
query += restriction +
wxT(" ORDER BY relname");