Hi Dave,

Restore table fails, when the table contains special characters.
PFA for both trunk and REL-1_10 branch.

--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: www.enterprisedb.com <http://www.enterprisedb.com>
Index: frm/frmRestore.cpp
===================================================================
--- frm/frmRestore.cpp	(revision 8342)
+++ frm/frmRestore.cpp	(working copy)
@@ -416,24 +416,24 @@
             switch (object->GetMetaType())
             {
                 case PGM_FUNCTION:
-                    cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(object->GetFullName()), true));
+                    cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(object->GetFullName())));
                     break;
                 case PGM_INDEX:
-                    cmd.Append(wxT(" --index ") + commandLineCleanOption(object->GetQuotedIdentifier(), true));
+                    cmd.Append(wxT(" --index ") + commandLineCleanOption(object->GetQuotedIdentifier()));
                     break;
                 case PGM_TABLE:
-                    cmd.Append(wxT(" --table ") + commandLineCleanOption(object->GetQuotedIdentifier(), true));
+                    cmd.Append(wxT(" --table ") + commandLineCleanOption(object->GetQuotedIdentifier()));
                     break;
                 case PGM_TRIGGER:
-                    cmd.Append(wxT(" --trigger ") + commandLineCleanOption(object->GetQuotedIdentifier(), true));
+                    cmd.Append(wxT(" --trigger ") + commandLineCleanOption(object->GetQuotedIdentifier()));
                     break;
                 default:
                     break;
             }
             if (object->GetMetaType() == PGM_SCHEMA)
-                cmd.Append(wxT(" --schema ") + commandLineCleanOption(object->GetQuotedIdentifier(), true));
+                cmd.Append(wxT(" --schema ") + commandLineCleanOption(object->GetQuotedIdentifier()));
             else if (pgAppMinimumVersion(restoreExecutable, 8, 2))
-                cmd.Append(wxT(" --schema ") + commandLineCleanOption(object->GetSchema()->GetQuotedIdentifier(), true));
+                cmd.Append(wxT(" --schema ") + commandLineCleanOption(object->GetSchema()->GetQuotedIdentifier()));
         }
 
         if (settings->GetIgnoreVersion())
Index: frm/frmRestore.cpp
===================================================================
--- frm/frmRestore.cpp	(revision 8342)
+++ frm/frmRestore.cpp	(working copy)
@@ -357,24 +357,24 @@
                     {
                         if (pgAppMinimumVersion(restoreExecutable, 8, 2))
                         {
-                            cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' ')), true));
-                            cmd.Append(wxT(" --schema ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).BeforeLast(' ')), true));
+                            cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' '))));
+                            cmd.Append(wxT(" --schema ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).BeforeLast(' '))));
                         }
                         else
                         {
-                            cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' ')), true));
+                            cmd.Append(wxT(" --function ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' '))));
                         }
                     }
                     else if (lstContents->GetText(sel, 0).Lower() == wxString(_("Table")).Lower())
                     {
                         if (pgAppMinimumVersion(restoreExecutable, 8, 2))
                         {
-                            cmd.Append(wxT(" --table ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' ')), true));
-                            cmd.Append(wxT(" --schema ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).BeforeLast(' ')), true));
+                            cmd.Append(wxT(" --table ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' '))));
+                            cmd.Append(wxT(" --schema ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).BeforeLast(' '))));
                         }
                         else
                         {
-                            cmd.Append(wxT(" --table ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' ')), true));
+                            cmd.Append(wxT(" --table ") + commandLineCleanOption(qtIdent(lstContents->GetText(sel, 1).AfterLast(' '))));
                         }
                     }
                     else
@@ -383,19 +383,19 @@
                     break;
                 }
                 case PGM_TABLE:
-                    cmd.Append(wxT(" --table ") + commandLineCleanOption(((pgTable*)object)->GetQuotedIdentifier(), true));
+                    cmd.Append(wxT(" --table ") + commandLineCleanOption(((pgTable*)object)->GetQuotedIdentifier()));
                     if (pgAppMinimumVersion(restoreExecutable, 8, 2))
                     {
-                        cmd.Append(wxT(" --schema ") + commandLineCleanOption(((pgTable*)object)->GetSchema()->GetQuotedIdentifier(), true));
+                        cmd.Append(wxT(" --schema ") + commandLineCleanOption(((pgTable*)object)->GetSchema()->GetQuotedIdentifier()));
                     }
                     break;
                 case PGM_FUNCTION:
                     cmd.Append(wxT(" --function '")
                         + commandLineCleanOption(((pgFunction*)object)->GetQuotedIdentifier()
-                        + wxT("(") + ((pgFunction*)object)->GetArgListWithNames() + wxT(")'"), true));
+                        + wxT("(") + ((pgFunction*)object)->GetArgListWithNames() + wxT(")'")));
                     if (pgAppMinimumVersion(restoreExecutable, 8, 2))
                     {
-                        cmd.Append(wxT(" --schema ") + commandLineCleanOption(((pgFunction*)object)->GetSchema()->GetQuotedIdentifier(), true));
+                        cmd.Append(wxT(" --schema ") + commandLineCleanOption(((pgFunction*)object)->GetSchema()->GetQuotedIdentifier()));
                     }
                     break;
                 default:
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to