From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: char o varchar |
Date: | 2003-09-17 15:08:57 |
Message-ID: | 20030917150857.GF2636@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Sep 17, 2003 at 09:11:54AM +0200, Andreas Fromm wrote:
> As of my knowlege, varchar as the choice when you have varying lenght
> strings, because only the real string lenght is stored in the db, while
> char is usefull when most of your records ar exactly the stringlenght
> defined by the column, because no overhead is to be kept for storing the
> actual stringlenght.
No, the overhead is present for char(n) as well, because it stores the
length in _bytes_ while the "n" is the length in characters; they could
be different.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
One man's impedance mismatch is another man's layer of abstraction.
(Lincoln Yeoh)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-09-17 15:12:07 | Re: State of Beta 2 |
Previous Message | Network Administrator | 2003-09-17 15:08:45 | Re: Database Recovery Procedures |