Export to excel
Cluster table wait
Add sql resul color
This commit is contained in:
levinsv 2018-12-05 21:25:22 +05:00
parent b0afa4ead2
commit 39b8fbc0ab
11 changed files with 123 additions and 37 deletions

View file

@ -1520,13 +1520,15 @@ pgObject *pgTableFactory::CreateObjects(pgCollection *collection, ctlTree *brows
wxString pg10=wxEmptyString;
if (collection->GetDatabase()->BackendMinimumVersion(10, 1))
{
query += wxT(",pg_catalog.pg_get_partkeydef(rel.oid)\n AS partkeydef");
query += wxT(",pg_get_expr(rel.relpartbound, rel.oid)\n AS partexp");
pg10=wxT("pg_get_expr(rel.relpartbound, rel.oid) is null and");
query += wxT(",case when lk.relation=rel.oid then null else pg_get_partkeydef(rel.oid) end \n AS partkeydef");
query += wxT(",case when lk.relation=rel.oid then null else pg_get_expr(rel.relpartbound, rel.oid) end \n AS partexp");
//pg10=wxT("pg_get_expr(rel.relpartbound, rel.oid) is null and");
pg10=wxT("rel.relpartbound is null and");
//query += wxT(",\n(SELECT array_agg(provider) FROM pg_seclabels sl2 WHERE sl2.objoid=rel.oid AND sl2.objsubid=0) AS providers");
}
//select relation from pg_locks where locktype='relation' and granted=true and mode='AccessExclusiveLock'
query += wxT(" FROM pg_class rel\n")
wxT(" LEFT JOIN pg_locks lk ON locktype='relation' and granted=true and mode='AccessExclusiveLock' and relation=rel.oid\n")
wxT(" LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace\n")
wxT(" LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)\n")
wxT(" LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'\n");