| From: | Thom Brown <thombrown(at)gmail(dot)com> |
|---|---|
| To: | Richard Huxton <dev(at)archonet(dot)com> |
| Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Varchar vs text |
| Date: | 2009-01-27 11:11:08 |
| Message-ID: | bddc86150901270311r39d6afe5gaf41c7d20833529@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I see. Thanks for clarifying!
Thom
2009/1/27 Richard Huxton <dev(at)archonet(dot)com>
> Thom Brown wrote:
> > The reason I ask is because the documentation says "If character varying
> is
> > used without length specifier, the type accepts strings of any size. The
> > latter is a PostgreSQL extension." I wasn't sure if such an extension
> meant
> > there was a level of over-head involved, or reduced its indexability.
>
> No - some other DBs might have different implementations (and so
> restrictions) but varchar and text are basically interchangeable. They
> are different types though, so if you add custom casts you might want to
> do it for both.
>
> There is a limit on btree index size - about 2000 chars if I remember
> correctly. That's because you need to fit three index values on an 8KB
> page iirc (and there are overheads too).
>
> --
> Richard Huxton
> Archonet Ltd
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Bartunov | 2009-01-27 11:11:10 | Re: Text search with ispell |
| Previous Message | Tommy Gildseth | 2009-01-27 11:06:43 | Re: Text search with ispell |