>From 1ee0b97ab1b5c90f1cc8dc0e6a7834c3fde64835 Mon Sep 17 00:00:00 2001 From: olshevskiy87 Date: Mon, 9 Mar 2015 01:07:12 +0400 Subject: [PATCH] display indexes for materialized views in object browser and their definition in sql pane --- pgadmin/schema/pgView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pgadmin/schema/pgView.cpp b/pgadmin/schema/pgView.cpp index 6fca88a..205aa31 100644 --- a/pgadmin/schema/pgView.cpp +++ b/pgadmin/schema/pgView.cpp @@ -16,6 +16,7 @@ #include "pgAdmin3.h" #include "utils/misc.h" #include "schema/pgColumn.h" +#include "schema/pgIndexConstraint.h" #include "schema/pgView.h" #include "frm/frmMain.h" #include "frm/frmHint.h" @@ -112,6 +113,9 @@ wxMenu *pgView::GetNewMenu() { ruleFactory.AppendMenu(menu); triggerFactory.AppendMenu(menu); + if (GetMaterializedView()) { + indexFactory.AppendMenu(menu); + } } return menu; } @@ -366,6 +370,9 @@ wxString pgView::GetSql(ctlTree *browser) sql += GetSeqLabelsSql(); } + if (IsMatViewFlag) { + AppendStuff(sql, browser, indexFactory); + } AppendStuff(sql, browser, ruleFactory); AppendStuff(sql, browser, triggerFactory); } @@ -471,6 +478,9 @@ void pgView::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper browser->AppendCollection(this, columnFactory); + if (GetMaterializedView()) + browser->AppendCollection(this, indexFactory); + pgCollection *collection = browser->AppendCollection(this, ruleFactory); collection->iSetOid(GetOid()); collection->ShowTreeDetail(browser); -- 1.8.3.msysgit.0