| From: | Thom Brown <thombrown(at)gmail(dot)com> |
|---|---|
| To: | Ben Chobot <bench(at)silentmedia(dot)com> |
| Cc: | pgsql-general General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: text vs. varchar |
| Date: | 2010-07-21 16:05:00 |
| Message-ID: | AANLkTil--1uyVh-vCRrIsTwor-iNmWZwZaNH8H4OSLts@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 21 July 2010 16:58, Ben Chobot <bench(at)silentmedia(dot)com> wrote:
> Is there any difference between "text" and "varchar" data types? (Not varchar(n), just varchar.) I can't see a different from 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."
Thom
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ben Chobot | 2010-07-21 16:07:56 | Re: text vs. varchar |
| Previous Message | Peter C. Lai | 2010-07-21 16:04:48 | Re: text vs. varchar |