Chris Browne cbbrowne at lists.slony.info
Tue May 13 14:42:01 PDT 2008
Update of /home/cvsd/slony1/slony1-engine/src/slony_logshipper
In directory main.slony.info:/tmp/cvs-serv18369

Modified Files:
	scan.l 
Log Message:
Per bug #49 - reported by Richard Yen <dba at richyen.com>

Seems like double single-quotes and slashes are begin converted to single
single-quotes and slashes when not desired:

ERROR 2008-04-24 16:17:32 > PGRES_FATAL_ERROR: ERROR:  syntax error at or near
"Cahier"
LINE 1: ..._count, compare_to_database) values ('1969048', ''Cahier d'u...
                                                            ^
Query was: insert into "public"."m_object_paper" (id, title, x_firstname,
x_lastname, char_length, word_count, grade, grade_note, overwriteflag,
is_indexed, folder, "assignment", "owner", node, page_count,
compare_to_database) values ('1969048', ''Cahier d'un retour au pays natal' is
prinicpally defined by violence. Discuss', 'Charlotte', 'Byrne', '10937',
'1689', NULL, NULL, 't', 'f', '0', '88981', '445800', '2', NULL,
'1000100000000000000000100000000000101');
WARN  2008-04-24 16:17:32 > waiting for resume

My fix for this was in scan.l:175
+                            *cp++ = c;
                             *cp++ = c;
+                           len += 2;
-                           len++;

Similar changes at lines 191, 244, and 260 



Index: scan.l
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slony_logshipper/scan.l,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** scan.l	9 Sep 2007 02:37:05 -0000	1.2
--- scan.l	13 May 2008 21:41:59 -0000	1.3
***************
*** 176,180 ****
  							}
  							*cp++ = c;
! 							len++;
  							continue;
  						}
--- 176,180 ----
  							}
  							*cp++ = c;
! 							len+=2;
  							continue;
  						}
***************
*** 192,196 ****
  							{
  								*cp++ = c;
! 								len++;
  								continue;
  							}
--- 192,196 ----
  							{
  								*cp++ = c;
! 								len+=2;
  								continue;
  							}
***************
*** 245,249 ****
  							}
  							*cp++ = c;
! 							len++;
  							continue;
  						}
--- 245,249 ----
  							}
  							*cp++ = c;
! 							len+=2;
  							continue;
  						}
***************
*** 261,265 ****
  							{
  								*cp++ = c;
! 								len++;
  								continue;
  							}
--- 261,265 ----
  							{
  								*cp++ = c;
! 								len+=2;
  								continue;
  							}



More information about the Slony1-commit mailing list