bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, GDL2, PostgreSQLExpression (+formatValue:forAttribute:)


From: Georg Fleischmann
Subject: Fix, GDL2, PostgreSQLExpression (+formatValue:forAttribute:)
Date: Mon, 1 Jun 2009 12:36:32 +0800


here is a small suggestion for GDL2 (with PostgreSQL 8.3). PostgreSQL is complaining about escaping the underscore "_" character.
I removed the escaping the underscore and everything looks fine.

2009-05-29 13:51:38.772 Import[3297] PostgreSQLAdaptor: execute command:
SELECT t0.entity_name FROM unique_key t0 WHERE t0.entity_name = 'serial\_number'
WARNING:  nonstandard use of escape in a string literal
LINE 1: ...ty_name FROM unique_key t0 WHERE t0.entity_name = 'serial \_n...


Best wishes,
Georg Fleischmann


*** EOAdaptors/PostgreSQLAdaptor/PostgreSQLExpression.m.old 2008-04-04 13:30:41.000000000 +0800 --- EOAdaptors/PostgreSQLAdaptor/PostgreSQLExpression.m 2009-05-29 14:16:51.000000000 +0800
***************
*** 343,360 ****
              {
                switch (tempString[i])
                  {
!               case '\'':
!                 [string insertString: @"'" atIndex: dif + i];
                    dif++;
                    break;
                  case '\\':
                    [string insertString: @"\\" atIndex: dif + i];
                    dif++;
                    break;
!                 case '_':
!                   [string insertString: @"\\" atIndex: dif + i];
!                   dif++;
!                   break;
                  default:
                    break;
                  }
--- 343,360 ----
              {
                switch (tempString[i])
                  {
!                 case '\'':
!                   [string insertString: @"'" atIndex: dif + i];
                    dif++;
                    break;
                  case '\\':
                    [string insertString: @"\\" atIndex: dif + i];
                    dif++;
                    break;
!                 //case '_':
!                 //  [string insertString: @"\\" atIndex: dif + i];
!                 //  dif++;
!                 //  break;
                  default:
                    break;
                  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]