Ensure the pgScript parser can correctly identify a comment on the end of the script...
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 11 Mar 2009 19:51:01 +0000 (19:51 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 11 Mar 2009 19:51:01 +0000 (19:51 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7681 a7884b65-44f6-0310-8a51-81a127f17b15

pgadmin/frm/frmQuery.cpp

index f2280049c170f0bfe3780b54d4a858b3e54b2e3c..78d7de3684d0696420b0628f68b36a5f92329ece 100644 (file)
@@ -1850,8 +1850,9 @@ void frmQuery::OnExecScript(wxCommandEvent& event)
     // Delete previous variables
     pgScript->ClearSymbols();
 
-    // Parse script
-    pgScript->ParseString(query, pgsOutput);
+    // Parse script. Note that we add \n so the parse can correctly identify 
+    // a comment on the last line of the query.
+    pgScript->ParseString(query + wxT("\n"), pgsOutput);
     pgsTimer->Start(20);
     aborted = false;
 }