some clarifications inspired by the DocNotes

This commit is contained in:
Peter Eisentraut 2001-08-07 22:41:49 +00:00
parent 2cb95cd925
commit e29c16dc50

View File

@ -1,5 +1,5 @@
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.56 2001/06/18 19:05:11 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.57 2001/08/07 22:41:49 petere Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
@ -552,28 +552,24 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
<table tocentry="1"> <table tocentry="1">
<title>Character Types</title> <title>Character Types</title>
<tgroup cols="3"> <tgroup cols="2">
<thead> <thead>
<row> <row>
<entry>Type Name</entry> <entry>Type name</entry>
<entry>Storage</entry>
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry>character(n), char(n)</entry> <entry>character(<replaceable>n</>), char(<replaceable>n</>)</entry>
<entry>(4+n) bytes</entry>
<entry>Fixed-length blank padded</entry> <entry>Fixed-length blank padded</entry>
</row> </row>
<row> <row>
<entry>character varying(n), varchar(n)</entry> <entry>character varying(<replaceable>n</>), varchar(<replaceable>n</>)</entry>
<entry>(4+n) bytes</entry>
<entry>Variable-length with limit</entry> <entry>Variable-length with limit</entry>
</row> </row>
<row> <row>
<entry>text</entry> <entry>text</entry>
<entry>(4+n) bytes</entry>
<entry>Variable unlimited length</entry> <entry>Variable unlimited length</entry>
</row> </row>
</tbody> </tbody>
@ -624,9 +620,15 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
</para> </para>
<para> <para>
Refer to <xref linkend="sql-syntax-strings"> for information about The storage requirement for data of these types is 4 bytes plus
the syntax of string literals, and to <xref linkend="functions"> the actual string, and in case of <type>character</type> plus the
for information about available operators and functions. padding. Long strings will actually be compressed by the system
automatically. In any case, the longest possible character string
that can be stored is about 1 GB. (The maximum value that will be
allowed for <replaceable>n</> in the data type declaration is
actually larger than that. It wouldn't be very useful to change
this because with multi-byte character encodings the number of
characters and bytes can be quite different anyway.)
</para> </para>
<tip> <tip>
@ -637,6 +639,12 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
</para> </para>
</tip> </tip>
<para>
Refer to <xref linkend="sql-syntax-strings"> for information about
the syntax of string literals, and to <xref linkend="functions">
for information about available operators and functions.
</para>
<example> <example>
<title>Using the character types</title> <title>Using the character types</title>