Re: text vs. varchar - Mailing list pgsql-general

From Ben Chobot
Subject Re: text vs. varchar
Date
Msg-id 0FE2174F-612E-4B21-8756-E539AB2B4619@silentmedia.com
Whole thread Raw
In response to Re: text vs. varchar  (Thom Brown <thombrown@gmail.com>)
List pgsql-general
On Jul 21, 2010, at 9:05 AM, Thom Brown wrote:

> On 21 July 2010 16:58, Ben Chobot <bench@silentmedia.com> wrote:
>> Is there any difference between "text" and "varchar" data types? (Not varchar(n), just varchar.) I can't see a
differentfrom the manual page, but I'm wondering about index usage or something similarly subtle. 
>> --
>
> Here's what Tom Lane had to say on the matter when I asked previously:
>
> "There is some potential overhead from using varchar instead of text
> because of the extra dummy cast nodes that are likely to be present in
> your query expressions (since all the native functions are declared to
> take/return text, not varchar).  In most cases I'd think you'd be
> hard-put to measure any difference though."


Thanks, this is precisely what I was looking for.

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Re: text vs. varchar
Next
From: Pierre Racine
Date:
Subject: Re: locating cities within a radius of another