Don't show package variables in wrapped packages [Ashesh Vashi]
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 20 May 2009 11:35:22 +0000 (11:35 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 20 May 2009 11:35:22 +0000 (11:35 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7875 a7884b65-44f6-0310-8a51-81a127f17b15

pgadmin/schema/edbPackageVariable.cpp

index 411dcec9066c8736d8fbc1b51a75d2d988487108..48b636cabc0f0943042f46dc972577f57d338f49 100644 (file)
@@ -95,9 +95,17 @@ pgObject *edbPackageVariableFactory::CreateObjects(pgCollection *collection, ctl
 
     if (packageVariables)
     {
+        edbPackage* package = ((edbPackageObjCollection *)collection)->GetPackage();
+
         while (!packageVariables->Eof())
         {
-            packageVariable = new edbPackageVariable(((edbPackageObjCollection *)collection)->GetPackage(), packageVariables->GetVal(wxT("eltname")));
+            // Do not create edbPackageVariable, if package is wrapped
+            if (package->GetBody().Trim(false).StartsWith(wxT("$__EDBwrapped__$")))
+            {
+                packageVariables->MoveNext();
+                continue;
+            }
+            packageVariable = new edbPackageVariable(package, packageVariables->GetVal(wxT("eltname")));
             packageVariable->iSetOid(packageVariables->GetOid(wxT("oid")));
             packageVariable->iSetDataType(packageVariables->GetVal(wxT("datatype")));
             if (packageVariables->GetVal(wxT("visibility")) == wxT("+"))