Re: VARCHAR vs TEXT - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: VARCHAR vs TEXT
Date
Msg-id 200110161256.f9GCu4P07329@candle.pha.pa.us
Whole thread Raw
In response to Re: VARCHAR vs TEXT  (Vivek Khera <khera@kcilink.com>)
Responses Re: VARCHAR vs TEXT  (Vivek Khera <khera@kcilink.com>)
Re: VARCHAR vs TEXT  (Frank Bax <fbax@sympatico.ca>)
Re: VARCHAR vs TEXT  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
> >>>>> "BM" == Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 
> BM>     <P>CHAR() is best when storing strings that are usually the
> BM>     same length.  VARCHAR() is best when storing variable-length strings,
> BM>     but you want to limit how long a string can be.  TEXT is for strings
> BM>     of unlimited length, maximum 1 gigabyte.  BYTEA is for storing
> BM>     binary data, particularly values that include NULL bytes.</P>
> 
> Could you add the length limitation for TEXT to the reference manual?
> I searched high and low for that limit, but never found it.  Also,
> what's the max VARCHAR() or CHAR() I can create?  Is that also 1Gb?

TEXT limit is 1GB, as shown on the 'limits' FAQ item.  Is it worth
mentioning here?  CHAR()/VARCHAR() also 1GB limit.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: EXECUTE ... INTO?
Next
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: problem w/plpgsql proc