aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-01-12 05:16:12 +0000
committerBruce Momjian <bruce@momjian.us>2003-01-12 05:16:12 +0000
commit4976816b03276284eb84988079310ea293d0a77a (patch)
tree439e0ca236385acb907416bbcc23c84b1bc9edc4
parent19b886332a76f6b1141a7c1ca1d9eacaa8ef40d2 (diff)
downloadpostgresql-4976816b03276284eb84988079310ea293d0a77a.tar.gz
postgresql-4976816b03276284eb84988079310ea293d0a77a.zip
Improve CHAR() description.
-rw-r--r--doc/FAQ13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/FAQ b/doc/FAQ
index fe501354485..79ec889a168 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
Frequently Asked Questions (FAQ) for PostgreSQL
- Last updated: Tue Dec 17 23:56:27 EST 2002
+ Last updated: Sun Jan 12 00:16:01 EST 2003
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@@ -834,13 +834,14 @@ BYTEA bytea variable-length byte array (null-byte safe)
space used is slightly greater than the declared size. However, these
data types are also subject to compression or being stored out-of-line
by TOAST, so the space on disk might also be less than expected.
-
- CHAR(n) is best when storing strings that are usually the same length.
VARCHAR(n) is best when storing variable-length strings but it limits
how long a string can be. TEXT is for strings of unlimited length,
- maximum 1 gigabyte. BYTEA is for storing binary data, particularly
- values that include NULL bytes. These types have similar performance
- characteristics.
+ maximum 1 gigabyte.
+
+ CHAR(n) is for storing strings that are all the same length. CHAR(n)
+ stores trailing spaces, while VARCHAR(n) trims them. BYTEA is for
+ storing binary data, particularly values that include NULL bytes.
+ These types have similar performance characteristics.
4.15.1) How do I create a serial/auto-incrementing field?