diff --git a/pgadmin/schema/pgSchema.cpp b/pgadmin/schema/pgSchema.cpp
index 1c2df2d..2b87abc 100644
--- a/pgadmin/schema/pgSchema.cpp
+++ b/pgadmin/schema/pgSchema.cpp
@@ -438,8 +438,13 @@ pgObject *pgSchemaBaseFactory::CreateObjects(pgCollection *collection, ctlTree *
 	restr += wxT("(nspname = 'pgagent' AND EXISTS (SELECT 1 FROM pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1)) OR\n");
 	restr += wxT("(nspname = 'information_schema' AND EXISTS (SELECT 1 FROM pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1)) OR\n");
 	restr += wxT("(nspname LIKE '_%' AND EXISTS (SELECT 1 FROM pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1)) OR\n");
-	restr += wxT("(nspname = 'dbo' AND EXISTS (SELECT 1 FROM pg_class WHERE relname = 'systables' AND relnamespace = nsp.oid LIMIT 1)) OR\n");
-	restr += wxT("(nspname = 'sys' AND EXISTS (SELECT 1 FROM pg_class WHERE relname = 'all_tables' AND relnamespace = nsp.oid LIMIT 1)))\n");
+
+	// We add the below schemas at initdb time itself. So users cannot create
+	// schemas of the same name later. However if DB is started in PostgreSQL
+	// mode, we do not install all other edb-sys.sql objects. So just checking
+	// for presence of schemas with such names should be enough..
+	if (collection->GetConnection()->EdbMinimumVersion(8, 1))
+		restr += wxT("(nspname = 'dbo' OR nspname = 'sys'))\n");
 
 	if (collection->GetConnection()->EdbMinimumVersion(8, 2))
 	{
