|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
WARNING: nonstandard use of \' in a string literalIn my logs I am seeing lots of -
<quote> Jul 02 18:20:57 ogo-zidestore-1.5 [24907]: <0x0x86e6d84[PostgreSQL72Channel]: connection=<0x0x86e6f84[PGConnection]: connection=0x0x86e7648>>: message: WARNING: nonstandard use of \' in a string literal LINE 1: ...endar_name = null, object_version = 7, location = '\'Locatio... ^ HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...'). Jul 02 18:20:57 ogo-zidestore-1.5 [24907]: <0x0x86e6d84[PostgreSQL72Channel]: connection=<0x0x86e6f84[PGConnection]: connection=0x0x86e7648>>: message: WARNING: nonstandard use of \' in a string literal LINE 1: ...t_version = 7, location = '\'Location\'', title = '\'Title \'... ^ HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...'). </quote> I assume this escaping is happening in the PostgreSQL adapter? Would it be acceptable to revise this behaviour? This works but with warnings <quote> UPDATE date_x SET sensitivity = null, importance = null, end_date = '2008-07-08 08:00:00-0000', parent_date_id = null, db_status = 'updated', apt_type = null, is_absence = null, start_date = '2008-07-08 07:00:00-0000', is_conflict_disabled = null, keywords = null, is_attendance = null, online_meeting = null, busy_type = null, type = null, resource_names = null, calendar_name = null, object_version = 7, location = '\'Location\'', title = '\'Title\'\'\'', cycle_end_date = null, notification_time = null, absence = null, write_access_list = null, associated_contacts = null, evo_reminder = null, source_url = null, ol_reminder = null, last_modified = 1215022857.200483, fbtype = null WHERE owner_id=10102 AND date_id=11162 AND object_version=7 AND access_team_id IS null; WARNING: nonstandard use of \' in a string literal LINE 1: ...endar_name = null, object_version = 7, location = '\'Locatio... ^ HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...'). WARNING: nonstandard use of \' in a string literal LINE 1: ...t_version = 7, location = '\'Location\'', title = '\'Title \'... ^ HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...'). UPDATE 1 </quote> This works, without warnings <quote> UPDATE date_x SET sensitivity = null, importance = null, end_date = '2008-07-08 08:00:00-0000', parent_date_id = null, db_status = 'updated', apt_type = null, is_absence = null, start_date = '2008-07-08 07:00:00-0000', is_conflict_disabled = null, keywords = null, is_attendance = null, online_meeting = null, busy_type = null, type = null, resource_names = null, calendar_name = null, object_version = 7, location = '''Location''', title = '''Title''''', cycle_end_date = null, notification_time = null, absence = null, write_access_list = null, associated_contacts = null, evo_reminder = null, source_url = null, ol_reminder = null, last_modified = 1215022857.200483, fbtype = null WHERE owner_id=10102 AND date_id=11162 AND object_version=7 AND access_team_id IS null; UPDATE 1 </quote> -- OpenGroupware.org Developer developer@... http://mail.opengroupware.org/mailman/listinfo/developer |
|
|
Re: WARNING: nonstandard use of \' in a string literal> connection=<0x0x86e6f84[PGConnection]: connection=0x0x86e7648>>:
> message: WARNING: nonstandard use of \' in a string literal > LINE 1: ...t_version = 7, location = '\'Location\'', title = '\'Title > \'... ^ > HINT: Use '' to write quotes in strings, or use the escape string > syntax (E'...'). > </quote> > I assume this escaping is happening in the PostgreSQL adapter? Would it > be acceptable to revise this behaviour? awilliam@linux-nnci:~/Works/OpenGroupware/sope> svn diff sope-gdl1/PostgreSQL/NSString+PGVal.m Index: sope-gdl1/PostgreSQL/NSString+PGVal.m =================================================================== --- sope-gdl1/PostgreSQL/NSString+PGVal.m (revision 1622) +++ sope-gdl1/PostgreSQL/NSString+PGVal.m (working copy) @@ -102,7 +102,7 @@ s = [self stringByReplacingString:@"\\" withString:@"\\\\"]; if (EOExprClass == Nil) EOExprClass = [EOQuotedExpression class]; - expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" escape:@"\\'"]; + expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" escape:@"''"]; s = [[expr expressionValueForContext:nil] retain]; [expr release]; return [s autorelease]; -- OpenGroupware.org Developer developer@... http://mail.opengroupware.org/mailman/listinfo/developer |
|
|
Re: WARNING: nonstandard use of \' in a string literalOn 02.07.2008, at 20:33, Adam Tauno Williams wrote:
>> HINT: Use '' to write quotes in strings, or use the escape string >> syntax (E'...'). >> </quote> >> I assume this escaping is happening in the PostgreSQL adapter? >> Would it >> be acceptable to revise this behaviour? > if (EOExprClass == Nil) EOExprClass = [EOQuotedExpression class]; > - expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" > escape:@"\\'"]; > + expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" > escape:@"''"]; Applied. Greets, Helge -- http://helgehess.eu/ -- OpenGroupware.org Developer developer@... http://mail.opengroupware.org/mailman/listinfo/developer |
|
|
Re: WARNING: nonstandard use of \' in a string literalOn Thu, 2008-07-03 at 16:15 +0200, Helge Hess wrote:
> On 02.07.2008, at 20:33, Adam Tauno Williams wrote: > >> HINT: Use '' to write quotes in strings, or use the escape string > >> syntax (E'...'). > >> </quote> > >> I assume this escaping is happening in the PostgreSQL adapter? > >> Would it > >> be acceptable to revise this behaviour? > > if (EOExprClass == Nil) EOExprClass = [EOQuotedExpression class]; > > - expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" > > escape:@"\\'"]; > > + expr = [[EOExprClass alloc] initWithExpression:s quote:@"'" > > escape:@"''"]; > Applied. Thanks. -- OpenGroupware.org Developer developer@... http://mail.opengroupware.org/mailman/listinfo/developer |
| Free Forum Powered by Nabble | Forum Help |