Varchar vs varchar(64) - Mailing list pgsql-general

From Rob Richardson
Subject Varchar vs varchar(64)
Date
Msg-id 04A6DB42D2BA534FAC77B90562A6A03DAFA210@server.rad-con.local
Whole thread Raw
In response to How to free disk space  ("Ruben Blanco" <rubenblan@gmail.com>)
Responses Re: Varchar vs varchar(64)  ("Philip W. Dalrymple" <pwd@mdtsoft.com>)
Re: Varchar vs varchar(64)  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
Greetings!
 
The database we install at our customers as part of our product includes an event_history table.  For some reason lost in the mists of time, the most important field in that table, the description, is a varchar field specified to be only 64 characters long.  This leads me to a more fundamental question:  why specify the length of a varchar field at all?  Is there a big difference between the amount of disk space taken up by "abc" stored in a varchar(64) field and stored in a varchar field?  How much space does an unspecified-length varchar field take up?  Are there other reasons to use varchar(64) instead of varchar?
 
Thank you very much!
 
RobR
 

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: exposing more parse was: Re: tsearch2: setting weights on tsquery
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Hot Standby utility and administrator functions