From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Steinar H. Gunderson <sgunderson@bigfoot.com>
Cc: TNO <tnodev@free.fr>
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORMANCE] Beetwen text and varchar field
Date: Mon, 9 Jan 2006 18:50:31 -0500 (EST)
Message-ID: <200601092350.k09NoV022662@candle.pha.pa.us> (raw)
In-Reply-To: <20060109114940.GB28748@uio.no>
See the FAQ.
---------------------------------------------------------------------------
Steinar H. Gunderson wrote:
> On Mon, Jan 09, 2006 at 11:58:19AM +0100, TNO wrote:
> > what is the best for a char field with less than 1000 characters?
> > a text field or a varchar(1000)
>
> They will be equivalent. text and varchar are the same type internally -- the
> only differences are that varchar can have a length (but does not need one),
> and that some casts are only defined for text.
>
> If there's really a natural thousand-character limit to the data in question,
> use varchar(1000); if not, use text or varchar, whatever you'd like.
>
> /* Steinar */
> --
> Homepage: http://www.sesse.net/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: pgman@candle.pha.pa.us, sgunderson@bigfoot.com, tnodev@free.fr
Subject: Re: [PERFORMANCE] Beetwen text and varchar field
In-Reply-To: <200601092350.k09NoV022662@candle.pha.pa.us>
References: <20060109114940.GB28748@uio.no> <200601092350.k09NoV022662@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox