Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4976816

Browse files
committed
Improve CHAR() description.
1 parent19b8863 commit4976816

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 EST2002
4+
Last updated:Sun Jan 12 00:16:01 EST2003
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)

[8]ページ先頭

©2009-2025 Movatter.jp