to text or not to text

Started by Vince Vielhaberalmost 27 years ago2 messages
#1Vince Vielhaber
vev@michvhf.com

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
==========================================================================

#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Vince Vielhaber (#1)
Re: [HACKERS] to text or not to text

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, Pennsylvania 19026