diff --git a/pgadmin/dlg/dlgAggregate.cpp b/pgadmin/dlg/dlgAggregate.cpp
index 59c94b8..f810d33 100644
--- a/pgadmin/dlg/dlgAggregate.cpp
+++ b/pgadmin/dlg/dlgAggregate.cpp
@@ -89,6 +89,8 @@ int dlgAggregate::Go(bool modal)
 	if (aggregate)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
+
 		for (unsigned int x = 0; x < aggregate->GetInputTypesArray().Count(); x++ )
 		{
 			lstInputTypes->InsertItem(x, aggregate->GetInputTypesArray()[x]);
@@ -162,6 +164,7 @@ void dlgAggregate::CheckChange()
 	if (aggregate)
 	{
 		EnableOK(GetName() != aggregate->GetName()
+		         || cbSchema->GetValue() != aggregate->GetSchema()->GetName()
 		         || txtComment->GetValue() != aggregate->GetComment()
 		         || cbOwner->GetValue() != aggregate->GetOwner());
 	}
@@ -305,23 +308,28 @@ wxString dlgAggregate::GetSql()
 	if (aggregate)
 	{
 		// edit mode
+		name = GetName();
+
 		AppendNameChange(sql, wxT("AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(aggregate->GetName()) +
 		                 wxT("(") + GetInputTypesList() + wxT(")"));
 		AppendOwnerChange(sql, wxT("AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(GetName()) +
 		                  wxT("(") + GetInputTypesList() + wxT(")"));
+		AppendSchemaChange(sql,  wxT("AGGREGATE ") + qtIdent(aggregate->GetSchema()->GetName()) + wxT(".") + qtIdent(name) +
+		                   wxT("(") + GetInputTypesList() + wxT(")"));
 	}
 	else
 	{
 		// create mode
-		name = GetName();
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		if (connection->BackendMinimumVersion(8, 2))
 		{
-			sql = wxT("CREATE AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(name)
+			sql = wxT("CREATE AGGREGATE ") + name
 			      + wxT("(") + GetInputTypesList() + wxT(") (\n");
 		}
 		else
 		{
-			sql = wxT("CREATE AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(name)
+			sql = wxT("CREATE AGGREGATE ") + name
 			      + wxT("(\n   BASETYPE=") + GetInputTypesList() + wxT(",\n");
 		}
 
@@ -356,7 +364,7 @@ wxString dlgAggregate::GetSql()
 		AppendOwnerNew(sql, wxT("AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(name) +
 		               wxT("(") + GetInputTypesList() + wxT(")"));
 	}
-	AppendComment(sql, wxT("AGGREGATE ") + schema->GetQuotedPrefix() + qtIdent(GetName())
+	AppendComment(sql, wxT("AGGREGATE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName())
 	              + wxT("(") + GetInputTypesList()
 	              + wxT(")"), aggregate);
 
diff --git a/pgadmin/dlg/dlgCollation.cpp b/pgadmin/dlg/dlgCollation.cpp
index 52b77f5..298be27 100644
--- a/pgadmin/dlg/dlgCollation.cpp
+++ b/pgadmin/dlg/dlgCollation.cpp
@@ -116,6 +116,7 @@ void dlgCollation::CheckChange()
 	if (collation)
 	{
 		EnableOK(txtName->GetValue() != collation->GetName()
+		         || cbSchema->GetValue() != collation->GetSchema()->GetName()
 		         || cbOwner->GetValue() != collation->GetOwner()
 		         || txtComment->GetValue() != collation->GetComment());
 	}
@@ -141,19 +142,23 @@ void dlgCollation::CheckChange()
 
 wxString dlgCollation::GetSql()
 {
-	wxString sql, name;
-	name = GetName();
+	wxString sql;
+	wxString name;
 
 	if (collation)
 	{
 		// edit mode
+		name = schema->GetQuotedPrefix() + qtIdent(GetName());;
 		AppendNameChange(sql, wxT("COLLATION ") + collation->GetQuotedFullIdentifier());
-		AppendOwnerChange(sql, wxT("COLLATION ") + collation->GetQuotedFullIdentifier());
+		AppendOwnerChange(sql, wxT("COLLATION ") + name);
+		AppendSchemaChange(sql, wxT("COLLATION ") + name);
 	}
 	else
 	{
 		// create mode
-		sql = wxT("CREATE COLLATION ") + schema->GetQuotedPrefix() + qtIdent(name);
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
+		sql = wxT("CREATE COLLATION ") + name;
 		if (cbCollation->GetValue().IsEmpty())
 		{
 			if (txtLocale->GetValue().IsEmpty())
@@ -169,14 +174,13 @@ wxString dlgCollation::GetSql()
 		}
 		else
 		{
-			sql = wxT("CREATE COLLATION ") + schema->GetQuotedPrefix() + qtIdent(name)
-			      + wxT(" FROM ") + cbCollation->GetValue();
+			sql += wxT(" FROM ") + cbCollation->GetValue();
 		}
 		sql += wxT(";\n");
 
 		AppendOwnerNew(sql, wxT("COLLATION ") + schema->GetQuotedPrefix() + qtIdent(name));
 	}
-	AppendComment(sql, wxT("COLLATION"), schema, collation);
+	AppendComment(sql, wxT("COLLATION ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), collation);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgConversion.cpp b/pgadmin/dlg/dlgConversion.cpp
index 2336f2e..4c36976 100644
--- a/pgadmin/dlg/dlgConversion.cpp
+++ b/pgadmin/dlg/dlgConversion.cpp
@@ -72,6 +72,7 @@ int dlgConversion::Go(bool modal)
 	if (conversion)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
 		cbSourceEncoding->Append(conversion->GetForEncoding());
 		cbSourceEncoding->SetSelection(0);
 		cbTargetEncoding->Append(conversion->GetToEncoding());
@@ -91,6 +92,7 @@ int dlgConversion::Go(bool modal)
 	else
 	{
 		// create mode
+
 		wxString qry =
 		    wxT("SELECT proname, nspname\n")
 		    wxT("  FROM pg_proc p\n")
@@ -150,6 +152,7 @@ void dlgConversion::CheckChange()
 	if (conversion)
 	{
 		EnableOK(txtName->GetValue() != conversion->GetName()
+		         || cbSchema->GetValue() != conversion->GetSchema()->GetName()
 		         || txtComment->GetValue() != conversion->GetComment()
 		         || cbOwner->GetValue() != conversion->GetOwner());
 	}
@@ -171,22 +174,32 @@ void dlgConversion::CheckChange()
 wxString dlgConversion::GetSql()
 {
 	wxString sql;
-	wxString name = GetName();
+	wxString name;
 
 	if (conversion)
 	{
 		// edit mode
+		name = GetName();
 
 		AppendNameChange(sql);
 		AppendOwnerChange(sql, wxT("CONVERSION ") + schema->GetQuotedPrefix() + qtIdent(name));
+
+		if (cbSchema->GetValue() != conversion->GetSchema()->GetName())
+		{
+			sql += wxT("ALTER CONVERSION ") + qtIdent(conversion->GetSchema()->GetName()) + wxT(".") + qtIdent(name)
+			       +  wxT("\n  SET SCHEMA ") + qtIdent(cbSchema->GetValue())
+			       +  wxT(";\n");
+		}
 	}
 	else
 	{
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		// create mode
 		sql = wxT("CREATE ");
 		if (chkDefault->GetValue())
 			sql += wxT("DEFAULT ");
-		sql += wxT("CONVERSION ") + schema->GetQuotedPrefix() + qtIdent(name)
+		sql += wxT("CONVERSION ") + name
 		       + wxT("\n   FOR ") + qtDbString(cbSourceEncoding->GetValue())
 		       + wxT(" TO ") + qtDbString(cbTargetEncoding->GetValue())
 		       + wxT("\n   FROM ") + functions.Item(cbFunction->GetCurrentSelection())
@@ -194,7 +207,7 @@ wxString dlgConversion::GetSql()
 
 		AppendOwnerNew(sql, wxT("CONVERSION ") + schema->GetQuotedPrefix() + qtIdent(name));
 	}
-	AppendComment(sql, wxT("CONVERSION"), schema, conversion);
+	AppendComment(sql, wxT("CONVERSION ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), conversion);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgDomain.cpp b/pgadmin/dlg/dlgDomain.cpp
index 94150a1..a7e0896 100644
--- a/pgadmin/dlg/dlgDomain.cpp
+++ b/pgadmin/dlg/dlgDomain.cpp
@@ -68,6 +68,7 @@ int dlgDomain::Go(bool modal)
 	if (domain)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
 		cbDatatype->Append(domain->GetBasetype());
 		AddType(wxT(" "), 0, domain->GetBasetype());
 		cbDatatype->SetSelection(0);
@@ -147,6 +148,7 @@ void dlgDomain::CheckChange()
 	if (domain)
 	{
 		EnableOK(txtDefault->GetValue() != domain->GetDefault()
+		         || cbSchema->GetValue() != domain->GetSchema()->GetName()
 		         || chkNotNull->GetValue() != domain->GetNotNull()
 		         || cbOwner->GetValue() != domain->GetOwner()
 		         || txtComment->GetValue() != domain->GetComment());
@@ -190,11 +192,12 @@ void dlgDomain::OnSelChangeTyp(wxCommandEvent &ev)
 wxString dlgDomain::GetSql()
 {
 	wxString sql, name;
-	name = GetName();
 
 	if (domain)
 	{
 		// edit mode
+		name = GetName();
+
 		if (chkNotNull->GetValue() != domain->GetNotNull())
 		{
 			sql += wxT("ALTER DOMAIN ") + domain->GetQuotedFullIdentifier();
@@ -212,11 +215,13 @@ wxString dlgDomain::GetSql()
 				sql += wxT("\n  SET DEFAULT ") + txtDefault->GetValue() + wxT(";\n");
 		}
 		AppendOwnerChange(sql, wxT("DOMAIN ") + domain->GetQuotedFullIdentifier());
+		AppendSchemaChange(sql, wxT("DOMAIN ") + domain->GetQuotedFullIdentifier());
 	}
 	else
 	{
 		// create mode
-		sql = wxT("CREATE DOMAIN ") + schema->GetQuotedPrefix() + qtIdent(name)
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+		sql = wxT("CREATE DOMAIN ") + name
 		      + wxT("\n   AS ") + GetQuotedTypename(cbDatatype->GetGuessedSelection());
 
 		if (!cbCollation->GetValue().IsEmpty() && cbCollation->GetValue() != wxT("pg_catalog.\"default\""))
@@ -229,9 +234,9 @@ wxString dlgDomain::GetSql()
 			sql += wxT("\n   CHECK (") + txtCheck->GetValue() + wxT(")");
 		sql += wxT(";\n");
 
-		AppendOwnerNew(sql, wxT("DOMAIN ") + schema->GetQuotedPrefix() + qtIdent(name));
+		AppendOwnerNew(sql, wxT("DOMAIN ") + name);
 	}
-	AppendComment(sql, wxT("DOMAIN"), schema, domain);
+	AppendComment(sql, wxT("DOMAIN ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), domain);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgExtension.cpp b/pgadmin/dlg/dlgExtension.cpp
index 3beeb0f..f02d0ec 100644
--- a/pgadmin/dlg/dlgExtension.cpp
+++ b/pgadmin/dlg/dlgExtension.cpp
@@ -23,7 +23,6 @@
 
 // pointer to controls
 #define cbName          CTRL_COMBOBOX("cbName")
-#define cbSchema        CTRL_COMBOBOX("cbSchema")
 #define cbVersion       CTRL_COMBOBOX("cbVersion")
 
 
@@ -36,8 +35,6 @@ dlgProperty *pgExtensionFactory::CreateDialog(frmMain *frame, pgObject *node, pg
 BEGIN_EVENT_TABLE(dlgExtension, dlgProperty)
 	EVT_TEXT(XRCID("cbName"),                       dlgExtension::OnChangeName)
 	EVT_COMBOBOX(XRCID("cbName"),                   dlgExtension::OnChangeName)
-	EVT_TEXT(XRCID("cbSchema"),                     dlgProperty::OnChange)
-	EVT_COMBOBOX(XRCID("cbSchema"),                 dlgProperty::OnChange)
 	EVT_TEXT(XRCID("cbVersion"),                    dlgProperty::OnChange)
 	EVT_COMBOBOX(XRCID("cbVersion"),                dlgProperty::OnChange)
 END_EVENT_TABLE();
@@ -60,16 +57,6 @@ int dlgExtension::Go(bool modal)
 {
 	txtComment->Disable();
 
-	// add all schemas
-	cbSchema->Append(wxEmptyString);
-	pgSetIterator schemas(connection,
-	                      wxT("SELECT nspname FROM pg_namespace\n")
-	                      wxT(" ORDER BY nspname"));
-
-	while (schemas.RowsLeft())
-		cbSchema->Append(schemas.GetVal(wxT("nspname")));
-	cbSchema->SetSelection(0);
-
 	if (extension)
 	{
 		// edit mode
@@ -77,7 +64,6 @@ int dlgExtension::Go(bool modal)
 		cbName->SetSelection(0);
 		cbName->Disable();
 
-		cbSchema->SetValue(extension->GetSchemaStr());
 		cbSchema->Enable(extension->GetIsRelocatable());
 
 		// add all versions
@@ -159,7 +145,7 @@ void dlgExtension::CheckChange()
 	bool didChange = true;
 	if (extension)
 	{
-		didChange = cbSchema->GetValue() != extension->GetSchemaStr()
+		didChange = cbSchema->GetValue() != extension->GetSchema()->GetName()
 		            || cbVersion->GetValue() != extension->GetVersion();
 		EnableOK(didChange);
 	}
@@ -180,7 +166,7 @@ wxString dlgExtension::GetSql()
 	if (extension)
 	{
 		// edit mode
-		if (cbSchema->GetValue() != extension->GetSchemaStr())
+		if (cbSchema->GetValue() != extension->GetSchema()->GetName())
 			sql += wxT("ALTER EXTENSION ") + qtIdent(extension->GetName())
 			       +  wxT("\n  SET SCHEMA ") + qtIdent(cbSchema->GetValue()) + wxT(";\n");
 		if (cbVersion->GetValue() != extension->GetVersion())
diff --git a/pgadmin/dlg/dlgForeignTable.cpp b/pgadmin/dlg/dlgForeignTable.cpp
index a7f96e2..7b1afb4 100644
--- a/pgadmin/dlg/dlgForeignTable.cpp
+++ b/pgadmin/dlg/dlgForeignTable.cpp
@@ -113,6 +113,8 @@ int dlgForeignTable::Go(bool modal)
 	if (foreigntable)
 	{
 		// Edit Mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
+
 		cbForeignServer->SetValue(foreigntable->GetForeignServer());
 		cbForeignServer->Disable();
 
@@ -227,6 +229,7 @@ void dlgForeignTable::CheckChange()
 	if (foreigntable)
 	{
 		EnableOK(txtComment->GetValue() != foreigntable->GetComment()
+		         || cbSchema->GetValue() != foreigntable->GetSchema()->GetName()
 		         || cbOwner->GetValue() != foreigntable->GetOwner()
 		         || GetSqlForTypes() != wxEmptyString
 		         || GetSql().Length() > 0);
@@ -498,26 +501,34 @@ wxString dlgForeignTable::GetOptionsSql()
 
 wxString dlgForeignTable::GetSql()
 {
-	wxString sql, direction;
+	wxString sql;
+	wxString direction;
+	wxString name;
 
 	if (foreigntable)
 	{
 		// Edit Mode
-		AppendOwnerChange(sql, wxT("FOREIGN TABLE ") + foreigntable->GetQuotedFullIdentifier());
+		name = qtIdent(foreigntable->GetSchema()->GetName()) + wxT(".") + qtIdent(GetName());
+
+		AppendNameChange(sql, wxT("FOREIGN TABLE ") + foreigntable->GetQuotedFullIdentifier());
+		AppendOwnerChange(sql, wxT("FOREIGN TABLE ") + name);
 
 		sql += GetSqlForTypes();
 
 		wxString sqloptions = GetOptionsSql();
 		if (sqloptions.Length() > 0)
 		{
-			sql += wxT("ALTER FOREIGN TABLE ") + foreigntable->GetQuotedFullIdentifier()
+			sql += wxT("ALTER FOREIGN TABLE ") + name
 			       + wxT("\n  OPTIONS (") + sqloptions + wxT(");\n");
 		}
+		AppendSchemaChange(sql, wxT("FOREIGN TABLE ") + name);
 	}
 	else
 	{
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		// Create Mode
-		sql = wxT("CREATE FOREIGN TABLE ") + schema->GetQuotedPrefix() + qtIdent(GetName());
+		sql = wxT("CREATE FOREIGN TABLE " + name);
 		sql += wxT(" (");
 
 		int i;
@@ -548,8 +559,7 @@ wxString dlgForeignTable::GetSql()
 
 		sql += wxT(";\n");
 	}
-	AppendComment(sql, wxT("FOREIGN TABLE"), schema, foreigntable);
-
+	AppendComment(sql, wxT("FOREIGN TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), foreigntable);
 	return sql;
 }
 
diff --git a/pgadmin/dlg/dlgFunction.cpp b/pgadmin/dlg/dlgFunction.cpp
index 274d7cd..1b112e4 100644
--- a/pgadmin/dlg/dlgFunction.cpp
+++ b/pgadmin/dlg/dlgFunction.cpp
@@ -171,6 +171,7 @@ int dlgFunction::Go(bool modal)
 
 	if (function)
 	{
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
 		rdbIn->Disable();
 		rdbOut->Disable();
 		rdbInOut->Disable();
@@ -833,7 +834,7 @@ wxString dlgFunction::GetArgs(const bool withNames, const bool inOnly)
 wxString dlgFunction::GetSql()
 {
 	wxString sql;
-	wxString name = GetName();
+	wxString name;
 	wxString objType;
 	if (isProcedure)
 		objType = wxT("PROCEDURE ");
@@ -860,23 +861,23 @@ wxString dlgFunction::GetSql()
 
 	if (function)
 	{
+		name = GetName();
 		// edit mode
 		if (name != function->GetName())
 		{
 			if (!isProcedure)
-				sql = wxT("ALTER FUNCTION ") + function->GetQuotedFullIdentifier()
-				      + wxT("(") + function->GetArgSigList() + wxT(")")
-				      + wxT("\n  RENAME TO ") + qtIdent(name) + wxT(";\n");
+				AppendNameChange(sql, wxT("FUNCTION ") + function->GetQuotedFullIdentifier()
+				                 + wxT("(") + function->GetArgSigList() + wxT(")"));
 			else
-				sql = wxT("ALTER PROCEDURE ") + function->GetQuotedFullIdentifier()
-				      + wxT("\n  RENAME TO ") + qtIdent(name) + wxT(";\n");
+				AppendNameChange(sql, wxT("FUNCTION ") + function->GetQuotedFullIdentifier());
 		}
-
 		if (didChange)
 			sql += wxT("CREATE OR REPLACE ") + objType;
 	}
 	else
 	{
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		// create mode
 		sql = wxT("CREATE " ) + objType;
 	}
@@ -959,10 +960,8 @@ wxString dlgFunction::GetSql()
 
 	if (function)
 	{
-		if (cbOwner->GetValue() != function->GetOwner())
-			sql += wxT("ALTER FUNCTION ") + name
-			       +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue())
-			       + wxT(";\n");
+		AppendOwnerChange(sql, wxT("FUNCTION ") + name);
+		AppendSchemaChange(sql, wxT("FUNCTION ") + name);
 	}
 	else
 	{
@@ -1036,7 +1035,7 @@ wxString dlgFunction::GetSql()
 	if (isProcedure)
 		AppendComment(sql, wxT("PROCEDURE ") + schema->GetQuotedPrefix() + qtIdent(GetName()), function);
 	else
-		AppendComment(sql, wxT("FUNCTION ") + name, function);
+		AppendComment(sql, wxT("FUNCTION ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), function);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgOperator.cpp b/pgadmin/dlg/dlgOperator.cpp
index b3a9eeb..eebe5b5 100644
--- a/pgadmin/dlg/dlgOperator.cpp
+++ b/pgadmin/dlg/dlgOperator.cpp
@@ -93,6 +93,8 @@ int dlgOperator::Go(bool modal)
 	if (oper)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
+
 		cbLeftType->Append(oper->GetLeftType());
 		cbLeftType->SetSelection(0);
 
@@ -197,6 +199,7 @@ void dlgOperator::CheckChange()
 	if (oper)
 	{
 		EnableOK(txtComment->GetValue() != oper->GetComment()
+		         || cbSchema->GetValue() != oper->GetSchema()->GetName()
 		         || cbOwner->GetValue() != oper->GetOwner());
 	}
 	else
@@ -399,15 +402,15 @@ wxString dlgOperator::GetSql()
 		name = oper->GetQuotedFullIdentifier()
 		       + wxT("(") + oper->GetOperands() + wxT(")");
 
-		if (cbOwner->GetValue() != oper->GetOwner())
-			sql += wxT("ALTER OPERATOR ") + name
-			       +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue())
-			       +  wxT(";\n");
+		AppendOwnerChange(sql, wxT("OPERATOR ") + name);
+		AppendSchemaChange(sql, wxT("OPERATOR ") + name);
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + GetName()
+		       + wxT("(") + oper->GetOperands() + wxT(")");
 	}
 	else
 	{
 		// create mode
-		name = schema->GetQuotedPrefix() + GetName() + wxT("(");
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + GetName() + wxT("(");
 		if (cbLeftType->GetGuessedSelection() > 0)
 			name += GetQuotedTypename(cbLeftType->GetGuessedSelection());
 		else
@@ -420,7 +423,7 @@ wxString dlgOperator::GetSql()
 		name += wxT(")");
 
 
-		sql = wxT("CREATE OPERATOR ") + schema->GetQuotedPrefix() + GetName()
+		sql = wxT("CREATE OPERATOR ") + qtIdent(cbSchema->GetValue()) + wxT(".") + GetName()
 		      + wxT("(\n   PROCEDURE=") + procedures.Item(cbProcedure->GetGuessedSelection());
 
 		AppendIfFilled(sql, wxT(",\n   LEFTARG="), GetQuotedTypename(cbLeftType->GetGuessedSelection()));
@@ -458,7 +461,7 @@ wxString dlgOperator::GetSql()
 			}
 		}
 		sql += wxT(");\n");
-
+		AppendOwnerChange(sql, wxT("OPERATOR ") + name);
 	}
 	AppendComment(sql, wxT("OPERATOR ") + name, oper);
 
diff --git a/pgadmin/dlg/dlgProperty.cpp b/pgadmin/dlg/dlgProperty.cpp
index aa76a54..cecbf94 100644
--- a/pgadmin/dlg/dlgProperty.cpp
+++ b/pgadmin/dlg/dlgProperty.cpp
@@ -89,6 +89,8 @@ BEGIN_EVENT_TABLE(dlgProperty, DialogWithHelp)
 	EVT_TEXT(XRCID("txtName"),                      dlgProperty::OnChange)
 	EVT_TEXT(XRCID("cbOwner"),                      dlgProperty::OnChangeOwner)
 	EVT_COMBOBOX(XRCID("cbOwner"),                  dlgProperty::OnChange)
+	EVT_TEXT(XRCID("cbSchema"),                     dlgProperty::OnChange)
+	EVT_COMBOBOX(XRCID("cbSchema"),                 dlgProperty::OnChange)
 	EVT_TEXT(XRCID("txtComment"),                   dlgProperty::OnChange)
 
 	EVT_CHECKBOX(CTRLID_CHKSQLTEXTFIELD,            dlgProperty::OnChangeReadOnly)
@@ -137,6 +139,7 @@ dlgProperty::dlgProperty(pgaFactory *f, frmMain *frame, const wxString &resName)
 	txtOid = CTRL_TEXT("txtOID");
 	txtComment = CTRL_TEXT("txtComment");
 	cbOwner = CTRL_COMBOBOX2("cbOwner");
+	cbSchema = CTRL_COMBOBOX2("cbSchema");
 	cbClusterSet = CTRL_COMBOBOX1("cbClusterSet");
 
 	wxString db = wxT("Database");
@@ -239,6 +242,8 @@ int dlgProperty::Go(bool modal)
 {
 	wxASSERT(factory != 0);
 
+	pgObject *obj = mainForm->GetBrowser()->GetObject(mainForm->GetBrowser()->GetSelection());
+
 	// restore previous position and size, if applicable
 	wxString prop = wxT("Properties/") + wxString(factory->GetTypeName());
 
@@ -256,6 +261,7 @@ int dlgProperty::Go(bool modal)
 	Move(pos);
 
 	ctlComboBoxFix *cbowner = (ctlComboBoxFix *)cbOwner;
+	ctlComboBoxFix *cbschema = (ctlComboBoxFix *)cbSchema;
 
 	if (cbClusterSet)
 	{
@@ -301,6 +307,9 @@ int dlgProperty::Go(bool modal)
 	if (txtOid)
 		txtOid->Disable();
 
+	if (cbschema && !cbschema->GetCount())
+		AddSchemas(cbschema);
+
 	if (GetObject())
 	{
 		if (txtName)
@@ -309,6 +318,8 @@ int dlgProperty::Go(bool modal)
 			txtOid->SetValue(NumToStr((unsigned long)GetObject()->GetOid()));
 		if (cbOwner)
 			cbOwner->SetValue(GetObject()->GetOwner());
+		if (cbSchema)
+			cbSchema->SetValue(GetObject()->GetSchema()->GetName());
 		if (txtComment)
 			txtComment->SetValue(GetObject()->GetComment());
 
@@ -329,6 +340,11 @@ int dlgProperty::Go(bool modal)
 			btn->Hide();
 		if (factory)
 			SetTitle(wxGetTranslation(factory->GetNewString()));
+		if (cbSchema)
+			if (obj->GetMetaType() == PGM_SCHEMA)
+				cbSchema->SetValue(obj->GetName());
+			else
+				cbSchema->SetValue(obj->GetSchema()->GetName());
 	}
 	if (statusBar)
 		statusBar->SetStatusText(wxEmptyString);
@@ -439,7 +455,7 @@ void dlgProperty::AppendNameChange(wxString &sql, const wxString &objName)
 
 void dlgProperty::AppendOwnerChange(wxString &sql, const wxString &objName)
 {
-	if (GetObject()->GetOwner() != cbOwner->GetValue())
+	if (!GetObject() || GetObject()->GetOwner() != cbOwner->GetValue())
 	{
 		sql += wxT("ALTER ") + objName
 		       +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue())
@@ -457,13 +473,35 @@ void dlgProperty::AppendOwnerNew(wxString &sql, const wxString &objName)
 }
 
 
+void dlgProperty::AppendSchemaChange(wxString &sql, const wxString &objName)
+{
+	wxString currentschema;
+
+	if (GetObject()->GetMetaType() == PGM_SCHEMA)
+	{
+		currentschema = GetObject()->GetName();
+	}
+	else
+	{
+		currentschema = GetObject()->GetSchema()->GetName();
+	}
+
+	if (currentschema != cbSchema->GetValue())
+	{
+		sql += wxT("ALTER ") + objName
+		    +  wxT("\n  SET SCHEMA ") + qtIdent(cbSchema->GetValue())
+		    +  wxT(";\n");
+	}
+}
+
+
 void dlgProperty::AppendComment(wxString &sql, const wxString &objName, pgObject *obj)
 {
 	wxString comment = txtComment->GetValue();
 	if ((!obj && !comment.IsEmpty()) || (obj && obj->GetComment() != comment))
 	{
 		sql += wxT("COMMENT ON ") + objName
-		       + wxT(" IS ") + qtDbString(comment) + wxT(";\n");
+		       + wxT("\n  IS ") + qtDbString(comment) + wxT(";\n");
 	}
 }
 
@@ -476,7 +514,7 @@ void dlgProperty::AppendComment(wxString &sql, const wxString &objType, pgSchema
 		sql += wxT("COMMENT ON ") + objType + wxT(" ");
 		if (schema)
 			sql += schema->GetQuotedPrefix();
-		sql += qtIdent(GetName()) + wxT(" IS ") + qtDbString(comment) + wxT(";\n");
+		sql += qtIdent(GetName()) + wxT("\n  IS ") + qtDbString(comment) + wxT(";\n");
 	}
 }
 
@@ -551,6 +589,16 @@ void dlgProperty::AddGroups(ctlComboBoxFix *combo)
 }
 
 
+void dlgProperty::AddSchemas(ctlComboBoxFix *combo)
+{
+	if (connection->BackendMinimumVersion(8,1))
+	{
+		FillCombobox(wxT("SELECT nspname FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema' ORDER BY nspname"),
+		            combo);
+	}
+}
+
+
 void dlgProperty::PrepareTablespace(ctlComboBoxFix *cb, const OID current)
 {
 	wxASSERT(cb != 0);
@@ -1084,6 +1132,8 @@ void dlgProperty::InitDialog(frmMain *frame, pgObject *node)
 			break;
 
 		default:
+			// we want to do this as objects can change schema
+			owneritem = node->GetId();
 			break;
 	}
 }
diff --git a/pgadmin/dlg/dlgSequence.cpp b/pgadmin/dlg/dlgSequence.cpp
index 591309e..351a922 100644
--- a/pgadmin/dlg/dlgSequence.cpp
+++ b/pgadmin/dlg/dlgSequence.cpp
@@ -81,6 +81,8 @@ int dlgSequence::Go(bool modal)
 
 		stStart->SetLabel(_("Current value"));
 
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
+
 		if (!connection->BackendMinimumVersion(7, 4))
 		{
 			txtIncrement->Disable();
@@ -239,39 +241,22 @@ bool dlgSequence::doesOverflowBigInt(const wxString &str, bool emptyAllowed)
 wxString dlgSequence::GetSql()
 {
 	wxString sql;
-
-	wxString name = GetName();
+	wxString name;
 
 	if (sequence)
 	{
 		// edit mode
+		name = GetName();
 
-		if (GetName() != sequence->GetName())
-		{
-			if (connection->BackendMinimumVersion(8, 3))
-			{
-				sql += wxT("ALTER SEQUENCE ") + sequence->GetQuotedFullIdentifier()
-				       +  wxT("\n  RENAME TO ") + qtIdent(name) + wxT(";\n");
-			}
-			else
-			{
-				sql += wxT("ALTER TABLE ") + sequence->GetQuotedFullIdentifier()
-				       +  wxT("\n  RENAME TO ") + qtIdent(name) + wxT(";\n");
-			}
-		}
-		if (sequence->GetOwner() != cbOwner->GetValue())
-		{
-			if (connection->BackendMinimumVersion(8, 4))
-			{
-				sql += wxT("ALTER SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name)
-					   +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue()) + wxT(";\n");
-			}
-			else
-			{
-				sql += wxT("ALTER TABLE ") + schema->GetQuotedPrefix() + qtIdent(name)
-				       +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue()) + wxT(";\n");
-			}
-		}
+		if (connection->BackendMinimumVersion(8, 3))
+			AppendNameChange(sql, wxT("SEQUENCE ") + sequence->GetQuotedFullIdentifier());
+		else
+			AppendNameChange(sql, wxT("TABLE ") + sequence->GetQuotedFullIdentifier());
+
+		if (connection->BackendMinimumVersion(8, 4))
+			AppendOwnerChange(sql, wxT("SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name));
+		else
+			AppendOwnerChange(sql, wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
 
 		// This is where things get hairy. Per some thought by Horvath Gabor,
 		// we need to adjust the min/max sequence values, and the the current
@@ -340,12 +325,17 @@ wxString dlgSequence::GetSql()
 				sql += wxT("ALTER SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name)
 				       +  tmp + wxT(";\n");
 			}
+
+			if (connection->BackendMinimumVersion(8, 1))
+				AppendSchemaChange(sql,  wxT("SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name));
 		}
 	}
 	else
 	{
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		// create mode
-		sql = wxT("CREATE SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name);
+		sql = wxT("CREATE SEQUENCE ") + name;
 		if (chkCycled->GetValue())
 			sql += wxT(" CYCLE");
 		AppendIfFilled(sql, wxT("\n   INCREMENT "), txtIncrement->GetValue());
@@ -353,29 +343,23 @@ wxString dlgSequence::GetSql()
 		AppendIfFilled(sql, wxT("\n   MINVALUE "), txtMin->GetValue());
 		AppendIfFilled(sql, wxT("\n   MAXVALUE "), txtMax->GetValue());
 		AppendIfFilled(sql, wxT("\n   CACHE "), txtCache->GetValue());
-		sql += wxT(";\n");
 
+		sql += wxT(";\n");
 		if (cbOwner->GetGuessedSelection() > 0)
 		{
 			if (connection->BackendMinimumVersion(8, 4))
-			{
-				sql += wxT("ALTER SEQUENCE ") + schema->GetQuotedPrefix() + qtIdent(name)
-					   +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue()) + wxT(";\n");
-			}
+				AppendOwnerChange(sql, wxT("SEQUENCE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 			else
-			{
-				sql += wxT("ALTER TABLE ") + schema->GetQuotedPrefix() + qtIdent(name)
-				       +  wxT("\n  OWNER TO ") + qtIdent(cbOwner->GetValue()) + wxT(";\n");
-			}
+				AppendOwnerChange(sql, wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 		}
 	}
 
 	if (!connection->BackendMinimumVersion(8, 2))
-		sql +=  GetGrant(wxT("arwdRxt"), wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
+		sql +=  GetGrant(wxT("arwdRxt"), wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 	else
-		sql +=  GetGrant(wxT("rwU"), wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
+		sql +=  GetGrant(wxT("rwU"), wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 
-	AppendComment(sql, wxT("SEQUENCE"), schema, sequence);
+	AppendComment(sql, wxT("SEQUENCE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), sequence);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgTable.cpp b/pgadmin/dlg/dlgTable.cpp
index 8022119..fcce374 100644
--- a/pgadmin/dlg/dlgTable.cpp
+++ b/pgadmin/dlg/dlgTable.cpp
@@ -102,7 +102,7 @@
 
 
 BEGIN_EVENT_TABLE(dlgTable, dlgSecurityProperty)
-	EVT_CHECKBOX(XRCID("chkUnlogged"),               dlgProperty::OnChange)
+	EVT_CHECKBOX(XRCID("chkUnlogged"),              dlgProperty::OnChange)
 	EVT_TEXT(XRCID("cbTablespace"),                 dlgProperty::OnChange)
 	EVT_COMBOBOX(XRCID("cbTablespace"),             dlgProperty::OnChange)
 	EVT_TEXT(XRCID("txtFillFactor"),		dlgProperty::OnChange)
@@ -251,6 +251,7 @@ int dlgTable::Go(bool modal)
 		lbTables->Enable(connection->BackendMinimumVersion(8, 2));
 		chkHasOids->Enable((connection->BackendMinimumVersion(8, 0) && table->GetHasOids())
 		                   || connection->BackendMinimumVersion(8, 4));
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
 		cbTablespace->Enable(connection->BackendMinimumVersion(7, 5));
 
 		wxCookieType cookie;
@@ -788,7 +789,7 @@ wxString dlgTable::GetSql()
 {
 	int pos;
 	wxString sql;
-	wxString tabname = schema->GetQuotedPrefix() + qtIdent(GetName());
+	wxString tabname;
 
 	if (table)
 	{
@@ -800,6 +801,8 @@ wxString dlgTable::GetSql()
 		wxArrayString tmpDef = previousColumns;
 		wxString tmpsql;
 
+		tabname = schema->GetQuotedPrefix() + qtIdent(GetName());
+
 		// Build a temporary list of ADD COLUMNs, and fixup the list to remove
 		for (pos = 0; pos < lstColumns->GetItemCount() ; pos++)
 		{
@@ -1233,10 +1236,18 @@ wxString dlgTable::GetSql()
 					sql += vacStr;
 			}
 		}
+		// This needs to always be last so that other statements use correct schema
+		if (connection->BackendMinimumVersion(8, 1) && cbSchema->GetValue() != table->GetSchema()->GetName())
+		{
+			AppendSchemaChange(sql, wxT("TABLE ") + tabname);
+		}
 	}
 	else
 	{
 		bool typedTable = cbOfType->GetCurrentSelection() > 0 && cbOfType->GetOIDKey() > 0;
+
+		tabname = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
 		sql = wxT("CREATE ");
 		if (chkUnlogged->GetValue())
 			sql +=  wxT("UNLOGGED ");
@@ -1490,7 +1501,7 @@ wxString dlgTable::GetSql()
 			       + wxT(";\n");
 	}
 
-	AppendComment(sql, wxT("TABLE"), schema, table);
+	AppendComment(sql, wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), table);
 
 	if (connection->BackendMinimumVersion(8, 2))
 		sql += GetGrant(wxT("arwdxt"), wxT("TABLE ") + tabname);
diff --git a/pgadmin/dlg/dlgTextSearchConfiguration.cpp b/pgadmin/dlg/dlgTextSearchConfiguration.cpp
index 0a56ab9..af0ded6 100644
--- a/pgadmin/dlg/dlgTextSearchConfiguration.cpp
+++ b/pgadmin/dlg/dlgTextSearchConfiguration.cpp
@@ -124,6 +124,7 @@ int dlgTextSearchConfiguration::Go(bool modal)
 	if (config)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
 		cbParser->SetValue(config->GetParser());
 		cbCopy->Disable();
 
@@ -208,6 +209,7 @@ void dlgTextSearchConfiguration::CheckChange()
 	if (config)
 	{
 		EnableOK(txtName->GetValue() != config->GetName()
+		         || cbSchema->GetValue() != config->GetSchema()->GetName()
 		         || txtComment->GetValue() != config->GetComment()
 		         || cbOwner->GetValue() != config->GetOwner()
 		         || dirtyTokens);
@@ -337,27 +339,7 @@ void dlgTextSearchConfiguration::OnRemoveToken(wxCommandEvent &ev)
 wxString dlgTextSearchConfiguration::GetSql()
 {
 	wxString sql;
-	wxString objname = schema->GetQuotedPrefix() + qtIdent(GetName());
-
-	if (config)
-	{
-		// edit mode
-		AppendNameChange(sql, wxT("TEXT SEARCH CONFIGURATION ") + config->GetQuotedFullIdentifier());
-		AppendOwnerChange(sql, wxT("TEXT SEARCH CONFIGURATION ") + objname);
-	}
-	else
-	{
-		// create mode
-		sql = wxT("CREATE TEXT SEARCH CONFIGURATION ")
-		      + schema->GetQuotedPrefix() + GetName()
-		      + wxT(" (");
-
-		AppendIfFilled(sql, wxT("\n   PARSER="), cbParser->GetValue());
-		AppendIfFilled(sql, wxT("\n   COPY="), cbCopy->GetValue());
-
-		sql += wxT("\n);\n");
-
-	}
+	wxString objname = schema->GetQuotedPrefix() + qtIdent(config->GetName());
 
 	if (cbParser->GetValue().Length() > 0)
 	{
@@ -396,15 +378,15 @@ wxString dlgTextSearchConfiguration::GetSql()
 				if (oldVal.Length() == 0)
 				{
 					sql += wxT("ALTER TEXT SEARCH CONFIGURATION ") + objname
-					       +  wxT(" ADD MAPPING FOR ") + newTok
-					       +  wxT(" WITH ") + newVal
+					       +  wxT("\n  ADD MAPPING FOR ") + newTok
+					       +  wxT("\n  WITH ") + newVal
 					       +  wxT(";\n");
 				}
 				else
 				{
 					sql += wxT("ALTER TEXT SEARCH CONFIGURATION ") + objname
-					       +  wxT(" ALTER MAPPING FOR ") + newTok
-					       + wxT(" WITH ") + newVal
+					       +  wxT("\n  ALTER MAPPING FOR ") + newTok
+					       +  wxT("\n  WITH ") + newVal
 					       +  wxT(";\n");
 				}
 			}
@@ -424,7 +406,30 @@ wxString dlgTextSearchConfiguration::GetSql()
 		}
 	}
 
-	AppendComment(sql, wxT("TEXT SEARCH CONFIGURATION ") + objname, config);
+	if (config)
+	{
+		// edit mode
+		objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+		AppendNameChange(sql, wxT("TEXT SEARCH CONFIGURATION ") + config->GetQuotedFullIdentifier());
+		AppendOwnerChange(sql, wxT("TEXT SEARCH CONFIGURATION ") + objname);
+		AppendSchemaChange(sql, wxT("TEXT SEARCH CONFIGURATION ") + objname);
+	}
+	else
+	{
+		// create mode
+		objname = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+		sql = wxT("CREATE TEXT SEARCH CONFIGURATION ")
+		      + objname
+		      + wxT(" (");
+
+		AppendIfFilled(sql, wxT("\n   PARSER="), cbParser->GetValue());
+		AppendIfFilled(sql, wxT("\n   COPY="), cbCopy->GetValue());
+
+		sql += wxT("\n);\n");
+
+	}
+
+	AppendComment(sql, wxT("TEXT SEARCH CONFIGURATION ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), config);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgTextSearchDictionary.cpp b/pgadmin/dlg/dlgTextSearchDictionary.cpp
index b1f5f90..8d01200 100644
--- a/pgadmin/dlg/dlgTextSearchDictionary.cpp
+++ b/pgadmin/dlg/dlgTextSearchDictionary.cpp
@@ -93,6 +93,7 @@ int dlgTextSearchDictionary::Go(bool modal)
 	if (dict)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
 		cbTemplate->SetValue(dict->GetTemplate());
 		cbTemplate->Disable();
 
@@ -152,6 +154,7 @@ void dlgTextSearchDictionary::CheckChange()
 	if (dict)
 	{
 		EnableOK(txtName->GetValue() != dict->GetName()
+		         || cbSchema->GetValue() != dict->GetSchema()->GetName()
 		         || txtComment->GetValue() != dict->GetComment()
 		         || cbOwner->GetValue() != dict->GetOwner()
 		         || GetOptionsSql().Length() > 0);
@@ -303,27 +306,31 @@ wxString dlgTextSearchDictionary::GetOptionsSql()
 wxString dlgTextSearchDictionary::GetSql()
 {
 	wxString sql;
-	wxString objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+	wxString objname;
 
 	if (dict)
 	{
 		// edit mode
-		AppendNameChange(sql, wxT("TEXT SEARCH DICTIONARY ") + dict->GetQuotedFullIdentifier());
-		AppendOwnerChange(sql, wxT("TEXT SEARCH DICTIONARY ") + objname);
+		objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+		AppendNameChange(sql, wxT("TEXT SEARCH DICTIONARY ") + dict->GetQuotedFullIdentifier());
 
 		wxString sqloptions = GetOptionsSql();
 		if (sqloptions.Length() > 0)
 		{
 			sql += wxT("ALTER TEXT SEARCH DICTIONARY ") + objname
-			       + wxT(" (") + sqloptions + wxT(")");
+			       + wxT("\n  (") + sqloptions + wxT(");\n");
 		}
+		AppendOwnerChange(sql, wxT("TEXT SEARCH DICTIONARY ") + objname);
+
+		AppendSchemaChange(sql, wxT("TEXT SEARCH DICTIONARY ") + objname);
 	}
 	else
 	{
 		// create mode
+		objname = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
 		sql = wxT("CREATE TEXT SEARCH DICTIONARY ")
-		      + schema->GetQuotedPrefix() + GetName()
-		      + wxT(" (")
+		      + objname
+		      + wxT("\n  (")
 		      + wxT("\n  TEMPLATE = ") + cbTemplate->GetValue();
 
 		// check for options
@@ -336,7 +343,7 @@ wxString dlgTextSearchDictionary::GetSql()
 		sql += wxT("\n);\n");
 
 	}
-	AppendComment(sql, wxT("TEXT SEARCH DICTIONARY ") + objname, dict);
+	AppendComment(sql, wxT("TEXT SEARCH DICTIONARY ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), dict);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgTextSearchParser.cpp b/pgadmin/dlg/dlgTextSearchParser.cpp
index e2ce68c..48a8edf 100644
--- a/pgadmin/dlg/dlgTextSearchParser.cpp
+++ b/pgadmin/dlg/dlgTextSearchParser.cpp
@@ -165,6 +165,7 @@ int dlgTextSearchParser::Go(bool modal)
 	if (parser)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
 		cbStart->SetValue(parser->GetStart());
 		cbStart->Disable();
 		cbGetToken->SetValue(parser->GetGettoken());
@@ -202,6 +203,7 @@ void dlgTextSearchParser::CheckChange()
 	if (parser)
 	{
 		EnableOK(txtName->GetValue() != parser->GetName()
+		         || cbSchema->GetValue() != parser->GetSchema()->GetName()
 		         || txtComment->GetValue() != parser->GetComment());
 	}
 	else
@@ -228,18 +230,21 @@ void dlgTextSearchParser::OnChange(wxCommandEvent &ev)
 wxString dlgTextSearchParser::GetSql()
 {
 	wxString sql;
-	wxString objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+	wxString objname;
 
 	if (parser)
 	{
 		// edit mode
-		AppendNameChange(sql, wxT("TEXT SEARCH PARSER ") + parser->GetQuotedFullIdentifier());
+		objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+		AppendNameChange(sql, wxT("TEXT SEARCH PARSER ") + parser->GetQuotedFullIdentifier());
+		AppendSchemaChange(sql, wxT("TEXT SEARCH PARSER ") + objname);
 	}
 	else
 	{
 		// create mode
+		objname = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
 		sql = wxT("CREATE TEXT SEARCH PARSER ")
-		      + schema->GetQuotedPrefix() + GetName()
+		      + objname
 		      + wxT(" (")
 		      + wxT("\n  START = ") + cbStart->GetValue()
 		      + wxT(",\n  GETTOKEN = ") + cbGetToken->GetValue()
@@ -251,7 +256,7 @@ wxString dlgTextSearchParser::GetSql()
 		sql += wxT("\n);\n");
 
 	}
-	AppendComment(sql, wxT("TEXT SEARCH PARSER ") + objname, parser);
+	AppendComment(sql, wxT("TEXT SEARCH PARSER ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), parser);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgTextSearchTemplate.cpp b/pgadmin/dlg/dlgTextSearchTemplate.cpp
index 9ebe0b5..c784631 100644
--- a/pgadmin/dlg/dlgTextSearchTemplate.cpp
+++ b/pgadmin/dlg/dlgTextSearchTemplate.cpp
@@ -102,6 +102,7 @@ int dlgTextSearchTemplate::Go(bool modal)
 	if (tmpl)
 	{
 		// edit mode
+		cbSchema->Enable(connection->BackendMinimumVersion(9, 1));
 		cbInit->SetValue(tmpl->GetInit());
 		cbInit->Disable();
 		cbLexize->SetValue(tmpl->GetLexize());
@@ -133,6 +134,7 @@ void dlgTextSearchTemplate::CheckChange()
 	if (tmpl)
 	{
 		EnableOK(txtName->GetValue() != tmpl->GetName()
+		         || cbSchema->GetValue() != tmpl->GetSchema()->GetName()
 		         || txtComment->GetValue() != tmpl->GetComment());
 	}
 	else
@@ -156,18 +158,21 @@ void dlgTextSearchTemplate::OnChange(wxCommandEvent &ev)
 wxString dlgTextSearchTemplate::GetSql()
 {
 	wxString sql;
-	wxString objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+	wxString objname;
 
 	if (tmpl)
 	{
 		// edit mode
-		AppendNameChange(sql, wxT("TEXT SEARCH TEMPLATE ") + tmpl->GetQuotedFullIdentifier());
+		objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+		AppendNameChange(sql, wxT("TEXT SEARCH TEMPLATE ") + tmpl->GetQuotedFullIdentifier());
+		AppendSchemaChange(sql, wxT("TEXT SEARCH TEMPLATE ") + objname);
 	}
 	else
 	{
 		// create mode
+		objname = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
 		sql = wxT("CREATE TEXT SEARCH TEMPLATE ")
-		      + schema->GetQuotedPrefix() + GetName()
+		      + objname
 		      + wxT(" (");
 
 		AppendIfFilled(sql, wxT("\n   INIT="), cbInit->GetValue());
@@ -179,7 +184,7 @@ wxString dlgTextSearchTemplate::GetSql()
 
 	}
 
-	AppendComment(sql, wxT("TEXT SEARCH TEMPLATE ") + objname, tmpl);
+	AppendComment(sql, wxT("TEXT SEARCH TEMPLATE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), tmpl);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgType.cpp b/pgadmin/dlg/dlgType.cpp
index 5f3a36c..f120cbe 100644
--- a/pgadmin/dlg/dlgType.cpp
+++ b/pgadmin/dlg/dlgType.cpp
@@ -189,7 +189,8 @@ int dlgType::Go(bool modal)
 	if (type)
 	{
 		// Edit Mode
-		txtName->Disable();
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
+		txtName->Enable(connection->BackendMinimumVersion(8, 4));
 		rdbType->SetSelection(type->GetTypeClass());
 		rdbType->Disable();
 
@@ -449,6 +450,7 @@ void dlgType::CheckChange()
 	if (type)
 	{
 		EnableOK(txtComment->GetValue() != type->GetComment()
+		         || cbSchema->GetValue() != type->GetSchema()->GetName()
 		         || cbOwner->GetValue() != type->GetOwner()
 		         || (rdbType->GetSelection() == TYPE_COMPOSITE && GetSqlForTypes() != wxEmptyString)
 		         || (GetSql().Length() > 0 && connection->BackendMinimumVersion(9, 1)));
@@ -675,13 +677,16 @@ pgObject *dlgType::CreateObject(pgCollection *collection)
 
 wxString dlgType::GetSql()
 {
-	wxString sql, direction;
+	wxString sql, direction, objname;
 	size_t existingitems_index, listitems_index, offset;
 
 	if (type)
 	{
 		// Edit Mode
-		AppendOwnerChange(sql, wxT("TYPE ") + type->GetQuotedFullIdentifier());
+		objname = schema->GetQuotedPrefix() + qtIdent(GetName());
+		AppendNameChange(sql, wxT("TYPE ") + type->GetQuotedFullIdentifier());
+		AppendOwnerChange(sql, wxT("TYPE ") + objname);
+
 		sql += GetSqlForTypes();
 		if (rdbType->GetSelection() == TYPE_ENUM && connection->BackendMinimumVersion(9, 1))
 		{
@@ -703,7 +708,7 @@ wxString dlgType::GetSql()
 						offset = -1;
 					}
 
-					sql += wxT("ALTER TYPE ") + type->GetQuotedFullIdentifier()
+					sql += wxT("ALTER TYPE ") + objname
 					       +  wxT("\n  ADD VALUE ") + connection->qtDbString(lstLabels->GetItemText(listitems_index))
 					       +  wxT(" ") + direction + wxT(" ")
 					       + connection->qtDbString(elements.Item(existingitems_index + offset))
@@ -713,6 +718,7 @@ wxString dlgType::GetSql()
 					existingitems_index++;
 			}
 		}
+		AppendSchemaChange(sql, wxT("TYPE ") + objname);
 	}
 	else
 	{
@@ -817,7 +823,7 @@ wxString dlgType::GetSql()
 
 		sql += wxT(");\n");
 	}
-	AppendComment(sql, wxT("TYPE"), schema, type);
+	AppendComment(sql, wxT("TYPE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), type);
 
 	return sql;
 }
diff --git a/pgadmin/dlg/dlgView.cpp b/pgadmin/dlg/dlgView.cpp
index 77ba9ad..f366358 100644
--- a/pgadmin/dlg/dlgView.cpp
+++ b/pgadmin/dlg/dlgView.cpp
@@ -65,7 +65,7 @@ int dlgView::Go(bool modal)
 	if (view)
 	{
 		// edit mode
-
+		cbSchema->Enable(connection->BackendMinimumVersion(8, 1));
 		oldDefinition = view->GetFormattedDefinition();
 		txtSqlBox->SetText(oldDefinition);
 	}
@@ -107,6 +107,7 @@ void dlgView::CheckChange()
 			enable = txtComment->GetValue() != view->GetComment()
 			         || txtSqlBox->GetText().Trim(true).Trim(false) != oldDefinition.Trim(true).Trim(false)
 			         || cbOwner->GetValue() != view->GetOwner()
+			         || cbSchema->GetValue() != view->GetSchema()->GetName()
 			         || name != view->GetName();
 		enable &= !txtSqlBox->GetText().Trim(true).IsEmpty();
 		EnableOK(enable);
@@ -125,35 +126,46 @@ void dlgView::CheckChange()
 
 wxString dlgView::GetSql()
 {
-	wxString sql, name = GetName();
+	wxString sql;
+	wxString name;
 
 	if (view)
 	{
 		// edit mode
+		name = GetName();
 
 		if (name != view->GetName())
 		{
-			sql += wxT("ALTER TABLE ") + view->GetQuotedFullIdentifier()
-			       +  wxT("\n  RENAME TO ") + qtIdent(name) + wxT(";\n");
+			if (connection->BackendMinimumVersion(8, 3))
+				AppendNameChange(sql, wxT("VIEW ") + view->GetQuotedFullIdentifier());
+			else
+				AppendNameChange(sql, wxT("TABLE ") + view->GetQuotedFullIdentifier());
 		}
+
+		if (connection->BackendMinimumVersion(8, 4) && cbSchema->GetName() != view->GetSchema()->GetName())
+			AppendSchemaChange(sql, wxT("VIEW " + qtIdent(view->GetSchema()->GetName()) + wxT(".") + qtIdent(name)));
+		else
+			AppendSchemaChange(sql, wxT("TABLE " + qtIdent(view->GetSchema()->GetName()) + wxT(".") + qtIdent(name)));
 	}
 
 	if (!view || txtSqlBox->GetText().Trim(true).Trim(false) != oldDefinition.Trim(true).Trim(false))
 	{
-		sql += wxT("CREATE OR REPLACE VIEW ") + schema->GetQuotedPrefix() + qtIdent(name) + wxT(" AS\n")
+		name = qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName());
+
+		sql += wxT("CREATE OR REPLACE VIEW ") + name + wxT(" AS\n")
 		       + txtSqlBox->GetText().Trim(true).Trim(false)
 		       + wxT(";\n");
 	}
 
 	if (view)
-		AppendOwnerChange(sql, wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
+		AppendOwnerChange(sql, wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 	else
-		AppendOwnerNew(sql, wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
+		AppendOwnerNew(sql, wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 
 
-	sql +=  GetGrant(wxT("arwdRxt"), wxT("TABLE ") + schema->GetQuotedPrefix() + qtIdent(name));
+	sql +=  GetGrant(wxT("arwdRxt"), wxT("TABLE ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()));
 
-	AppendComment(sql, wxT("VIEW"), schema, view);
+	AppendComment(sql, wxT("VIEW ") + qtIdent(cbSchema->GetValue()) + wxT(".") + qtIdent(GetName()), view);
 	return sql;
 }
 
diff --git a/pgadmin/include/dlg/dlgProperty.h b/pgadmin/include/dlg/dlgProperty.h
index f561d7b..42e400c 100644
--- a/pgadmin/include/dlg/dlgProperty.h
+++ b/pgadmin/include/dlg/dlgProperty.h
@@ -134,6 +134,7 @@ protected:
 	void AppendNameChange(wxString &sql, const wxString &objname = wxEmptyString);
 	void AppendOwnerChange(wxString &sql, const wxString &objName = wxEmptyString);
 	void AppendOwnerNew(wxString &sql, const wxString &objname);
+	void AppendSchemaChange(wxString &sql, const wxString &objname = wxEmptyString);
 	void AppendComment(wxString &sql, const wxString &objType, pgSchema *schema, pgObject *obj);
 	void AppendComment(wxString &sql, const wxString &objName, pgObject *obj);
 	void AppendQuoted(wxString &sql, const wxString &name);
@@ -159,6 +160,7 @@ public:
 protected:
 	void AddGroups(ctlComboBoxFix *comboBox = 0);
 	void AddUsers(ctlComboBoxFix *cb1, ctlComboBoxFix *cb2 = 0);
+	void AddSchemas(ctlComboBoxFix *comboBox = 0);
 	void FillCombobox(const wxString &query, ctlComboBoxFix *cb1, ctlComboBoxFix *cb2 = 0);
 	void PrepareTablespace(ctlComboBoxFix *cb, const OID current = 0);
 	void OnHelp(wxCommandEvent &ev);
@@ -174,6 +176,7 @@ protected:
 	wxNotebook *nbNotebook;
 	wxTextCtrl *txtName, *txtOid, *txtComment;
 	ctlComboBox *cbOwner;
+	ctlComboBox *cbSchema;
 	wxComboBox *cbClusterSet;
 	wxCheckBox *chkReadOnly;
 	ctlSQLBox *sqlTextField1;
diff --git a/pgadmin/include/schema/pgExtension.h b/pgadmin/include/schema/pgExtension.h
index 1424e71..48bc9d9 100644
--- a/pgadmin/include/schema/pgExtension.h
+++ b/pgadmin/include/schema/pgExtension.h
@@ -12,10 +12,11 @@
 #ifndef PGEXTENSION_H
 #define PGEXTENSION_H
 
-#include "pgDatabase.h"
+#include "pgSchema.h"
 
 class pgCollection;
-class pgExtensionFactory : public pgDatabaseObjFactory
+
+class pgExtensionFactory : public pgSchemaObjFactory
 {
 public:
 	pgExtensionFactory();
@@ -23,28 +24,26 @@ public:
 	virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr = wxEmptyString);
 	virtual pgCollection *CreateCollection(pgObject *obj);
 };
+
 extern pgExtensionFactory extensionFactory;
 
-class pgExtension : public pgDatabaseObject
+class pgExtension : public pgSchemaObject
 {
 public:
-	pgExtension(const wxString &newName = wxT(""));
+	pgExtension(pgSchema *newSchema, const wxString &newName = wxT(""));
+	~pgExtension();
 
 	wxString GetTranslatedMessage(int kindOfMessage) const;
 	void ShowTreeDetail(ctlTree *browser, frmMain *form = 0, ctlListView *properties = 0, ctlSQLBox *sqlPane = 0);
+
+	bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
+	wxString GetSql(ctlTree *browser);
+	pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
+
 	bool CanDropCascaded()
 	{
 		return true;
 	}
-
-	wxString GetSchemaStr() const
-	{
-		return schema;
-	}
-	void iSetSchemaStr(const wxString &s)
-	{
-		schema = s;
-	}
 	wxString GetVersion() const
 	{
 		return version;
@@ -61,18 +60,13 @@ public:
 	{
 		isrelocatable = b;
 	}
-
-	bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
-	wxString GetSql(ctlTree *browser);
-	pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
-
 	bool HasStats()
 	{
 		return false;
 	}
 	bool HasDepends()
 	{
-		return false;
+	return false;
 	}
 	bool HasReferences()
 	{
@@ -80,14 +74,14 @@ public:
 	}
 
 private:
-	wxString schema, version;
+	wxString version;
 	bool isrelocatable;
 };
 
-class pgExtensionCollection : public pgDatabaseObjCollection
+class pgExtensionCollection : public pgSchemaObjCollection
 {
 public:
-	pgExtensionCollection(pgaFactory *factory, pgDatabase *db);
+	pgExtensionCollection(pgaFactory *factory, pgSchema *sch);
 	wxString GetTranslatedMessage(int kindOfMessage) const;
 };
 
diff --git a/pgadmin/include/schema/pgObject.h b/pgadmin/include/schema/pgObject.h
index 9f681dd..db58f57 100644
--- a/pgadmin/include/schema/pgObject.h
+++ b/pgadmin/include/schema/pgObject.h
@@ -353,7 +353,7 @@ private:
 	static void AppendRight(wxString &rights, const wxString &acl, wxChar c, const wxChar *rightName, const wxString &column = wxEmptyString);
 	static wxString GetPrivilegeGrant(const wxString &allPattern, const wxString &acl, const wxString &grantObject, const wxString &user, const wxString &column);
 	void ShowDependency(pgDatabase *db, ctlListView *list, const wxString &query, const wxString &clsOrder);
-	wxString name, owner, comment, acl;
+	wxString name, owner, schema, comment, acl;
 	int type;
 	OID oid, xid;
 
diff --git a/pgadmin/schema/pgExtension.cpp b/pgadmin/schema/pgExtension.cpp
index 4d33f44..7e999f6 100644
--- a/pgadmin/schema/pgExtension.cpp
+++ b/pgadmin/schema/pgExtension.cpp
@@ -17,9 +17,12 @@
 #include "utils/misc.h"
 #include "schema/pgExtension.h"
 
+pgExtension::pgExtension(pgSchema *newSchema, const wxString &newName)
+	: pgSchemaObject(newSchema, extensionFactory, newName)
+{
+}
 
-pgExtension::pgExtension(const wxString &newName)
-	: pgDatabaseObject(extensionFactory, newName)
+pgExtension::~pgExtension()
 {
 }
 
@@ -101,8 +104,8 @@ wxString pgExtension::GetSql(ctlTree *browser)
 		      + wxT("-- DROP EXTENSION ") + GetQuotedIdentifier() + wxT(";")
 		      + wxT("\n\n CREATE EXTENSION ") + GetName();
 
-		if (!GetSchemaStr().IsEmpty())
-			sql += wxT("\n  SCHEMA ") + GetSchemaStr();
+		if (!GetSchema()->GetName().IsEmpty())
+			sql += wxT("\n  SCHEMA ") + GetSchema()->GetName();
 		if (!GetVersion().IsEmpty())
 			sql += wxT("\n  VERSION ") + GetVersion();
 
@@ -122,7 +125,7 @@ void pgExtension::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *p
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("OID"), GetOid());
 		properties->AppendItem(_("Owner"), GetOwner());
-		properties->AppendItem(_("Schema"), GetSchemaStr());
+		properties->AppendItem(_("Schema"), GetSchema()->GetName());
 		properties->AppendYesNoItem(_("Relocatable?"), GetIsRelocatable());
 		properties->AppendItem(_("Version"), GetVersion());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
@@ -162,11 +165,10 @@ pgObject *pgExtensionFactory::CreateObjects(pgCollection *collection, ctlTree *b
 		while (!extensions->Eof())
 		{
 
-			extension = new pgExtension(extensions->GetVal(wxT("extname")));
+			extension = new pgExtension(collection->GetSchema(), extensions->GetVal(wxT("extname")));
 			extension->iSetDatabase(collection->GetDatabase());
 			extension->iSetOid(extensions->GetOid(wxT("oid")));
 			extension->iSetOwner(extensions->GetVal(wxT("rolname")));
-			extension->iSetSchemaStr(extensions->GetVal(wxT("nspname")));
 			extension->iSetIsRelocatable(extensions->GetBool(wxT("extrelocatable")));
 			extension->iSetVersion(extensions->GetVal(wxT("extversion")));
 			extension->iSetComment(extensions->GetVal(wxT("comment")));
@@ -189,12 +191,11 @@ pgObject *pgExtensionFactory::CreateObjects(pgCollection *collection, ctlTree *b
 
 /////////////////////////////
 
-pgExtensionCollection::pgExtensionCollection(pgaFactory *factory, pgDatabase *db)
-	: pgDatabaseObjCollection(factory, db)
+pgExtensionCollection::pgExtensionCollection(pgaFactory *factory, pgSchema *sch)
+	: pgSchemaObjCollection(factory, sch)
 {
 }
 
-
 wxString pgExtensionCollection::GetTranslatedMessage(int kindOfMessage) const
 {
 	wxString message = wxEmptyString;
@@ -222,14 +223,13 @@ wxString pgExtensionCollection::GetTranslatedMessage(int kindOfMessage) const
 #include "images/extensions.pngc"
 
 pgExtensionFactory::pgExtensionFactory()
-	: pgDatabaseObjFactory(__("Extension"), __("New Extension..."), __("Create a new Extension."), extension_png_img, extension_sm_png_img)
+	: pgSchemaObjFactory(__("Extension"), __("New Extension..."), __("Create a new Extension."), extension_png_img, extension_sm_png_img)
 {
 }
 
-
 pgCollection *pgExtensionFactory::CreateCollection(pgObject *obj)
 {
-	return new pgExtensionCollection(GetCollectionFactory(), (pgDatabase *)obj);
+	return new pgExtensionCollection(GetCollectionFactory(), (pgSchema *)obj);
 }
 
 pgExtensionFactory extensionFactory;
diff --git a/pgadmin/schema/pgIndex.cpp b/pgadmin/schema/pgIndex.cpp
index 1c02b26..c770242 100644
--- a/pgadmin/schema/pgIndex.cpp
+++ b/pgadmin/schema/pgIndex.cpp
@@ -188,7 +188,7 @@ void pgIndexBase::ReadColumnDetails()
 					quotedColumns += wxT(", ");
 				}
 
-				wxString options, coldef, opcname;
+				wxString options, coldef;
 				if (GetConnection()->BackendMinimumVersion(8, 3))
 					options = wxT("  i.indoption[") + NumToStr((long)(i - 1)) + wxT("] AS options,\n");
 
@@ -198,9 +198,12 @@ void pgIndexBase::ReadColumnDetails()
 				if (GetConnection()->BackendMinimumVersion(9, 0))
 				{
 					query = wxT("SELECT\n") + options +
-					        wxT("  pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(") AS coldef,\n") +
-					        wxT("  op.oprname,\n") +
-					        wxT("  CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname\n");
+					        wxT("  CASE WHEN (o.opcdefault = FALSE) THEN\n")
+					        wxT("    pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(") || ' ' || o.opcname\n") +
+					        wxT("  ELSE\n") +
+					        wxT("    pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(")\n") +
+					        wxT("  END AS coldef,\n") +
+					        wxT("  op.oprname\n");
 					if (GetConnection()->BackendMinimumVersion(9, 1))
 						query += wxT(",\n  coll.collname, nspc.nspname as collnspname\n");
 					query += wxT("FROM pg_index i\n")
@@ -216,8 +219,11 @@ void pgIndexBase::ReadColumnDetails()
 				else
 				{
 					query = wxT("SELECT\n") + options +
-					        wxT("  pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(") AS coldef,\n") +
-					        wxT("  CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname\n") +
+					        wxT("  CASE WHEN (o.opcdefault = FALSE) THEN\n")
+					        wxT("    pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(") || ' ' || o.opcname\n") +
+					        wxT("  ELSE\n") +
+					        wxT("    pg_get_indexdef(i.indexrelid, ") + NumToStr(i) + GetDatabase()->GetPrettyOption() + wxT(")\n") +
+					        wxT("  END AS coldef\n") +
 					        wxT("FROM pg_index i\n") +
 					        wxT("JOIN pg_attribute a ON (a.attrelid = i.indexrelid AND attnum = ") + NumToStr(i) + wxT(")\n") +
 					        wxT("LEFT OUTER JOIN pg_opclass o ON (o.oid = i.indclass[") + NumToStr((long)(i - 1)) + wxT("])\n") +
@@ -230,20 +236,6 @@ void pgIndexBase::ReadColumnDetails()
 				{
 					coldef = res->GetVal(wxT("coldef"));
 
-					if (GetConnection()->BackendMinimumVersion(9, 1) && !indexconstraint)
-					{
-						wxString collation = wxEmptyString;
-						if (!res->GetVal(wxT("collname")).IsEmpty())
-						{
-							collation = qtIdent(res->GetVal(wxT("collnspname"))) + wxT(".") + qtIdent(res->GetVal(wxT("collname")));
-							coldef += wxT(" COLLATE ") + collation;
-						}
-						collationsArray.Add(collation);
-					}
-
-					opcname = res->GetVal(wxT("opcname"));
-					coldef += wxT(" ") + opcname;
-
 					// Get the column options
 					if (GetConnection()->BackendMinimumVersion(8, 3))
 					{
@@ -268,9 +260,21 @@ void pgIndexBase::ReadColumnDetails()
 				{
 					coldef += wxT(" WITH ") + res->GetVal(wxT("oprname"));
 				}
+
 				columns += coldef;
 				quotedColumns += coldef;
 				columnList.Add(coldef);
+
+				if (GetConnection()->BackendMinimumVersion(9, 1) && !indexconstraint)
+				{
+					wxString collation = wxEmptyString;
+					if (!res->GetVal(wxT("collname")).IsEmpty())
+					{
+						collation = qtIdent(res->GetVal(wxT("collnspname"))) + wxT(".") + qtIdent(res->GetVal(wxT("collname")));
+						quotedColumns += wxT(" COLLATE ") + collation;
+					}
+					collationsArray.Add(collation);
+				}
 			}
 		}
 		else
diff --git a/pgadmin/schema/pgObject.cpp b/pgadmin/schema/pgObject.cpp
index ba65584..e085ee8 100644
--- a/pgadmin/schema/pgObject.cpp
+++ b/pgadmin/schema/pgObject.cpp
@@ -756,7 +756,7 @@ wxString pgObject::GetCommentSql()
 	if (!comment.IsNull())
 	{
 		cmt = wxT("COMMENT ON ") + GetTypeName().Upper() + wxT(" ") + GetQuotedFullIdentifier()
-		      + wxT(" IS ") + qtDbString(comment) + wxT(";\n");
+		      + wxT("\n  IS ") + qtDbString(comment) + wxT(";\n");
 	}
 	return cmt;
 }
@@ -775,7 +775,7 @@ wxString pgObject::GetOwnerSql(int major, int minor, wxString objname, wxString
 			if (objname.IsEmpty())
 				objname = objtype + wxT(" ") + GetQuotedFullIdentifier();
 
-			sql = wxT("ALTER ") + objname + wxT(" OWNER TO ") + qtIdent(owner) + wxT(";\n");
+			sql = wxT("ALTER ") + objname + wxT("\n  OWNER TO ") + qtIdent(owner) + wxT(";\n");
 		}
 	}
 	return sql;
diff --git a/pgadmin/ui/dlgAggregate.xrc b/pgadmin/ui/dlgAggregate.xrc
index e362eb2..3a4d4a4 100644
--- a/pgadmin/ui/dlgAggregate.xrc
+++ b/pgadmin/ui/dlgAggregate.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgCollation.xrc b/pgadmin/ui/dlgCollation.xrc
index c7e4952..a6dbdde 100644
--- a/pgadmin/ui/dlgCollation.xrc
+++ b/pgadmin/ui/dlgCollation.xrc
@@ -19,7 +19,7 @@
                 <cols>2</cols>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -63,6 +63,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgConversion.xrc b/pgadmin/ui/dlgConversion.xrc
index cf9a889..edf3c51 100644
--- a/pgadmin/ui/dlgConversion.xrc
+++ b/pgadmin/ui/dlgConversion.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgDomain.xrc b/pgadmin/ui/dlgDomain.xrc
index 265ab1d..e594ab7 100644
--- a/pgadmin/ui/dlgDomain.xrc
+++ b/pgadmin/ui/dlgDomain.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgForeignTable.xrc b/pgadmin/ui/dlgForeignTable.xrc
index b755148..2a4330e 100644
--- a/pgadmin/ui/dlgForeignTable.xrc
+++ b/pgadmin/ui/dlgForeignTable.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgFunction.xrc b/pgadmin/ui/dlgFunction.xrc
index 8b9fb58..ca4025c 100644
--- a/pgadmin/ui/dlgFunction.xrc
+++ b/pgadmin/ui/dlgFunction.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -61,6 +61,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgOperator.xrc b/pgadmin/ui/dlgOperator.xrc
index 9b835e1..626f805 100644
--- a/pgadmin/ui/dlgOperator.xrc
+++ b/pgadmin/ui/dlgOperator.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -30,8 +30,7 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtName">
-                  </object>
+                  <object class="wxTextCtrl" name="txtName"/>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
@@ -43,8 +42,7 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtOID">
-                  </object>
+                  <object class="wxTextCtrl" name="txtOID"/>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
@@ -64,6 +62,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgSequence.xrc b/pgadmin/ui/dlgSequence.xrc
index 2830d78..dc777e8 100644
--- a/pgadmin/ui/dlgSequence.xrc
+++ b/pgadmin/ui/dlgSequence.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stSchema">
+                    <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgTable.xrc b/pgadmin/ui/dlgTable.xrc
index 051ada0..0190d7e 100644
--- a/pgadmin/ui/dlgTable.xrc
+++ b/pgadmin/ui/dlgTable.xrc
@@ -19,7 +19,7 @@
                 <cols>2</cols>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -61,6 +61,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stSchema">
+                    <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgTextSearchConfiguration.xrc b/pgadmin/ui/dlgTextSearchConfiguration.xrc
index 401c6d0..b8091ad 100644
--- a/pgadmin/ui/dlgTextSearchConfiguration.xrc
+++ b/pgadmin/ui/dlgTextSearchConfiguration.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,6 +67,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgTextSearchDictionary.xrc b/pgadmin/ui/dlgTextSearchDictionary.xrc
index 3a3c0a8..f3da59c 100644
--- a/pgadmin/ui/dlgTextSearchDictionary.xrc
+++ b/pgadmin/ui/dlgTextSearchDictionary.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,6 +67,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgTextSearchParser.xrc b/pgadmin/ui/dlgTextSearchParser.xrc
index a97d3b5..953d566 100644
--- a/pgadmin/ui/dlgTextSearchParser.xrc
+++ b/pgadmin/ui/dlgTextSearchParser.xrc
@@ -19,7 +19,7 @@
                 <cols>2</cols>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -66,6 +66,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgTextSearchTemplate.xrc b/pgadmin/ui/dlgTextSearchTemplate.xrc
index cecd99b..954a4d6 100644
--- a/pgadmin/ui/dlgTextSearchTemplate.xrc
+++ b/pgadmin/ui/dlgTextSearchTemplate.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,6 +67,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgType.xrc b/pgadmin/ui/dlgType.xrc
index d46844a..e9c0286 100644
--- a/pgadmin/ui/dlgType.xrc
+++ b/pgadmin/ui/dlgType.xrc
@@ -19,7 +19,7 @@
                 <cols>2</cols>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -63,6 +63,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
diff --git a/pgadmin/ui/dlgView.xrc b/pgadmin/ui/dlgView.xrc
index 2d7ee47..4239aab 100644
--- a/pgadmin/ui/dlgView.xrc
+++ b/pgadmin/ui/dlgView.xrc
@@ -20,7 +20,7 @@
                 <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>4</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,21 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                 <object class="wxStaticText" name="stSchema">
+                  <label>Schema</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>