Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Improvement to acce...
 
Notifications
Clear all

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

2 Posts
2 Users
0 Reactions
3,436 Views
(@jean-luc)
Posts: 73
Active Member
Topic starter
 
[#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 !)


 
Posted : 06 Aug 2014 19H37
babynus
(@babynus)
Posts: 14966
Main Contributor 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


 
Posted : 13 Aug 2014 18H51
Share:

Scroll to Top