james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo Gianferrari Pini <vincenzo.gianferrarip...@praxis.it>
Subject Re: bayesiananalysis and sql
Date Fri, 07 Jul 2006 12:49:00 GMT
I think that the "for bit" attribute is for bit strings, not character 

But perhaps VARCHAR in Derby is by default already case sensitive

Try defining "token" as a simple varchar, then feed some ham/spam and 
see in the database table if the tokens were stored preserving the case.


Norman Maurer wrote:

>should it not be:
>token varchar (128) for bit data NOT NULL default '',
>like descripted in 
>The VARCHAR FOR BIT DATA type allows you to store binary strings less
>than or equal to a specified length. It is useful for unstructured data
>where character strings are not appropriate (e.g., images). 
>length is an unsigned integer literal designating the length in bytes. 
>Unlike the case for the CHAR FOR BIT DATA type, there is no default
>length for a VARCHAR FOR BIT DATA type. The maximum size of the length
>value is 32,672 bytes.
>JDBC metadata type (java.sql.Types)
>VARCHAR FOR BIT DATA stores variable-length byte strings. Unlike CHAR
>FOR BIT DATA values, VARCHAR FOR BIT DATA values are not padded out to
>the target length.
>An operation on a VARCHAR FOR BIT DATA and a CHAR FOR BIT DATA value
>(e.g., a concatenation) yields a VARCHAR FOR BIT DATA value.
>The type of a byte literal is always a VARCHAR FOR BIT DATA, not a CHAR
>unfortaly it not work :-(
>javax.mail.MessagingException: Exception initializing queries;
>  nested exception is:
>        SQL Exception: Syntax error: Encountered "(" at line 4, column
>        at
>        at
>Am Freitag, den 07.07.2006, 09:48 +0200 schrieb Vincenzo Gianferrari
>>The reason is that I tried it only with those DBMSs. My understanding 
>>was that sqlRessources.xml is to be upgraded only when testing is done 
>>on a new DBMS, as you are now doing for derby.
>>I've added entries for all DBMSs for WhiteList stuff only because they 
>>were very trivial.
>>Instead, beware that the "token" field in both the bayesiananalysis_ham 
>>and the bayesiananalysis_spam tables*must allow for both uppercase and 
>>lowercase chars* ("binary" attribute in mysql and "COLLATE 
>>Latin1_General_CS_AS" in mssql), so each DBMS has to be correctly 
>>handled probably differently.
>>Norman Maurer wrote:
>>>Hi guys,
>>>is there an reason why in sqlRessources.xml is only support for mysql
>>>and mssql for bayesiananalysis ?
>>>I just notice it when i try to test it with derby.
>>To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>For additional commands, e-mail: server-dev-help@james.apache.org

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message