SVN Commit by andreas: r4849 - in trunk/pgadmin3: . src/dlg src/slony - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by andreas: r4849 - in trunk/pgadmin3: . src/dlg src/slony
Date
Msg-id 200512202054.jBKKsXEq026879@developer.pgadmin.org
Whole thread Raw
List pgadmin-hackers
Author: andreas
Date: 2005-12-20 20:54:32 +0000 (Tue, 20 Dec 2005)
New Revision: 4849

Modified:
   trunk/pgadmin3/CHANGELOG.txt
   trunk/pgadmin3/src/dlg/dlgDatabase.cpp
   trunk/pgadmin3/src/dlg/dlgLanguage.cpp
   trunk/pgadmin3/src/slony/dlgRepPath.cpp
Log:
dlgLanguage name+comment, dlgDatabase comment

Modified: trunk/pgadmin3/CHANGELOG.txt
===================================================================
--- trunk/pgadmin3/CHANGELOG.txt    2005-12-15 15:06:13 UTC (rev 4848)
+++ trunk/pgadmin3/CHANGELOG.txt    2005-12-20 20:54:32 UTC (rev 4849)
@@ -18,6 +18,7 @@
 </ul>
 <br>
 <ul>
+    <li>2005-12-2� AP         dlgLanguage name+comment, dlgDatabase comment [Hiroshi]
     <li>2005-12-15 DP  1.4.2  Exclude system schemas by name rather than OID, so that 'public' can be safely renamed.
     <li>2005-12-12 AP  1.4.2  fix slony node statistics
     <li>2005-12-11 AP         support 8.1 language templates

Modified: trunk/pgadmin3/src/dlg/dlgDatabase.cpp
===================================================================
--- trunk/pgadmin3/src/dlg/dlgDatabase.cpp    2005-12-15 15:06:13 UTC (rev 4848)
+++ trunk/pgadmin3/src/dlg/dlgDatabase.cpp    2005-12-20 20:54:32 UTC (rev 4849)
@@ -259,7 +259,8 @@

     if (database)
     {
-        enable = txtSchemaRestr->GetValue() != database->GetSchemaRestriction();
+        enable = txtSchemaRestr->GetValue() != database->GetSchemaRestriction()
+               || txtComment->GetValue() != database->GetComment();
     }

     CheckValid(enable, !GetName().IsEmpty(), _("Please specify name."));

Modified: trunk/pgadmin3/src/dlg/dlgLanguage.cpp
===================================================================
--- trunk/pgadmin3/src/dlg/dlgLanguage.cpp    2005-12-15 15:06:13 UTC (rev 4848)
+++ trunk/pgadmin3/src/dlg/dlgLanguage.cpp    2005-12-20 20:54:32 UTC (rev 4849)
@@ -75,8 +75,9 @@
             cbValidator->SetSelection(0);
         }

+        cbName->SetValue(language->GetName());
         if (!connection->BackendMinimumVersion(7, 4))
-            txtName->Disable();
+            cbName->Disable();
         cbHandler->Disable();
         chkTrusted->Disable();
         cbValidator->Disable();
@@ -179,7 +180,9 @@
     if (language)
     {
         // edit mode
-        AppendNameChange(sql);
+        if (name != language->GetName())
+            sql += wxT("ALTER LANGUAGE ") + qtIdent(language->GetName())
+                +  wxT(" RENAME TO ") + qtIdent(name) + wxT(";\n");
     }
     else
     {
@@ -200,7 +203,7 @@
     }

     sql += GetGrant(wxT("X"), wxT("LANGUAGE ") + qtIdent(name));
-    AppendComment(sql, wxT("LANGUAGE"), 0, language);
+    AppendComment(sql, wxT("LANGUAGE ") + qtIdent(name), 0, language);

     return sql;
 }

Modified: trunk/pgadmin3/src/slony/dlgRepPath.cpp
===================================================================
--- trunk/pgadmin3/src/slony/dlgRepPath.cpp    2005-12-15 15:06:13 UTC (rev 4848)
+++ trunk/pgadmin3/src/slony/dlgRepPath.cpp    2005-12-20 20:54:32 UTC (rev 4849)
@@ -77,7 +77,8 @@
             wxT("  FROM ") + cluster->GetSchemaPrefix() + wxT("sl_node\n")
             wxT("  LEFT JOIN ") + cluster->GetSchemaPrefix() + wxT("sl_path ON pa_client=\n") +
NumToStr(node->GetSlId())+ 
                         wxT(" AND pa_server=no_id\n")
-            wxT("  WHERE no_active AND pa_client IS NULL\n")
+            wxT(" WHERE no_active AND pa_client IS NULL\n")
+            wxT("   AND no_id <> ") + NumToStr(node->GetSlId()) + wxT("\n")
             wxT(" ORDER BY no_id")
             );

@@ -91,6 +92,8 @@
             }
             delete nodes;
         }
+        if (cbServer->GetCount() > 0)
+            cbServer->SetSelection(0);
     }

     return dlgProperty::Go(modal);


pgadmin-hackers by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: dlgDatabase_patch
Next
From: Andreas Pflug
Date:
Subject: Re: dlgDatabase_patch