Add support for direct debugging of functions with variadic parameters.
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 7 Jan 2009 15:54:36 +0000 (15:54 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 7 Jan 2009 15:54:36 +0000 (15:54 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7540 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
docs/en_US/debugger.html
pgadmin/debugger/dbgTargetInfo.cpp
pgadmin/debugger/dlgDirectDbg.cpp

index 8fbf87bcd9fed4f1bea6758ced0191275d752452..cccac07aafee2936308f8eadd00f5cd3c175fcfe 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,8 @@ Changes
 \r
 Date       Dev Ver    Change details\r
 ---------- --- -----  --------------\r
+2008-01-07 DP  1.9.0  Add support for direct debugging of functions with\r
+                      variadic parameters.\r
 2008-01-05 GL  1.9.0  Add -S and -Sc command line options to open a server\r
                       status window\r
 2009-01-01 DP  1.9.0  Add support for the many new node types in Postgres 8.4\r
index e17cb8a225ad08ec75c32f8884eb2879f35971d8..0224e0f0555129c4db4120f51564a933e10b0900 100644 (file)
@@ -40,7 +40,9 @@ of executable code.</p>
 <p>When entering parameter values, type the value into the appropriate cell\r
 on the grid, or, leave the cell empty to represent NULL, enter '' (two single \r
 quotes) to represent an empty string, or to enter a literal string consisting \r
-of just two single quotes, enter \'\'.</p>\r
+of just two single quotes, enter \'\'. PostgreSQL 8.4 and above supports\r
+variadic function parameters. These may be entered as a comma-delimited list\r
+of values, quoted and/or cast as required.</p>\r
 \r
 <p>Once the debugger session has started you can step through the code using\r
 the menu options, keyboard shortcuts or toolbar buttons. Breakpoints may be \r
index 9a0d351174a463ca9446c52a7bce64080c1ae8dc..4672008823165c39025832a22bc719f4810afc76 100644 (file)
@@ -215,7 +215,7 @@ const wxString wsArgInfo::quoteValue()
     else if (m_value == wxT("\\'\\'"))
         return (wxT("'\\'\\''"));
     else if (m_value[0] == '\'' )
-       return(m_value);
+       return (m_value);
     else
        return(wxString(wxT("'") + m_value + wxT("'")));
 }
index 4e37f37be22f67a5b11b43206cafc4c85331b469..f433982016df786d9bf0b1d03ce9911b54ba749a 100644 (file)
@@ -247,7 +247,13 @@ void dlgDirectDbg::populateParamGrid( )
         {
             grdParams->AppendRows( 1 );
             grdParams->SetCellValue( i, COL_NAME,  arg.getName());
-            grdParams->SetCellValue( i, COL_TYPE,  arg.getType());
+
+                       // Make it obvious which are variadics
+                       if (arg.getMode() != wxT( "v" ))
+                grdParams->SetCellValue( i, COL_TYPE,  arg.getType());
+                       else
+                grdParams->SetCellValue( i, COL_TYPE, arg.getType() + wxT(" VARIADIC"));
+
             grdParams->SetCellValue( i, COL_VALUE, arg.getValue());
         
             grdParams->SetReadOnly( i, COL_NAME,  true );
@@ -657,8 +663,11 @@ void dlgDirectDbg::invokeTargetStatement()
             if (!m_targetInfo->getIsFunction() || m_targetInfo->getLanguage() == wxT("edbspl"))
                 query.Append( wxT("NULL::") + arg.getType() + wxT(", "));
         }
-        else
+        else if(arg.getMode() == wxT("v"))
+                       query.Append( arg.getValue() + wxT(", "));
+               else
             query.Append( arg.quoteValue() + wxT("::") + arg.getType() + wxT(", "));
+                       
     }
 
     if (query.EndsWith(wxT(", ")))