Which character data type to use? - Mailing list pgsql-general

From martin.chantler@convergys.com
Subject Which character data type to use?
Date
Msg-id 852569B3.003CB88D.00@notes.cbis.com
Whole thread Raw
Responses Re: Which character data type to use?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general

Hello everyone,

For storing character data such as surname, email address which
is the best data type to use?

This is my guess:
Char - For small columns, fixed length in record
VarChar - Is this fixed length in record? If not then is it stored in an
'overflow' area
which will effect performance. Maybe theres an allocated length that sets how
much is stored in the record
Text - Only differences seems to be that no length is specified

Can each of these be indexed???

Which of these is fastest considering hard disks are so cheap I don't much care
about which takes the most bytes!

NB The HTML manual didn't seem to explain this in detail - can anyone help me?

Cheers,
MC



pgsql-general by date:

Previous
From: Peter T Mount
Date:
Subject: Re: Unanswered questions about Postgre
Next
From: Roger Wernersson
Date:
Subject: RE: Re: Unanswered questions about Postgre