You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rupa Schomaker <ru...@rupa.com> on 2004/11/18 02:09:18 UTC

sa-learn --import with postgresql

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ran into a problem importing into postgres.  Running with -D didn't help
other than pinpointing to a problem while importing msgids.  postgres
logs showed:

2004-11-17 16:20:41 [14205] ERROR:  value too long for type character
varying(200)

The bayes_seen table has msgid as a varchar(200).

Changing it to 'test' fixed it for me.  Either spamassassin should
truncate or the underlying datatype should be larger or the error should
be handled better.  (import failed and deleted everything)

I didn't check behavior for learning a single message with a long msgid.

- --
 -Rupa

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBm/Y+L3Aub+krmycRAjinAJ9QT2GiloxiOJUGKj+LoApL4H107gCgna1I
E1rStCZD404TtTv6jnRtpMc=
=rHdq
-----END PGP SIGNATURE-----


Re: sa-learn --import with postgresql

Posted by Rupa Schomaker <ru...@rupa.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Rupa Schomaker wrote:
[snip]

> 2004-11-17 16:20:41 [14205] ERROR:  value too long for type character
> varying(200)
> 
> The bayes_seen table has msgid as a varchar(200).
> 
> Changing it to 'test' fixed it for me.  Either spamassassin should

err, changing to type 'text' fixed it for me.

[snip]

After the import, there were 5 rows with msgid > 200:

4 like:
%RNDDIGIT36%RNDLCCHAR13%RNDDIGIT13%RNDLCCHAR13...

1 like:
jughvuuvygvi5zRhsptNPX[lots of spaces]@[lots of spaces]hotmail.com

Note that mysql truncates long values silently so is not affected by
this.  Other databases most probably behave like postgres.

- --
 -Rupa

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBm/p5L3Aub+krmycRAl/3AJ9T1C8Rm7EnMaFdbHQQHkbPbghJiQCeJJAD
0kPV1gOlw1AB0ffIDDVJgJE=
=sLKr
-----END PGP SIGNATURE-----