Mark wrote:

> Gary,

>> ...you can set: $sa_spam_subject_tag = '***SPAM*** ';
>> if you have not already done so. In fact you may want to do this as an
>> alternative to setting this in SQL because the trailing space will get
>> trimmed from the SQL data (annoying).

> Oops, annoying indeed, thanks for pointing it out.

> from future 2.4.0 rel.notes:
> - new config variable $trim_trailing_space_in_lookup_result_fields controls
>   trimming of trailing whitespace from SQL fields, LDAP attribute values
>   and associative array righthand-sides (hash values) as read by read_hash();
>   enabled by default for compatibility; turn off to retain whitespace
>   in SQL fields such as '***SPAM*** ' in policy.spam_subject_tag2;
> Mark

I'm not sure, but I was under the impression that it is the varchar
data type that automatically trims trailing from the data in MySQL.

"Values in VARCHAR columns are variable-length strings. You can
declare a VARCHAR column to be any length between 1 and 255,
just as for CHAR columns. However, in contrast to CHAR,
VARCHAR values are stored using only as many characters
as are needed, plus one byte to record the length.
Values are not padded; instead, trailing spaces are
removed when values are stored. (This space removal
differs from the SQL-99 specification.) No case conversion
takes place during storage or retrieval."

So if this is the case, how would you determine if a trailing space
existed in the first place?

Gary V



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to