Commit d76eef3e authored by Bruce Momjian's avatar Bruce Momjian

Add mention of TOAST storage for character columns.

parent b3341ddb
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.94 2002/07/16 03:30:26 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.95 2002/07/16 04:45:59 momjian Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -843,19 +843,20 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl ...@@ -843,19 +843,20 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
</para> </para>
<para> <para>
The storage requirement for data of these types is 4 bytes plus The storage requirement for data of these types is 4 bytes plus the
the actual string, and in case of <type>character</type> plus the actual string, and in case of <type>character</type> plus the
padding. Long strings will be compressed by the system padding. Long strings are compressed by the system automatically, so
automatically, so the physical requirement on disk may be less. the physical requirement on disk may be less. Long values are also
In any case, the longest possible character string stored in background tables so they don't interfere with rapid
that can be stored is about 1 GB. (The maximum value that will be access to the shorter column values. In any case, the longest
allowed for <replaceable>n</> in the data type declaration is possible character string that can be stored is about 1 GB. (The
less than that. It wouldn't be very useful to change maximum value that will be allowed for <replaceable>n</> in the data
this because with multibyte character encodings the number of type declaration is less than that. It wouldn't be very useful to
characters and bytes can be quite different anyway. If you desire change this because with multibyte character encodings the number of
to store long strings with no specific upper limit, use <type>text</type> characters and bytes can be quite different anyway. If you desire to
or <type>character varying</type> without a length specifier, store long strings with no specific upper limit, use
rather than making up an arbitrary length limit.) <type>text</type> or <type>character varying</type> without a length
specifier, rather than making up an arbitrary length limit.)
</para> </para>
<tip> <tip>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment