Bug 5730 - [review] PostgreSQL 8.1 and above shows a lot of warnings "nonstandard use of \\ in a string literal at character ..." when using bayes
Summary: [review] PostgreSQL 8.1 and above shows a lot of warnings "nonstandard use of...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.2.3
Hardware: All All
: P1 minor
Target Milestone: 3.2.5
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: go
Keywords:
: 5299 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-24 14:27 UTC by Tomasz Ostrowski
Modified: 2009-09-27 17:40 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Use escape string syntax for backslashes for PostgreSQL 8.1 and later patch None Tomasz Ostrowski [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Ostrowski 2007-11-24 14:27:29 UTC
When using bayes storage using Mail::SpamAssassin::BayesStore::PgSQL module then
a Postgres server logs a lot of warnings:
WARNING:  nonstandard use of \\ in a string literal at character (...)
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.

I'll attach a patch that does just that - uses E'\\' syntax if database version
is at least 8.1.0.
Comment 1 Tomasz Ostrowski 2007-11-24 14:33:13 UTC
Created attachment 4193 [details]
Use escape string syntax for backslashes for PostgreSQL 8.1 and later
Comment 2 Michael Parker 2007-11-24 15:26:29 UTC
*** Bug 5299 has been marked as a duplicate of this bug. ***
Comment 3 Michael Parker 2007-11-25 23:27:14 UTC
Thanks for the patch.  I've applied it and tested it under 8.2 and 7.4.18.

Sending        lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
Transmitting file data .
Committed revision 598150.
Comment 4 Justin Mason 2008-05-14 02:14:17 UTC
reopening for application to 3.2.x, since debian and Ubuntu are now packaging it in their builds of 3.2.4...

my vote: +1
Comment 5 Daryl C. W. O'Shea 2008-05-25 14:11:10 UTC
+1
Comment 6 Justin Mason 2008-05-26 02:02:43 UTC
applied: 

: jm 95...; svn commit -m "bug 5730: when using Postgres >= 8.1.0 with Bayes, this error occurs: 'WARNING:  nonstandard use of \\ in a string literal at character'.  fix, thanks to Tomasz Ostrowski" lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
Sending        lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
Transmitting file data .
Committed revision 660135.