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

Mathias Behrle expi311203 at gmx.de
Fri Mar 23 13:35:53 CET 2007


I just wanted to update my postgres schema to the changes of rev. 2186:
Replace all TINYTEXT columns with VARCHAR(255)

My question is:
Does it explicitly have to be varchar(255) DEFAULT '' NOT NULL for the
new data type or could/should it also be TEXT ?

Background:
1) I have already NULL values in some of these fields, that were until
now bytea in postgres. Since DBAL until now maps fields of type
text NOT NULL to just text, it should be possible to keep the NULL
values. 

2) more important:
the postgres manual says:
 There are no performance differences between these three types
 (the different character types), apart
 from the increased storage size when using the blank-padded type. While
 character(n) has performance advantages in some other database systems,
 it has no such advantages in PostgreSQL. In most situations text or
 character varying should be used instead.

OTOH I read in the thread
http://lists.netfielders.de/pipermail/typo3-team-core/2006-June/004733.html
that for matters of string comparison there shouldn't be any NULL values
in text fields. 

So please could someone shed a little light if

1)  varchar(255) was used in this case for just performance purposes of
mysql

2) text fields in postgres should have as well as varchar some default
('') inserted, which is currently not the case

Thanks a lot for your input,
Mathias







More information about the TYPO3-dev mailing list