Re: text vs varchar(n)

From: Einar Karttunen <ekarttun(at)cs(dot)helsinki(dot)fi>
To: Richard Emberson <emberson(at)phc(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: text vs varchar(n)
Date: 2002-02-18 05:54:39
Message-ID: 20020218055439.GB6129@shellak.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message PG Explorer 2002-02-18 06:01:53 Re: Looking for a function
Previous Message Richard Emberson 2002-02-18 05:52:30 text vs varchar(n)