Remove the NOT in database and schema restriction.
authorguillaume <guillaume@a7884b65-44f6-0310-8a51-81a127f17b15>
Thu, 12 Jun 2008 19:00:41 +0000 (19:00 +0000)
committerguillaume <guillaume@a7884b65-44f6-0310-8a51-81a127f17b15>
Thu, 12 Jun 2008 19:00:41 +0000 (19:00 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7373 a7884b65-44f6-0310-8a51-81a127f17b15

pgadmin/dlg/dlgDatabase.cpp
pgadmin/schema/pgDatabase.cpp
pgadmin/schema/pgSchema.cpp

index 4fa474982522e9c5d76a521ad1496f5a2b13742a..8c30ecefc26c7ee4ea6b8eb288cea671f25e2296 100644 (file)
@@ -244,7 +244,7 @@ void dlgDatabase::OnChangeRestr(wxCommandEvent &ev)
     {
         wxString sql=wxT("SELECT 1 FROM pg_namespace nsp\n")
                 wxT("  JOIN pg_description des ON des.objoid=nsp.oid\n")
-                wxT(" WHERE nspname NOT IN (") + txtSchemaRestr->GetValue() + wxT(")");
+                wxT(" WHERE nspname IN (") + txtSchemaRestr->GetValue() + wxT(")");
 
         wxLogNull nix;
         wxString result=connection->ExecuteScalar(sql);
index 957bb8b4e3b479d1f48b1ff28412bcb0a9c6b37a..9b7048730c946c45d16815ada28fccf409ef0c78 100644 (file)
@@ -482,9 +482,9 @@ pgObject *pgDatabaseFactory::CreateObjects(pgCollection *collection, ctlTree *br
     if (!collection->GetServer()->GetDbRestriction().IsEmpty())
     {
         if (restr.IsEmpty())
-            restr = wxT(" WHERE datname NOT IN (");
+            restr = wxT(" WHERE datname IN (");
         else
-            restr = wxT("   AND datname NOT IN (");
+            restr = wxT("   AND datname IN (");
 
         restr += collection->GetServer()->GetDbRestriction() + wxT(")\n");
     }
index 158a99bf0d4fefeafe4e13b8c586c2a3b6fb994a..6d2dbc702a6f50a4a29978c191d8d9e0695c722a 100644 (file)
@@ -262,7 +262,7 @@ pgObject *pgSchemaBaseFactory::CreateObjects(pgCollection *collection, ctlTree *
         restr += wxT("  AND nsp.nspparent = 0\n");
 
     if (!collection->GetDatabase()->GetSchemaRestriction().IsEmpty())
-        restr += wxT("  AND nspname NOT IN (") + collection->GetDatabase()->GetSchemaRestriction() + wxT(")");
+        restr += wxT("  AND nspname IN (") + collection->GetDatabase()->GetSchemaRestriction() + wxT(")");
 
        wxString sql;