On Dec 4, 2007, at 1:02 AM, 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.

No, I don't believe this is possible. I'm not a database expert though - I just play one in open source projects. ;-)

Matt

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.
--
View this message in context: http://www.nabble.com/Switching- database%3A-MySQL---%3E-PostgreSQL-tf4941865s2369.html#a14146912
Sent from the AppFuse - User mailing list archive at Nabble.com.

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


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

Reply via email to