Thread: to text or not to text

to text or not to text

From
Vince Vielhaber
Date:
The docs say that the text type is the "Best choice" of the character data
types.  It was always my understanding that the text type was stored else-
where in the database and a pointer to it was stored in the actual table.
Does PostgreSQL do this or is a more efficient way been found?  It seems
that it'd be too expensive to store it elsewhere.   I'm making some changes
to a table and wanted to optomize it (varchar vs text).

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null      # include <std/disclaimers.h>
       TEAM-OS2       Online Campground Directory    http://www.camping-usa.com      Online Giftshop Superstore
http://www.cloudninegifts.com
==========================================================================




Re: [HACKERS] to text or not to text

From
Bruce Momjian
Date:
> 
> The docs say that the text type is the "Best choice" of the character data
> types.  It was always my understanding that the text type was stored else-
> where in the database and a pointer to it was stored in the actual table.
> Does PostgreSQL do this or is a more efficient way been found?  It seems
> that it'd be too expensive to store it elsewhere.   I'm making some changes
> to a table and wanted to optomize it (varchar vs text).

Internally, text is stored just like char().  Only large objects are
stored outside the database.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@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