During some recent testing I was getting:
'WARNING:  nonstandard use of \\ in a string literal'
'HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.'

I believe the query in question was not updated since PgSQL 7 times.

Patch attached, not heavily tested as I do not use PgSQL in production.
Maybe a dspam & PgQSL expert can check this. If PgSQL is constantly
issuing warnings, I can imagine that it slows it down a fraction.

Regards

Chris
diff -ru dspam-3.10.2+dfsg.orig/src/pgsql_drv.c dspam-3.10.2+dfsg/src/pgsql_drv.c
--- dspam-3.10.2+dfsg.orig/src/pgsql_drv.c    2013-06-06 18:03:11.000000000 +0200
+++ dspam-3.10.2+dfsg/src/pgsql_drv.c   2013-06-11 12:56:53.355966746 +0200
@@ -1537,7 +1537,7 @@
   }
 
   snprintf (scratch, sizeof (scratch),
		   -            "INSERT INTO dspam_signature_data (uid,signature,length,created_on,data) VALUES (%d,'%s',%lu,CURRENT_DATE,'",
		   +            "INSERT INTO dspam_signature_data (uid,signature,length,created_on,data) VALUES (%d,'%s',%lu,CURRENT_DATE,E'",
		                (int) p->pw_uid, sig_esc, (unsigned long) SIG->length);
   free(sig_esc);
      buffer_cat (query, scratch);

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to