varchar vs. text

From: Rachit Siamwalla <rachit(at)ensim(dot)com>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: varchar vs. text
Date: 2001-07-10 21:37:22
Message-ID: 9AC41B8C4781464695BB013F106FCA31D2BE7C@nasdaq.ms.ensim.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Is there any good reason to use VARCHAR over TEXT for a string field? ie.
performance hits, etc.

Other than running into the row size limit problem, are there any large
storage / performance penalties of using TEXT for virtually all strings?

For ex. A phone number. This field probably wouldn't be bigger that 40
characters, but I can use TEXT and be sure that nothing gets truncated. Same
with a "name" field.

-rchit

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-07-10 21:38:38 Re: way to pass NEW into function
Previous Message Tom Lane 2001-07-10 21:36:47 Re: AW: pg_index.indislossy