On Thu, 21 Mar 2013 03:07:44 +0000, Walter Hurry wrote: > On Tue, 19 Mar 2013 19:22:49 +0000, Walter Hurry wrote: > >> I am experimenting with using SQLite for my Bayes db. >> >> However when I start spamd, it reports the following in >> /var/log/maillog: >> >> bayes: tok_get_all: SQL error: no such function: RPAD >> >> This is correct, in that SQLite does not support RPAD. >> >> I believe this call is in SQL.pm (part of >> Mail::SpamAssassin::BayesStore). >> Is it possible to hack that module in any way to work around the issue? >> >> Sorry if this is too simple a question; whilst I am familiar with SQL, >> I know nothing of perl. >> >> In case it matters, this is SA 3.3.2 > > It looks to be solved by hacking SQL.pm. I'll report back in a day or so > in case anyone is interested.
Yes, I changed the (SQL.pm) line in sub _token_select_string from: return "RPAD(token, 5, ' ')"; to: return "SUBSTR(token || ' ', 1, 5)"; and all seems to be working according to plan now.