From: guillaume Date: Thu, 12 Jun 2008 19:00:41 +0000 (+0000) Subject: Remove the NOT in database and schema restriction. X-Git-Url: http://git.postgresql.org/gitweb/static/%7B%7Bpguslink%28?a=commitdiff_plain;h=9b595d2ee39a09d2c375283941635bba1b44078f;p=users%2Fquan74%2Fpgadmin-import.git Remove the NOT in database and schema restriction. git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7373 a7884b65-44f6-0310-8a51-81a127f17b15 --- diff --git a/pgadmin/dlg/dlgDatabase.cpp b/pgadmin/dlg/dlgDatabase.cpp index 4fa474982..8c30ecefc 100644 --- a/pgadmin/dlg/dlgDatabase.cpp +++ b/pgadmin/dlg/dlgDatabase.cpp @@ -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); diff --git a/pgadmin/schema/pgDatabase.cpp b/pgadmin/schema/pgDatabase.cpp index 957bb8b4e..9b7048730 100644 --- a/pgadmin/schema/pgDatabase.cpp +++ b/pgadmin/schema/pgDatabase.cpp @@ -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"); } diff --git a/pgadmin/schema/pgSchema.cpp b/pgadmin/schema/pgSchema.cpp index 158a99bf0..6d2dbc702 100644 --- a/pgadmin/schema/pgSchema.cpp +++ b/pgadmin/schema/pgSchema.cpp @@ -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;