TEXT datatype: compared to CHAR and VARCHAR

From: Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: TEXT datatype: compared to CHAR and VARCHAR
Date: 2001-11-23 12:43:15
Message-ID: 3BFE4463.8070500@ev.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all.

One quick question. I have a doubt, should I use CHAR/VARCHAR or TEXT
data types in my database?

Two points are of most concern:

- performance
- compatibility

Is VARCHAR faster for access/storing operations than TEXT? Since it
specifies the max. amount of space, one would think that it is better...

If I should choose to migrate my data to, say, Oracle, will TEXT field
cause problems in any way? I would have to rewrite the schema
definition, which can be painful for a larger database...

Your thoughts?

Nix.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hegyvari Krisztian 2001-11-23 12:49:26 rollback question
Previous Message Johnny Jørgensen 2001-11-23 11:16:31 error using pl/pgsql? [possibly off topic]