Which character data type to use?

From: martin(dot)chantler(at)convergys(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Which character data type to use?
Date: 2000-12-12 11:01:53
Message-ID: 852569B3.003CB88D.00@notes.cbis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roger Wernersson 2000-12-12 11:04:46 RE: Re: Unanswered questions about Postgre
Previous Message Peter T Mount 2000-12-12 11:00:20 Re: Unanswered questions about Postgre