AnsweredAssumed Answered

Use 'text' instead of 'varchar' in PostgreSQL 9.x

Question asked by edsonrichter on Jun 4, 2016
Latest reply on Jun 6, 2016 by vasile.dirla
According to PostgreSQL mail developers, you can exchange all "varchar(…)" by text with advantages only (if should work even faster, because PostgreSQL doesn't need to enforce size).


Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

I'm running Activiti 5.20.0 with "text" instead "varchar", and have found no error so far.


Edson Richter