diff --git a/pgadmin/slony/dlgRepCluster.cpp b/pgadmin/slony/dlgRepCluster.cpp index 4dbe84c..9552340 100644 --- a/pgadmin/slony/dlgRepCluster.cpp +++ b/pgadmin/slony/dlgRepCluster.cpp @@ -907,6 +907,7 @@ wxString dlgRepCluster::GetSql() { wxString sql; wxString name; + bool bIsChangeComment = false; if (chkJoinCluster->GetValue()) name = wxT("_") + cbClusterName->GetValue(); else @@ -925,6 +926,8 @@ wxString dlgRepCluster::GetSql() if (id != cluster->GetAdminNodeID()) settings->WriteLong(wxT("Replication/") + cluster->GetName() + wxT("/AdminNode"), id); } + + bIsChangeComment = txtComment->GetValue() != cluster->GetComment(); } else { @@ -1040,9 +1043,11 @@ wxString dlgRepCluster::GetSql() sql += txtNodeID->GetValue() + wxT(");\n"); + + bIsChangeComment = true; } - if (!txtComment->GetValue().IsEmpty()) + if (bIsChangeComment) sql += wxT("\n") wxT("COMMENT ON SCHEMA ") + quotedName + wxT(" IS ") + qtDbString(txtComment->GetValue()) + wxT(";\n");