Re: column size and storage efficiency - Mailing list pgsql-novice

From Tom Lane
Subject Re: column size and storage efficiency
Date
Msg-id 8761.1227712786@sss.pgh.pa.us
Whole thread Raw
In response to Re: column size and storage efficiency  (Bruce Hyatt <brucejhyatt@yahoo.com>)
List pgsql-novice
Bruce Hyatt <brucejhyatt@yahoo.com> writes:
> After thinking about it more, there can't be a direct relationship between number-of-characters and number-of-bits
butwhat I meant was, if varchar(14) fills a block of storage, does varchar(15) use 2 blocks? Does it use twice the
storage?

I think you still missed the point.  The *declared* size of a varchar
column isn't what determines storage usage, it's the *actual* size of
any particular value.  IOW, if all your strings are less than 15
characters, it makes no difference whether you declare the column
varchar(14), varchar(15), or varchar(6666).

            regards, tom lane

pgsql-novice by date:

Previous
From: Bruce Hyatt
Date:
Subject: Re: column size and storage efficiency
Next
From: "Pushpendra Singh Thakur"
Date:
Subject: PGCluster