Tag: oo_pqsdbc_01
User: jbu     
Date: 2007-08-28 20:31:20+0000
Modified:
   dba/connectivity/source/drivers/postgresql/pq_tools.cxx

Log:
 #i80904# a single quote can now be escaped by a single quote within a single 
quoted constant

File Changes:

Directory: /dba/connectivity/source/drivers/postgresql/
=======================================================

File [changed]: pq_tools.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/postgresql/pq_tools.cxx?r1=1.1.2.8&r2=1.1.2.9
Delta lines:  +7 -1
-------------------
--- pq_tools.cxx        2007-02-15 20:04:48+0000        1.1.2.8
+++ pq_tools.cxx        2007-08-28 20:31:17+0000        1.1.2.9
@@ -442,7 +442,13 @@
         }
         else if( singleQuote )
         {
-            if( '\'' == c )
+            if( '\'' == c && '\'' == sql[i+1] )
+            {
+                // two subsequent single quotes within a quoted string
+                // mean a single quote within the string
+                i ++;
+            }
+            else if( '\'' == c )
             {
                 vec.push_back( rtl::OString( &sql[start], i - start +1 ) );
                 start = i + 1; // leave single quotes !




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to