The documentation says: "If you desire to store long strings with no specific upper limit, use text or character varying without a length specifier, rather than making up an arbitrary length limit."
I do not remember if I read that or whether I made that up. Today was a day full of information. But as far as I understand it, an upper limit will be provided by the database when not defined in the database schema itself (written by the developer). Well, I am not an expert neither. I am a try-and-error guy trying to understand concepts in a practical way (and check the theory/literature afterwards). :-D See: http://www.postgresql.org/docs/8.2/static/datatype-character.html mraible wrote: > > > 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] > > > -- View this message in context: http://www.nabble.com/Switching-database%3A-MySQL---%3E-PostgreSQL-tf4941865s2369.html#a14156947 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]