Forum

Improvement to acce...
 
Notifications
Retirer tout

Improvement to accept 'text' format for huge comments and so on

2 Posts
2 Utilisateurs
0 Reactions
3,402 Vu
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 
[#1938]

At now, all description an comment fileds are defined as 'varchar(4000)'. That is too short (I had to import text until >32k chars).

So I added some lines in ./view/objetctDetail.php (between lines 380 and 381)
from

(…)
			$dataLength = $obj->getDataLength($col);
			//echo $col . "/" . $dataType . "/" . $dataLength;
			if ($dataLength) {
(…)

to

(…)
			$dataLength = $obj->getDataLength($col);
			//echo $col . "/" . $dataType . "/" . $dataLength;
			if ($dataType=='text')
				$dataLength = 65535 ;
			else if ($dataType=='mediumtext')
				$dataLength = 16777215 ;
			if ($dataLength) {
(…)

This change allows to change any field format from 'varchar(4000)' to 'text' or 'medium text', the second one offering until several millions characters for texts.

Very easy to apply, and doesn't cost anything !

(At now, I have several fields added or so altered, and a lot of lines containing texts with more than ten thousand characters. All works fine !)


 
Posté : 6 Août PM 19:088
(@babynus)
Posts: 14952
Membre Admin
 

Thanks for the proposal.
I recorded a ticket for this purpose.

Nb :
1) not sure to implement it in onjectDatail.php, possibly better to do this directly in SqlElement::getDatalength()
2) Will have to check the impact on PostgreSql


 
Posté : 13 Août PM 18:088
Share:
Retour en haut