You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Andre Nicholson <an...@neo-anime.org> on 2005/08/16 15:21:04 UTC

Bayes SQL Error: Unterminated Quoted String

For the last several days, all messages scanned have not been using bayes because of an
error:

debug: bayes: tok_get: SQL Error: ERROR:  unterminated quoted string at or near "'" at
character 145
debug: bayes: _put_token: SQL Error: ERROR:  unterminated quoted string at or near "'"
at character 171
debug: bayes: tok_get: SQL Error: ERROR:  unterminated quoted string at or near
"'&#65533;" at character 145
debug: bayes: _put_token: SQL Error: ERROR:  unterminated quoted string at or near
"'&#65533;" at character 171
debug: bayes: tok_get: SQL Error: ERROR:  unterminated quoted string at or near "'&#190;8
$(D+*(B" at character 145
debug: bayes: _put_token: SQL Error: ERROR:  unterminated quoted string at or near "'&#19
0;8$(D+*(B" at character 171

This happens when scanning incoming messages and trying to sa-learn them manually. The
errors cause no tokens to be available and thus bayes is ignored. Other than reverting
to a backup of the database, is there something I can do or look at to fix this? I've
never seen this message before and have been storing bayes data in an SQL database since
SpamAssassin 3.0.

Running PostgreSQL 8.0.3 for bayes. SpamAssassin version 3.0.4, running on Perl version
5.8.0.

Thanks
Andre Nicholson


Re: Bayes SQL Error: Unterminated Quoted String

Posted by Andre Nicholson <an...@neo-anime.org>.
> Do not use 3.0 with PostgreSQL. It's known to have problems. Actually,
> the problem you're seeing might be DBD::Pg related. Did you possibly
> just install a new version? Make sure you are using the version listed
> in sql/README.bayes.

I haven't noticed anything out of the ordinary after I made the switch to SQL bayes,
that is, after I created a few indexes to help.

DBD::Pg is version 1.21. I haven't messed around with Perl settings or packages lately
to cause this. More than likely I've just now hit upon the bug described in this earlier
version of DBD::Pg in sql/README.bayes for some reason. But what is it about just lately
that's causing bayes to fail? Is it a record in a table that somehow was inserted that's
causing all subsequent lookups to fail?

> There is custom PostgreSQL support in 3.1, which just had RC1 released,
> you can try that one. It works very well and is 7-27x faster than the
> code in 3.0.

I read about the custom PostgreSQL support in the new SA and am very excited to hear
about it. I've been following some of the discussion about the problems with Postgres
support in 3.0 early on.

I'd would much rather wait until the production release of 3.1 -- and can live without
bayes for a while -- than running a RC in production.

Andre Nicholson


Re: Bayes SQL Error: Unterminated Quoted String

Posted by Michael Parker <pa...@pobox.com>.
Andre Nicholson wrote:

>This happens when scanning incoming messages and trying to sa-learn them manually. The
>errors cause no tokens to be available and thus bayes is ignored. Other than reverting
>to a backup of the database, is there something I can do or look at to fix this? I've
>never seen this message before and have been storing bayes data in an SQL database since
>SpamAssassin 3.0.
>
>Running PostgreSQL 8.0.3 for bayes. SpamAssassin version 3.0.4, running on Perl version
>5.8.0.
>
>  
>
Do not use 3.0 with PostgreSQL. It's known to have problems. Actually,
the problem you're seeing might be DBD::Pg related. Did you possibly
just install a new version? Make sure you are using the version listed
in sql/README.bayes.

There is custom PostgreSQL support in 3.1, which just had RC1 released,
you can try that one. It works very well and is 7-27x faster than the
code in 3.0.

Michael