You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2020/09/07 14:43:21 UTC
VARCHAR vs LONGVARCHAR vs CLOB
Hi all,
while looking further into migration to 4.2 I noticed my model has several DbAttributes defined as CLOBs, leftovers from our previous database (Informix).
Since we have migrated to Postgres and these columns are now just regular varchar/text columns, I'm going to redefine them in the model as such. So I'm wondering, mainly out of curiosity; is there any difference in how fields of type VARCHAR and LONGVARCHAR are handled WRT Cayenne or should I just define everything as VARCHAR and forget about it?
Cheers,
- hugi
Re: VARCHAR vs LONGVARCHAR vs CLOB
Posted by Hugi Thordarson <hu...@karlmenn.is>.
>> should I just define everything as VARCHAR and forget about it?
>
> Yes. CLOBs have some special handling, which is irrelevant for Postgres.
Thanks, eliminated all those CLOBs and LONGVARCHARs and now it's just VARCHAR everywhere. Does wonders for my OCD :)
- hugi
>> On Sep 7, 2020, at 5:43 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>>
>> Hi all,
>> while looking further into migration to 4.2 I noticed my model has several DbAttributes defined as CLOBs, leftovers from our previous database (Informix).
>>
>> Since we have migrated to Postgres and these columns are now just regular varchar/text columns, I'm going to redefine them in the model as such. So I'm wondering, mainly out of curiosity; is there any difference in how fields of type VARCHAR and LONGVARCHAR are handled WRT Cayenne or should I just define everything as VARCHAR and forget about it?
>>
>> Cheers,
>> - hugi
Re: VARCHAR vs LONGVARCHAR vs CLOB
Posted by Andrus Adamchik <an...@objectstyle.org>.
> should I just define everything as VARCHAR and forget about it?
Yes. CLOBs have some special handling, which is irrelevant for Postgres.
> On Sep 7, 2020, at 5:43 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>
> Hi all,
> while looking further into migration to 4.2 I noticed my model has several DbAttributes defined as CLOBs, leftovers from our previous database (Informix).
>
> Since we have migrated to Postgres and these columns are now just regular varchar/text columns, I'm going to redefine them in the model as such. So I'm wondering, mainly out of curiosity; is there any difference in how fields of type VARCHAR and LONGVARCHAR are handled WRT Cayenne or should I just define everything as VARCHAR and forget about it?
>
> Cheers,
> - hugi