2022-12-24 17:15:58 +00:00
|
|
|
Index: lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
|
|
|
|
===================================================================
|
|
|
|
--- lib/Mail/SpamAssassin/BayesStore/PgSQL.pm.orig
|
|
|
|
+++ lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
|
|
|
|
@@ -987,7 +987,7 @@ sub _put_token {
|
2006-12-22 09:47:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
my $escaped_token = _quote_bytea($token);
|
2010-03-18 17:42:08 +00:00
|
|
|
- my $sth = $self->{_dbh}->prepare("select put_tokens($self->{_userid}, $self->{_esc_prefix}'{$escaped_token}', $spam_count,$ham_count,$atime)");
|
|
|
|
+ my $sth = $self->{_dbh}->prepare("select put_tokens($self->{_userid}, $self->{_esc_prefix}'{$escaped_token}'::bytea[], $spam_count,$ham_count,$atime)");
|
2006-12-22 09:47:22 +00:00
|
|
|
|
|
|
|
unless (defined($sth)) {
|
2010-03-18 17:42:08 +00:00
|
|
|
dbg("bayes: _put_token: SQL error: ".$self->{_dbh}->errstr());
|
2022-12-24 17:15:58 +00:00
|
|
|
@@ -1050,7 +1050,7 @@ sub _put_tokens {
|
2006-12-22 09:47:22 +00:00
|
|
|
|
|
|
|
my $tokenarray = join(",", map { '"' . _quote_bytea($_) . '"' } sort keys %{$tokens});
|
|
|
|
|
2010-03-18 17:42:08 +00:00
|
|
|
- my $sth = $self->{_dbh}->prepare("select put_tokens($self->{_userid}, $self->{_esc_prefix}'{$tokenarray}', $spam_count, $ham_count, $atime)");
|
|
|
|
+ my $sth = $self->{_dbh}->prepare("select put_tokens($self->{_userid}, $self->{_esc_prefix}'{$tokenarray}'::bytea[], $spam_count, $ham_count, $atime)");
|
2006-12-22 09:47:22 +00:00
|
|
|
|
|
|
|
unless (defined($sth)) {
|
2010-03-18 17:42:08 +00:00
|
|
|
dbg("bayes: _put_tokens: SQL error: ".$self->{_dbh}->errstr());
|