Character will use more disk space than varchar
so it does make a difference. http://www.postgresql.org/docs/8.3/interactive/datatype-character.html Values of type character are physically
padded with spaces to the specified width n, and are stored and displayed that
way. However, the padding spaces are treated as semantically insignificant.
Trailing spaces are disregarded when comparing two values of type character,
and they will be removed when converting a character value to one of the other
string types. Note that trailing spaces are semantically significant in
character varying and text values. Jon From:
pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Mike Gould We are converting our system from using Sybase's SQL
Anywhere 10 to PostGres 8.3. In SQL Anywhere there technically isn't any
difference in how a char and varchar is stored. They are all an array of
char[1]. So we always just defined everything as a char since right truncation
is the default. |