I should have known, there is simple solution. :-)
MH

Rob Hills wrote:
> 
> Hi Martin,
> 
> Martin Homik wrote:
>> Yesterday, I tried to run my AppFuse application with PostgreSQL instead
>> of
>> MySQL. I ran into a CLEAN_INSERT problem which was a result of an earlier
>> mistake. In MySQL I used a longtext type for a description field. This
>> type
>> corresponds to a column JPA annotation having a length attribute with the
>> value '2147483647'. Obviously, this value is too high. Note, the storage
>> required for a 'longtext' is L + 4 bytes, where L <  2^32. According to
>> PostgreSQL documentation "the longest possible character string that can
>> be
>> stored is about 1 GB".
>>
>> In a first solution, I removed the length attribute from the JPA
>> annotation.
>> PostgreSQL creates per default a
>> "character varying(255)" data type with a fixed limit of 255 characters.
>> On
>> the database level, it is possible to  omit the limit value, the system
>> takes then the maximum value. But, I do not know how to specify this in a
>> JPA annotation. Anyway, now, my AppFuse runs with PostgreSQL, too. 
>>
>> Well, that's it. I wanted to share this information with yopu as I could
>> not
>> find any other thread about that.
>>   
> I have used the JPA @Lob annotation (before @Column) in my current 
> project and that has resulted in a "text" type column in Postgresql.  
> According to the online docco for Postgres 8.0, the "text" datatype will 
> store strings up to "about 1GB" in length.  It has suited my purposes so 
> far in the areas I've used it.
> 
> HTH,
> 
> Rob Hills
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Switching-database%3A-MySQL---%3E-PostgreSQL-tf4941865s2369.html#a14156951
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to