Varchar vs varchar(64)

From: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Varchar vs varchar(64)
Date: 2008-10-21 12:07:31
Message-ID: 04A6DB42D2BA534FAC77B90562A6A03DAFA210@server.rad-con.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-10-21 12:10:00 Re: [HACKERS] Hot Standby utility and administrator functions
Previous Message Ivan Sergio Borgonovo 2008-10-21 11:20:12 exposing more parse was: Re: tsearch2: setting weights on tsquery