varchar/char size - Mailing list pgsql-hackers

From Bruce Momjian
Subject varchar/char size
Date
Msg-id 199801071742.MAA11441@candle.pha.pa.us
Whole thread Raw
Responses Re: [HACKERS] varchar/char size  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
Does someone want to remind me why we allocate the full size for char()
and varchar(), when we really can just allocate the size of the given
string?

I relize char() has to be padded, but why varchar()?

In my experience, char() is full size as defined by create, and
varchar() is the the size of the actual data in the field, like text,
but with a pre-defined limit.

--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] database size
Next
From: darrenk@insightdist.com (Darren King)
Date:
Subject: Re: [HACKERS] database size