Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the display of extension owner names.

  • Loading branch information...
commit 9114760402a33927f22880ce3bebb66f0b6d5512 1 parent 38f5097
@dpage dpage authored
Showing with 4 additions and 1 deletion.
  1. +1 −0  CHANGELOG
  2. +3 −1 pgadmin/schema/pgExtension.cpp
View
1  CHANGELOG
@@ -37,6 +37,7 @@ Changes
Date Dev Ver Change details
---------- --- ------ --------------
+2013-02-25 DP 1.16.2 Fix the display of extension owner names.
2013-02-23 GL 1.18.0 Add a title to the backup and restore windows. Per
request from Bastiaan Olij.
2013-02-22 DP 1.16.2 Fix a bug that could cause a NOTICE to be displayed
View
4 pgadmin/schema/pgExtension.cpp
@@ -120,6 +120,7 @@ void pgExtension::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *p
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
+ properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("Schema"), GetSchemaStr());
properties->AppendYesNoItem(_("Relocatable?"), GetIsRelocatable());
properties->AppendItem(_("Version"), GetVersion());
@@ -146,7 +147,7 @@ pgObject *pgExtensionFactory::CreateObjects(pgCollection *collection, ctlTree *b
wxString sql;
pgExtension *extension = 0;
- sql = wxT("select x.oid, x.extname, n.nspname, x.extrelocatable, x.extversion, e.comment")
+ sql = wxT("select x.oid, pg_get_userbyid(extowner) AS owner, x.extname, n.nspname, x.extrelocatable, x.extversion, e.comment")
wxT(" FROM pg_extension x\n")
wxT(" JOIN pg_namespace n on x.extnamespace=n.oid\n")
wxT(" join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name\n")
@@ -162,6 +163,7 @@ pgObject *pgExtensionFactory::CreateObjects(pgCollection *collection, ctlTree *b
extension = new pgExtension(extensions->GetVal(wxT("extname")));
extension->iSetDatabase(collection->GetDatabase());
extension->iSetOid(extensions->GetOid(wxT("oid")));
+ extension->iSetOwner(extensions->GetVal(wxT("owner")));
extension->iSetSchemaStr(extensions->GetVal(wxT("nspname")));
extension->iSetIsRelocatable(extensions->GetBool(wxT("extrelocatable")));
extension->iSetVersion(extensions->GetVal(wxT("extversion")));
Please sign in to comment.
Something went wrong with that request. Please try again.