Re: [Modeling-users] fetch qualifier problem
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-08-09 15:17:31
|
Sebastien Bigaret <sbi...@us...> wrote: > This is a problem w/ sqlite. The problem happens for '_' and '%', and I > can't even find out to do this on the sqlite commandline. I've just sent > the question to the sqlite ml, we'll see then. Two notes: - I added bug #785913 for this, - the Postgresql layer had the same pb. w/ '_' (was okay for '%'); I noticed this when writing the related test. This is fixed on CVS, and you'll find attached a patch correcting the bug. Regards, -- S=E9bastien. ------------------------------------------------------------------------ --- Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer/PostgresqlSQLExpressio= n.py3 Aug 2003 10:34:14 -0000 1.6 +++ Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer/PostgresqlSQLExpressio= n.py9 Aug 2003 15:10:11 -0000 1.7 @@ -27,11 +27,11 @@ =20 CVS information =20 - $Id: PostgresqlSQLExpression.py,v 1.6 2003/08/03 10:34:14 sbigaret Exp= $ + $Id: PostgresqlSQLExpression.py,v 1.7 2003/08/09 15:10:11 sbigaret Exp= $ =20=20=20 """ =20 -__version__=3D'$Revision: 1.6 $'[11:-2] +__version__=3D'$Revision: 1.7 $'[11:-2] =20 from Modeling.SQLExpression import SQLExpression, DateType, CharacterType import string @@ -115,8 +115,8 @@ Overrides default behaviour so that '%' is changed to '\\%' instead of '\%': postgresql interprets backslashes in strings """ - pattern=3Dpercent.sub('\\\\\\\\%', pattern) - pattern=3Dunderscore.sub('\_', pattern) + pattern=3Dpercent.sub(r'\\\\%', pattern) + pattern=3Dunderscore.sub(r'\\\\_', pattern) pattern=3Descaped_question_mark.sub(esc_question_tmp_replct, pattern) pattern=3Dquestion_mark.sub('_', pattern) pattern=3Descaped_star.sub(esc_star_tmp_replct, pattern) |