--- /root/files/frmBackup.cpp	2011-02-16 05:14:24.000000000 +0100
+++ /media/sda5/tmp/pgadmin3-git/pgadmin3/pgadmin/frm/frmBackup.cpp	2011-03-01 20:10:08.000000000 +0100
@@ -147,6 +147,7 @@
 		wxTreeItemId currentSchemaNode;
 		while (!objects->Eof())
 		{
+                        checked = false;
 			if (currentSchema != objects->GetVal(wxT("nspname")))
 			{
 				currentSchema = objects->GetVal(wxT("nspname"));
@@ -154,10 +155,6 @@
 				{
 					checked = ((pgSchema *)object)->GetIdentifier() == currentSchema;
 				}
-				else
-				{
-					checked = true;
-				}
 				currentSchemaNode = ctvObjects->AppendItem(db, currentSchema, checked ? 1 : 0);
 			}
 			if (!objects->GetVal(wxT("relname")).IsNull())
@@ -173,10 +170,6 @@
 					{
 						checked = ((pgSchema *)object)->GetIdentifier() == currentSchema;
 					}
-					else
-					{
-						checked = true;
-					}
 				}
 				ctvObjects->AppendItem(currentSchemaNode, objects->GetVal(wxT("relname")), checked ? 1 : 0);
 			}
@@ -431,6 +424,7 @@
 	{
 		if (ctvObjects->IsChecked(schema))
 		{
+                        partialDump = true;
 			partialSchema = false;
 			tmpTables = wxT("");
 			table = ctvObjects->GetFirstChild(schema, tableData);
@@ -452,11 +446,7 @@
 						tmpTables.Append(wxT(" --table \"") + commandLineCleanOption(qtIdent(ctvObjects->GetItemText(table)), true) + wxT("\""));
 						tmpTables.Append(wxT(" --schema \"") + commandLineCleanOption(qtIdent(ctvObjects->GetItemText(schema)), true) + wxT("\""));
 					}
-				}
-				else
-				{
-					partialDump = true;
-					partialSchema = true;
+                                        partialSchema = true;
 				}
 				table = ctvObjects->GetNextChild(schema, tableData);
 			}
@@ -472,7 +462,37 @@
 		}
 		else
 		{
-			partialDump = true;
+                        partialSchema = false;
+			tmpTables = wxT("");
+			table = ctvObjects->GetFirstChild(schema, tableData);
+			while (table.IsOk())
+			{
+				if (ctvObjects->IsChecked(table))
+				{
+					// The syntax changed in 8.2 :-(
+					if (pgAppMinimumVersion(backupExecutable, 8, 2))
+					{
+						tmpTables.Append(wxT(" --table \"") +
+						                 commandLineCleanOption(qtIdent(ctvObjects->GetItemText(schema)), true) +
+						                 wxT(".") +
+						                 commandLineCleanOption(qtIdent(ctvObjects->GetItemText(table)), true) +
+						                 wxT("\""));
+					}
+					else
+					{
+						tmpTables.Append(wxT(" --table \"") + commandLineCleanOption(qtIdent(ctvObjects->GetItemText(table)), true) + wxT("\""));
+						tmpTables.Append(wxT(" --schema \"") + commandLineCleanOption(qtIdent(ctvObjects->GetItemText(schema)), true) + wxT("\""));
+					}
+                                        partialSchema = true;
+                                        partialDump = true;
+				}
+				table = ctvObjects->GetNextChild(schema, tableData);
+			}
+
+			if (partialSchema)
+			{
+				cmdTables += tmpTables;
+			}
 		}
 
 		schema = ctvObjects->GetNextChild(root, schemaData);
