Skip to content

Commit 4976816

Browse files
committed
Improve CHAR() description.
1 parent 19b8863 commit 4976816

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/FAQ

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated: Tue Dec 17 23:56:27 EST 2002
4+
Last updated: Sun Jan 12 00:16:01 EST 2003
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -834,13 +834,14 @@ BYTEA bytea variable-length byte array (null-byte safe)
834834
space used is slightly greater than the declared size. However, these
835835
data types are also subject to compression or being stored out-of-line
836836
by TOAST, so the space on disk might also be less than expected.
837-
838-
CHAR(n) is best when storing strings that are usually the same length.
839837
VARCHAR(n) is best when storing variable-length strings but it limits
840838
how long a string can be. TEXT is for strings of unlimited length,
841-
maximum 1 gigabyte. BYTEA is for storing binary data, particularly
842-
values that include NULL bytes. These types have similar performance
843-
characteristics.
839+
maximum 1 gigabyte.
840+
841+
CHAR(n) is for storing strings that are all the same length. CHAR(n)
842+
stores trailing spaces, while VARCHAR(n) trims them. BYTEA is for
843+
storing binary data, particularly values that include NULL bytes.
844+
These types have similar performance characteristics.
844845

845846
4.15.1) How do I create a serial/auto-incrementing field?
846847

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy