Re: text vs varchar(n) - Mailing list pgsql-general

From Einar Karttunen
Subject Re: text vs varchar(n)
Date
Msg-id 20020218055439.GB6129@shellak.helsinki.fi
Whole thread Raw
In response to text vs varchar(n)  (Richard Emberson <emberson@phc.net>)
Responses Re: text vs varchar(n)  ("Robert Treat" <robertt@auctionsolutions.com>)
List pgsql-general
On 17.02.02 21:52 -0800(+0000), Richard Emberson wrote:
> Which is faster read and write, a table with text or varchar types:
>
> ...
>
> Why would one every use varchar(n) instead of text (aside from non-sql
> standard)?
>

Varchar(n) and text have the same performance. The difference is that
varchars are silently cut if they are longer than the limit specified.
In most cases you want to stick with text.

- Einar Karttunen

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: calculating spherical distance in sql
Next
From: "PG Explorer"
Date:
Subject: Re: Looking for a function