[TYPO3-dev] Question about rev. 2186: TINYTEXT columns to VARCHAR(255)

R. van Twisk typo3 at rvt.dds.nl
Thu Mar 29 22:30:36 CEST 2007


Mathias Behrle wrote:
> * R. van Twisk am Tue, 27 Mar 2007 11:35:54 -0500:
>
>   
>> Use TEXT unless you want to setup a constracint on the text size you 
>> want to storage. But since the TCA will setup that constraint for you. I would suggest 
>> using TEXT.
>>     
>
> That is basically exactly what I thought. 
>
>   
>> I believe 'we' had problems with oracle. Oracle uses NULL as a empty 
>> TEXT string (which is
>> different from heaving a TEXT string of 0 bytes, just to clarify).
>> But from PHP I don't think it's a big problem. NULL will be converted to 
>> a empty string whenever needed,
>> this is just a wild guess....
>>     
>
> AFAIS the problem was/is to compare NULL values, which gives undefined
> results. But I don't know, if this at least DBMS related issue is also
> relevant in PHP.
>   
It will only be a problem when you want to search for a empty string. I 
am not sure
where in core or extensions that will happen.

For now I  'think' we can use '' NOT NULL, which is the same as what 
mysql does.
And a empty string in PG is represented as a empty string anyways....

POLL:
How many people would like to use oracle if they knew it was easy to use 
oracle?
How many people would like to use PostgreSQL if they knew it was easy to 
use PostgreSQL?

For us we sticked to MySQL, but the company I am doing the work for love 
to have
typo3 running of oracle or postgresql (pg prevered).

>>> I suggest you change all '' to NULL.
>>>   
>>>       
>> This 'might' lead to problems... But I am not sure how TCA will behave.
>> a default '' NOT NULL follows a bit more what mysql does I think.
>>     
>
> So generally speaking it should be a suitable setup to have all text
> columns
> TEXT default '' NOT NULL
>   
yup... works the same as mysql.
> (at least for postgres).
> Wouldn't this be worth to be generally implemented by DBAL?
>
> Thanks a lot for your feedback!
>
> Mathias
> ___________


Ries





More information about the TYPO3-dev mailing list