mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Update FAQ's in head and 7.3.X.
This commit is contained in:
parent
abe07ff174
commit
56650f3fda
42
doc/FAQ
42
doc/FAQ
@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
Frequently Asked Questions (FAQ) for PostgreSQL
|
Frequently Asked Questions (FAQ) for PostgreSQL
|
||||||
|
|
||||||
Last updated: Tue Dec 17 23:56:27 EST 2002
|
Last updated: Fri Feb 14 09:03:00 EST 2003
|
||||||
|
|
||||||
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
||||||
|
|
||||||
The most recent version of this document can be viewed at
|
The most recent version of this document can be viewed at
|
||||||
http://www.PostgreSQL.org/docs/faq-english.html.
|
http://www.ca.PostgreSQL.org/docs/faq-english.html.
|
||||||
|
|
||||||
Platform-specific questions are answered at
|
Platform-specific questions are answered at
|
||||||
http://www.PostgreSQL.org/users-lounge/docs/faq.html.
|
http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html.
|
||||||
_________________________________________________________________
|
_________________________________________________________________
|
||||||
|
|
||||||
General Questions
|
General Questions
|
||||||
@ -242,11 +242,11 @@
|
|||||||
Unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
|
Unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
|
||||||
|
|
||||||
A list of commercial support companies is available at
|
A list of commercial support companies is available at
|
||||||
http://www.PostgreSQL.org/users-lounge/commercial-support.html.
|
http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html.
|
||||||
|
|
||||||
1.7) What is the latest release?
|
1.7) What is the latest release?
|
||||||
|
|
||||||
The latest release of PostgreSQL is version 7.3.1.
|
The latest release of PostgreSQL is version 7.3.2.
|
||||||
|
|
||||||
We plan to have major releases every four months.
|
We plan to have major releases every four months.
|
||||||
|
|
||||||
@ -255,7 +255,7 @@
|
|||||||
Several manuals, manual pages, and some small test examples are
|
Several manuals, manual pages, and some small test examples are
|
||||||
included in the distribution. See the /doc directory. You can also
|
included in the distribution. See the /doc directory. You can also
|
||||||
browse the manual online at
|
browse the manual online at
|
||||||
http://www.PostgreSQL.org/users-lounge/docs/.
|
http://www.ca.PostgreSQL.org/users-lounge/docs/.
|
||||||
|
|
||||||
There are two PostgreSQL books available online at
|
There are two PostgreSQL books available online at
|
||||||
http://www.PostgreSQL.org/docs/awbook.html and
|
http://www.PostgreSQL.org/docs/awbook.html and
|
||||||
@ -586,10 +586,6 @@
|
|||||||
that PostgreSQL has a limit on the number of allowed backend processes
|
that PostgreSQL has a limit on the number of allowed backend processes
|
||||||
is so your system won't run out of resources.
|
is so your system won't run out of resources.
|
||||||
|
|
||||||
In PostgreSQL versions prior to 6.5, the maximum number of backends
|
|
||||||
was 64, and changing it required a rebuild after altering the
|
|
||||||
MaxBackendId constant in include/storage/sinvaladt.h.
|
|
||||||
|
|
||||||
3.9) What is in the pgsql_tmp directory?
|
3.9) What is in the pgsql_tmp directory?
|
||||||
|
|
||||||
This directory contains temporary files generated by the query
|
This directory contains temporary files generated by the query
|
||||||
@ -749,6 +745,10 @@
|
|||||||
ORDER BY col [ DESC ]
|
ORDER BY col [ DESC ]
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
|
If you believe the optimizer is incorrect in choosing a sequential
|
||||||
|
scan, use SET enable_seqscan TO 'off' and run tests to see if an index
|
||||||
|
scan is indeed faster.
|
||||||
|
|
||||||
When using wild-card operators such as LIKE or ~, indexes can only be
|
When using wild-card operators such as LIKE or ~, indexes can only be
|
||||||
used in certain circumstances:
|
used in certain circumstances:
|
||||||
* The beginning of the search string must be anchored to the start
|
* The beginning of the search string must be anchored to the start
|
||||||
@ -820,10 +820,10 @@
|
|||||||
|
|
||||||
Type Internal Name Notes
|
Type Internal Name Notes
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
"char" char 1 character
|
|
||||||
CHAR(n) bpchar blank padded to the specified fixed length
|
|
||||||
VARCHAR(n) varchar size specifies maximum length, no padding
|
VARCHAR(n) varchar size specifies maximum length, no padding
|
||||||
|
CHAR(n) bpchar blank padded to the specified fixed length
|
||||||
TEXT text no specific upper limit on length
|
TEXT text no specific upper limit on length
|
||||||
|
"char" char one character
|
||||||
BYTEA bytea variable-length byte array (null-byte safe)
|
BYTEA bytea variable-length byte array (null-byte safe)
|
||||||
|
|
||||||
You will see the internal name when examining system catalogs and in
|
You will see the internal name when examining system catalogs and in
|
||||||
@ -834,13 +834,15 @@ BYTEA bytea variable-length byte array (null-byte safe)
|
|||||||
space used is slightly greater than the declared size. However, these
|
space used is slightly greater than the declared size. However, these
|
||||||
data types are also subject to compression or being stored out-of-line
|
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.
|
by TOAST, so the space on disk might also be less than expected.
|
||||||
|
VARCHAR(n) is best when storing variable-length strings and it limits
|
||||||
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,
|
how long a string can be. TEXT is for strings of unlimited length,
|
||||||
maximum 1 gigabyte. BYTEA is for storing binary data, particularly
|
with a maximum of one gigabyte.
|
||||||
values that include NULL bytes. These types have similar performance
|
|
||||||
characteristics.
|
CHAR(n) is for storing strings that are all the same length. CHAR(n)
|
||||||
|
pads with blanks to the specified length, while VARCHAR(n) only stores
|
||||||
|
the characters supplied. 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?
|
4.15.1) How do I create a serial/auto-incrementing field?
|
||||||
|
|
||||||
@ -1009,8 +1011,8 @@ CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
|
|||||||
FROM tab
|
FROM tab
|
||||||
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
|
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
|
||||||
|
|
||||||
For this to be fast, subcol should be an indexed column. We hope to
|
For this to be fast, subcol should be an indexed column. This
|
||||||
fix this limitation in a future release.
|
preformance problem will be fixed in 7.4.
|
||||||
|
|
||||||
4.23) How do I perform an outer join?
|
4.23) How do I perform an outer join?
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
From: Zeugswetter Andreas <ZeugswetterA@spardat.at>
|
From: Zeugswetter Andreas <ZeugswetterA@spardat.at>
|
||||||
$Date: 2002/12/18 20:39:31 $
|
$Date: 2003/02/14 14:05:51 $
|
||||||
|
|
||||||
On AIX 4.3.2 PostgreSQL compiled with the native IBM compiler xlc
|
On AIX 4.3.2 PostgreSQL compiled with the native IBM compiler xlc
|
||||||
(vac.C 5.0.1) passes all regression tests. Other versions of OS and
|
(vac.C 5.0.1) passes all regression tests. Other versions of OS and
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
||||||
|
|
||||||
Last updated: Tue Nov 5 16:52:46 EST 2002
|
Last updated: Fri Feb 14 08:59:10 EST 2003
|
||||||
|
|
||||||
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
||||||
|
|
||||||
@ -643,9 +643,8 @@ List *i, *list;
|
|||||||
return the i'th element in list.
|
return the i'th element in list.
|
||||||
|
|
||||||
lconsi, ...
|
lconsi, ...
|
||||||
There are integer versions of these: lconsi, lappendi, nthi.
|
There are integer versions of these: lconsi, lappendi, etc.
|
||||||
List's containing integers instead of Node pointers are used to
|
Also versions for OID lists: lconso, lappendo, etc.
|
||||||
hold list of relation object id's and other integer quantities.
|
|
||||||
|
|
||||||
You can print nodes easily inside gdb. First, to disable output
|
You can print nodes easily inside gdb. First, to disable output
|
||||||
truncation when you use the gdb print command:
|
truncation when you use the gdb print command:
|
||||||
|
@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL 7.3
|
|||||||
HP-UX Specific
|
HP-UX Specific
|
||||||
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
|
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
|
||||||
=======================================================
|
=======================================================
|
||||||
last updated: $Date: 2002/12/18 20:39:31 $
|
last updated: $Date: 2003/02/14 14:05:51 $
|
||||||
|
|
||||||
current maintainer: Tom Lane (tgl@sss.pgh.pa.us)
|
current maintainer: Tom Lane (tgl@sss.pgh.pa.us)
|
||||||
original author: Tom Lane (tgl@sss.pgh.pa.us)
|
original author: Tom Lane (tgl@sss.pgh.pa.us)
|
||||||
|
@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL
|
|||||||
IRIX Specific
|
IRIX Specific
|
||||||
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
|
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
|
||||||
=======================================================
|
=======================================================
|
||||||
last updated: $Date: 2002/12/18 20:39:31 $
|
last updated: $Date: 2003/02/14 14:05:52 $
|
||||||
|
|
||||||
current maintainer: Luis Amigo (lamigo@atc.unican.es)
|
current maintainer: Luis Amigo (lamigo@atc.unican.es)
|
||||||
original author: Luis Amigo (lamigo@atc.unican.es)
|
original author: Luis Amigo (lamigo@atc.unican.es)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
How to install PostgreSQL on Windows
|
How to install PostgreSQL on Windows
|
||||||
====================================
|
====================================
|
||||||
$Date: 2002/12/18 20:39:31 $
|
$Date: 2003/02/14 14:05:52 $
|
||||||
|
|
||||||
1. Install the latest Cygwin package, available at http://cygwin.com/.
|
1. Install the latest Cygwin package, available at http://cygwin.com/.
|
||||||
The Cygwin package provides a UNIX-like API on top of the Win32
|
The Cygwin package provides a UNIX-like API on top of the Win32
|
||||||
|
@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL 7.3
|
|||||||
SCO UnixWare and OpenServer specific
|
SCO UnixWare and OpenServer specific
|
||||||
to be read in conjunction with the installation instructions
|
to be read in conjunction with the installation instructions
|
||||||
============================================================
|
============================================================
|
||||||
last updated: $Date: 2002/12/18 20:39:31 $
|
last updated: $Date: 2003/02/14 14:05:52 $
|
||||||
|
|
||||||
current maintainer: Billy G. Allie (Bill.Allie@mug.org)
|
current maintainer: Billy G. Allie (Bill.Allie@mug.org)
|
||||||
original author: Andrew Merrill (andrew@compclass.com)
|
original author: Andrew Merrill (andrew@compclass.com)
|
||||||
|
@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL
|
|||||||
Sun Solaris specific
|
Sun Solaris specific
|
||||||
to be read in conjunction with the installation instructions
|
to be read in conjunction with the installation instructions
|
||||||
============================================================
|
============================================================
|
||||||
last updated: $Date: 2002/12/18 20:39:31 $
|
last updated: $Date: 2003/02/14 14:05:52 $
|
||||||
|
|
||||||
current maintainer: Peter Eisentraut <peter_e@gmx.net>
|
current maintainer: Peter Eisentraut <peter_e@gmx.net>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Otvety na chasto zadavaemye voprosy po PostgreSQL
|
Otvety na chasto zadavaemye voprosy po PostgreSQL
|
||||||
|
|
||||||
Data poslednego obnovleniya: CHetverg 5 Dekabrya 00:47:26 EDT 2002
|
Data poslednego obnovleniya: CHetverg 13 Fevralya 23:07:35 EDT 2002
|
||||||
|
|
||||||
Anglijskij variant soprovozhdaet: Bryus Mom'yan (Bruce Momjian)
|
Anglijskij variant soprovozhdaet: Bryus Mom'yan (Bruce Momjian)
|
||||||
(pgman@candle.pha.pa.us)
|
(pgman@candle.pha.pa.us)
|
||||||
@ -275,7 +275,7 @@
|
|||||||
|
|
||||||
1.7) Kakaya poslednyaya versiya?
|
1.7) Kakaya poslednyaya versiya?
|
||||||
|
|
||||||
Poslednij vypusk PostgreSQL - `eto versiya 7.2.3.
|
Poslednij vypusk PostgreSQL - `eto versiya 7.3.1.
|
||||||
|
|
||||||
My planiruem vypuskat' novye versii kazhdye chetyre mesyaca.
|
My planiruem vypuskat' novye versii kazhdye chetyre mesyaca.
|
||||||
|
|
||||||
@ -469,17 +469,13 @@
|
|||||||
2.3) Est' li u PostgreSQL graficheskij interfejs pol'zovatelya?
|
2.3) Est' li u PostgreSQL graficheskij interfejs pol'zovatelya?
|
||||||
|
|
||||||
Da, suschestvuet neskol'ko graficheskih interfejsov dlya PostgreSQL.
|
Da, suschestvuet neskol'ko graficheskih interfejsov dlya PostgreSQL.
|
||||||
`Eto PgAccess (http://www.pgaccess.com, PgAdmin II
|
`Eto PgAccess (http://www.pgaccess.org, PgAdmin II
|
||||||
(http://www.pgadmin.org, Win32-only), RHDB Admin (
|
(http://www.pgadmin.org, Win32-only), RHDB Admin (
|
||||||
http://sources.redhat.com/rhdb/) i Rekall (
|
http://sources.redhat.com/rhdb/) i Rekall (
|
||||||
http://www.thekompany.com/products/rekall/, kommercheskij). Takzhe
|
http://www.thekompany.com/products/rekall/, kommercheskij). Takzhe
|
||||||
est' PHPPgAdmin ( http://phppgadmin.sourceforge.net/) - interfejs k
|
est' PHPPgAdmin ( http://phppgadmin.sourceforge.net/) - interfejs k
|
||||||
PostgreSQL, osnovannyj na Web.
|
PostgreSQL, osnovannyj na Web.
|
||||||
|
|
||||||
U nas est' prekrasnyj goraficheskij interfejs, nazyvaemyj PgAccess,
|
|
||||||
kotoryj takzhe mozhno ispol'zovat' kak generator otchetov. Ego
|
|
||||||
stranichka http://www.pgaccess.org/
|
|
||||||
|
|
||||||
2.4) Kakie yazyki mogut vzaimodejstvovat' s PostgreSQL?
|
2.4) Kakie yazyki mogut vzaimodejstvovat' s PostgreSQL?
|
||||||
|
|
||||||
Kakie-libo interfejsy dlya PostgreSQL suschestvuyut dlya bol'shinstva
|
Kakie-libo interfejsy dlya PostgreSQL suschestvuyut dlya bol'shinstva
|
||||||
@ -669,10 +665,6 @@
|
|||||||
sozdaniya ogranicheniya na kolichestvo backend processov kak raz i
|
sozdaniya ogranicheniya na kolichestvo backend processov kak raz i
|
||||||
sostoit v tom, chtoby vashej sisteme hvatilo resursov.
|
sostoit v tom, chtoby vashej sisteme hvatilo resursov.
|
||||||
|
|
||||||
V PostgreSQL do versii 6.5, maksimal'noe kolichestvo backend processov
|
|
||||||
bylo 64, i izmenenie `etogo kolichestva trebovalo perekompilyacii
|
|
||||||
posle ustanovki konstanty MaxBackendId v include/storage/sinvaladt.h.
|
|
||||||
|
|
||||||
3.9) CHto nahoditsya v kataloge pgsql_tmp?
|
3.9) CHto nahoditsya v kataloge pgsql_tmp?
|
||||||
|
|
||||||
Dannyj katalog soderzhit vremennye fajly, generiruemye obrabotchikom
|
Dannyj katalog soderzhit vremennye fajly, generiruemye obrabotchikom
|
||||||
@ -853,6 +845,11 @@ pa
|
|||||||
ORDER BY col [ DESC ]
|
ORDER BY col [ DESC ]
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
|
Esli vam kazhetsya, chto optimizator nekorretno vybiraet
|
||||||
|
posledovatel'nyj perebor, ispol'zujte SET enable_seqscan TO 'off' i
|
||||||
|
zapustite testy, chtoby uvidet', ne stalo-li skanirovanie indeksov
|
||||||
|
bystree.
|
||||||
|
|
||||||
Kogda ispol'zuyutsya operacii s shablonami, naprimer LIKE ili ~,
|
Kogda ispol'zuyutsya operacii s shablonami, naprimer LIKE ili ~,
|
||||||
indeksy mogut byt' ispol'zovany v sleduyuschih sluchayah:
|
indeksy mogut byt' ispol'zovany v sleduyuschih sluchayah:
|
||||||
* Nachalo stroki poiska dolzhno sovpadat' s nachalom iskomoj stroki,
|
* Nachalo stroki poiska dolzhno sovpadat' s nachalom iskomoj stroki,
|
||||||
@ -929,12 +926,12 @@ pa
|
|||||||
|
|
||||||
Tip Vnutrennee imya Zamechaniya
|
Tip Vnutrennee imya Zamechaniya
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
"char" char 1 simvol
|
|
||||||
CHAR(n) bpchar zapolnyaetsya pustotoj do fiksirovannoj dliny
|
|
||||||
VARCHAR(n) varchar razmer zadaet maksimal'nuyu dlinu, net zapolnen
|
VARCHAR(n) varchar razmer zadaet maksimal'nuyu dlinu, net zapolnen
|
||||||
iya
|
iya
|
||||||
|
CHAR(n) bpchar zapolnyaetsya pustotoj do fiksirovannoj dliny
|
||||||
TEXT text net zadavaemogo verhnego ogranicheniya ili dlin
|
TEXT text net zadavaemogo verhnego ogranicheniya ili dlin
|
||||||
y
|
y
|
||||||
|
"char" char odin simvol
|
||||||
BYTEA bytea massiv bajt peremennoj dliny (mozhno ispol'zova
|
BYTEA bytea massiv bajt peremennoj dliny (mozhno ispol'zova
|
||||||
t' null-bajt bez opaski)
|
t' null-bajt bez opaski)
|
||||||
|
|
||||||
@ -948,15 +945,17 @@ t' null-bajt bez opaski)
|
|||||||
szhatiyu ili mogut byt' sohraneny ne v strokom vide cherez TOAST, tak
|
szhatiyu ili mogut byt' sohraneny ne v strokom vide cherez TOAST, tak
|
||||||
chto zanimaemoe diskovoe prostranstvo mozhet takzhe byt' i men'she,
|
chto zanimaemoe diskovoe prostranstvo mozhet takzhe byt' i men'she,
|
||||||
chem ozhidalos'.
|
chem ozhidalos'.
|
||||||
|
VARCHAR(n) - `eto luchshee reshenie, kogda nuzhno hranit' stroki
|
||||||
|
peremennoj dliny, ne prevyshayuschie opredelennogo razmera. TEXT -
|
||||||
|
`eto luchshee reshenie dlya strok neogranichennoj dliny, s maksimal'no
|
||||||
|
dopustimoj dlinoj v 1 gigabajt.
|
||||||
|
|
||||||
CHAR(n) - `eto luchshee reshenie dlya hraneniya strok, kotorye obychno
|
CHAR(n) - `eto luchshee reshenie dlya hraneniya strok, kotorye obychno
|
||||||
imeyut odinakovuyu dlinu. VARCHAR(n) - `eto luchshee reshenie, kogda
|
imeyut odinakovuyu dlinu. CHAR(n) zapolnyaetsya pustotoj do zadannoj
|
||||||
nuzhno hranit' stroki peremennoj dliny, no ne prevyshayuschie
|
dliny, v to vremya kak VARCHAR(n) hranit tol'ko simvoly, iz kotoryh
|
||||||
opredelennogo razmera. TEXT - `eto luchshee reshenie dlya strok
|
sostoit stroka. BYTEA ispol'zuetsya dlya hraneniya binarnyh dannyh,
|
||||||
neogranichennoj dliny, s maksimal'no dopustimoj dlinoj v 1 gigabajt.
|
znacheniya kotoryh mogut vklyuchat' NULL bajty. `Eti tipy imeyut
|
||||||
BYTEA dlya hraneniya binarnyh dannyh, znacheniya kotoryh mogut
|
shodnye harakteristiki proizvoditel'nosti.
|
||||||
vklyuchat' NULL bajty. `Eti tipy imeyut shodnye harakteristiki
|
|
||||||
proizvoditel'nosti.
|
|
||||||
|
|
||||||
4.15.1) Kak mne sozdat' pole serial/s-avto-uvelicheniem?
|
4.15.1) Kak mne sozdat' pole serial/s-avto-uvelicheniem?
|
||||||
|
|
||||||
@ -1146,8 +1145,8 @@ CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
|
|||||||
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
|
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
|
||||||
|
|
||||||
CHtoby takaya konstrukciya rabotala bystro, kolonka subcol dolzhna
|
CHtoby takaya konstrukciya rabotala bystro, kolonka subcol dolzhna
|
||||||
byt' proindeksirovana. My nadeemsya ubrat' `eto ogranichenie v
|
byt' proindeksirovana. `Eta problema proizvoditel'nosti budet
|
||||||
buduschem vypuske.
|
ustranena v versii 7.4.
|
||||||
|
|
||||||
4.23) Kak mne vypolnit' vneshnee svyazyvanie?
|
4.23) Kak mne vypolnit' vneshnee svyazyvanie?
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
alink="#0000ff">
|
alink="#0000ff">
|
||||||
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
|
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
|
||||||
|
|
||||||
<P>Last updated: Thu Dec 5 00:47:26 EST 2002</P>
|
<P>Last updated: Fri Feb 14 09:03:00 EST 2003</P>
|
||||||
|
|
||||||
<P>Current maintainer: Bruce Momjian (<A href=
|
<P>Current maintainer: Bruce Momjian (<A href=
|
||||||
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
||||||
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
<P>The most recent version of this document can be viewed at <A
|
<P>The most recent version of this document can be viewed at <A
|
||||||
href=
|
href=
|
||||||
"http://www.PostgreSQL.org/docs/faq-english.html">http://www.PostgreSQL.org/docs/faq-english.html</A>.</P>
|
"http://www.ca.PostgreSQL.org/docs/faq-english.html">http://www.ca.PostgreSQL.org/docs/faq-english.html</A>.</P>
|
||||||
|
|
||||||
<P>Platform-specific questions are answered at <A href=
|
<P>Platform-specific questions are answered at <A href=
|
||||||
"http://www.PostgreSQL.org/users-lounge/docs/faq.html">http://www.PostgreSQL.org/users-lounge/docs/faq.html</A>.</P>
|
"http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html">http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html</A>.</P>
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
<H2 align="center">General Questions</H2>
|
<H2 align="center">General Questions</H2>
|
||||||
@ -314,11 +314,11 @@
|
|||||||
'#PostgreSQL' "$USER" irc.phoenix.net.</CODE></P>
|
'#PostgreSQL' "$USER" irc.phoenix.net.</CODE></P>
|
||||||
|
|
||||||
<P>A list of commercial support companies is available at <A href=
|
<P>A list of commercial support companies is available at <A href=
|
||||||
"http://www.PostgreSQL.org/users-lounge/commercial-support.html">http://www.PostgreSQL.org/users-lounge/commercial-support.html</A>.</P>
|
"http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html">http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html</A>.</P>
|
||||||
|
|
||||||
<H4><A name="1.7">1.7</A>) What is the latest release?</H4>
|
<H4><A name="1.7">1.7</A>) What is the latest release?</H4>
|
||||||
|
|
||||||
<P>The latest release of PostgreSQL is version 7.2.3.</P>
|
<P>The latest release of PostgreSQL is version 7.3.2.</P>
|
||||||
|
|
||||||
<P>We plan to have major releases every four months.</P>
|
<P>We plan to have major releases every four months.</P>
|
||||||
|
|
||||||
@ -327,7 +327,7 @@
|
|||||||
<P>Several manuals, manual pages, and some small test examples are
|
<P>Several manuals, manual pages, and some small test examples are
|
||||||
included in the distribution. See the <I>/doc</I> directory. You
|
included in the distribution. See the <I>/doc</I> directory. You
|
||||||
can also browse the manual online at <A href=
|
can also browse the manual online at <A href=
|
||||||
"http://www.PostgreSQL.org/users-lounge/docs/">http://www.PostgreSQL.org/users-lounge/docs/</A>.</P>
|
"http://www.ca.PostgreSQL.org/users-lounge/docs/">http://www.ca.PostgreSQL.org/users-lounge/docs/</A>.</P>
|
||||||
|
|
||||||
<P>There are two PostgreSQL books available online at <A href=
|
<P>There are two PostgreSQL books available online at <A href=
|
||||||
"http://www.PostgreSQL.org/docs/awbook.html">http://www.PostgreSQL.org/docs/awbook.html</A>
|
"http://www.PostgreSQL.org/docs/awbook.html">http://www.PostgreSQL.org/docs/awbook.html</A>
|
||||||
@ -536,8 +536,8 @@
|
|||||||
interface?</H4>
|
interface?</H4>
|
||||||
|
|
||||||
Yes, there are several graphical interfaces to PostgreSQL available.
|
Yes, there are several graphical interfaces to PostgreSQL available.
|
||||||
These include PgAccess <a href="http://www.pgaccess.com">
|
These include PgAccess <a href="http://www.pgaccess.org">
|
||||||
http://www.pgaccess.com</a>), PgAdmin II (<a
|
http://www.pgaccess.org</a>), PgAdmin II (<a
|
||||||
href="http://www.pgadmin.org">http://www.pgadmin.org</a>,
|
href="http://www.pgadmin.org">http://www.pgadmin.org</a>,
|
||||||
Win32-only), RHDB Admin (<a
|
Win32-only), RHDB Admin (<a
|
||||||
href="http://sources.redhat.com/rhdb/">http://sources.redhat.com/rhdb/
|
href="http://sources.redhat.com/rhdb/">http://sources.redhat.com/rhdb/
|
||||||
@ -547,10 +547,6 @@
|
|||||||
http://phppgadmin.sourceforge.net/ </a>), a web-based interface to
|
http://phppgadmin.sourceforge.net/ </a>), a web-based interface to
|
||||||
PostgreSQL.
|
PostgreSQL.
|
||||||
|
|
||||||
<P>We have a nice graphical user interface called PgAccess which can
|
|
||||||
also be used as a report generator. The Web page is
|
|
||||||
<A href="http://www.pgaccess.org/">http://www.pgaccess.org/</A>.</P>
|
|
||||||
|
|
||||||
<H4><A name="2.4">2.4</A>) What languages are able to communicate with
|
<H4><A name="2.4">2.4</A>) What languages are able to communicate with
|
||||||
PostgreSQL?</H4>
|
PostgreSQL?</H4>
|
||||||
|
|
||||||
@ -757,11 +753,6 @@
|
|||||||
the number of allowed backend processes is so your system won't run
|
the number of allowed backend processes is so your system won't run
|
||||||
out of resources.</P>
|
out of resources.</P>
|
||||||
|
|
||||||
<P>In PostgreSQL versions prior to 6.5, the maximum number of
|
|
||||||
backends was 64, and changing it required a rebuild after altering
|
|
||||||
the MaxBackendId constant in
|
|
||||||
<I>include/storage/sinvaladt.h</I>.</P>
|
|
||||||
|
|
||||||
<H4><A name="3.9">3.9</A>) What is in the <I>pgsql_tmp</I> directory?</H4>
|
<H4><A name="3.9">3.9</A>) What is in the <I>pgsql_tmp</I> directory?</H4>
|
||||||
|
|
||||||
<P>This directory contains temporary files generated by the query
|
<P>This directory contains temporary files generated by the query
|
||||||
@ -947,6 +938,10 @@
|
|||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
|
<P>If you believe the optimizer is incorrect in choosing a
|
||||||
|
sequential scan, use <CODE>SET enable_seqscan TO 'off'</CODE> and
|
||||||
|
run tests to see if an index scan is indeed faster.</P>
|
||||||
|
|
||||||
<P>When using wild-card operators such as <SMALL>LIKE</SMALL> or
|
<P>When using wild-card operators such as <SMALL>LIKE</SMALL> or
|
||||||
<I>~</I>, indexes can only be used in certain circumstances:</P>
|
<I>~</I>, indexes can only be used in certain circumstances:</P>
|
||||||
<UL>
|
<UL>
|
||||||
@ -1039,10 +1034,10 @@
|
|||||||
<PRE>
|
<PRE>
|
||||||
Type Internal Name Notes
|
Type Internal Name Notes
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
"char" char 1 character
|
|
||||||
CHAR(n) bpchar blank padded to the specified fixed length
|
|
||||||
VARCHAR(n) varchar size specifies maximum length, no padding
|
VARCHAR(n) varchar size specifies maximum length, no padding
|
||||||
|
CHAR(n) bpchar blank padded to the specified fixed length
|
||||||
TEXT text no specific upper limit on length
|
TEXT text no specific upper limit on length
|
||||||
|
"char" char one character
|
||||||
BYTEA bytea variable-length byte array (null-byte safe)
|
BYTEA bytea variable-length byte array (null-byte safe)
|
||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
@ -1056,11 +1051,13 @@ BYTEA bytea variable-length byte array (null-byte safe)
|
|||||||
stored out-of-line by <SMALL>TOAST</SMALL>, so the space on disk
|
stored out-of-line by <SMALL>TOAST</SMALL>, so the space on disk
|
||||||
might also be less than expected.</P>
|
might also be less than expected.</P>
|
||||||
|
|
||||||
<P><SMALL>CHAR(n)</SMALL> is best when storing strings that are
|
<SMALL>VARCHAR(n)</SMALL> is best when storing variable-length
|
||||||
usually the same length. <SMALL>VARCHAR(n)</SMALL> is best when
|
strings and it limits how long a string can be. <SMALL>TEXT</SMALL>
|
||||||
storing variable-length strings but it limits how long a string can
|
is for strings of unlimited length, with a maximum of one gigabyte.
|
||||||
be. <SMALL>TEXT</SMALL> is for strings of unlimited length, maximum
|
<P><SMALL>CHAR(n)</SMALL> is for storing strings that are all the
|
||||||
1 gigabyte. <SMALL>BYTEA</SMALL> is for storing binary data,
|
same length. <SMALL>CHAR(n)</SMALL> pads with blanks to the specified
|
||||||
|
length, while <SMALL>VARCHAR(n)</SMALL> only stores the characters
|
||||||
|
supplied. <SMALL>BYTEA</SMALL> is for storing binary data,
|
||||||
particularly values that include <SMALL>NULL</SMALL> bytes. These
|
particularly values that include <SMALL>NULL</SMALL> bytes. These
|
||||||
types have similar performance characteristics.</P>
|
types have similar performance characteristics.</P>
|
||||||
|
|
||||||
@ -1286,7 +1283,7 @@ BYTEA bytea variable-length byte array (null-byte safe)
|
|||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
For this to be fast, <CODE>subcol</CODE> should be an indexed column.
|
For this to be fast, <CODE>subcol</CODE> should be an indexed column.
|
||||||
We hope to fix this limitation in a future release.
|
This preformance problem will be fixed in 7.4.
|
||||||
|
|
||||||
<H4><A name="4.23">4.23</A>) How do I perform an outer join?</H4>
|
<H4><A name="4.23">4.23</A>) How do I perform an outer join?</H4>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<H1>Developer's Frequently Asked Questions (FAQ) for
|
<H1>Developer's Frequently Asked Questions (FAQ) for
|
||||||
PostgreSQL</H1>
|
PostgreSQL</H1>
|
||||||
|
|
||||||
<P>Last updated: Tue Nov 5 16:52:46 EST 2002</P>
|
<P>Last updated: Fri Feb 14 08:59:10 EST 2003</P>
|
||||||
|
|
||||||
<P>Current maintainer: Bruce Momjian (<A href=
|
<P>Current maintainer: Bruce Momjian (<A href=
|
||||||
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
||||||
@ -779,10 +779,8 @@
|
|||||||
|
|
||||||
<DT>lconsi, ...</DT>
|
<DT>lconsi, ...</DT>
|
||||||
|
|
||||||
<DD>There are integer versions of these: <I>lconsi, lappendi,
|
<DD>There are integer versions of these: <I>lconsi, lappendi</I>,
|
||||||
nthi.</I> <I>List's</I> containing integers instead of Node
|
etc. Also versions for OID lists: <I>lconso, lappendo</I>, etc.</DD>
|
||||||
pointers are used to hold list of relation object id's and
|
|
||||||
other integer quantities.</DD>
|
|
||||||
</DL>
|
</DL>
|
||||||
</BLOCKQUOTE>
|
</BLOCKQUOTE>
|
||||||
You can print nodes easily inside <I>gdb.</I> First, to disable
|
You can print nodes easily inside <I>gdb.</I> First, to disable
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
alink="#0000ff">
|
alink="#0000ff">
|
||||||
<H1>Ответы на часто задаваемые вопросы по PostgreSQL</H1>
|
<H1>Ответы на часто задаваемые вопросы по PostgreSQL</H1>
|
||||||
|
|
||||||
<P>Дата последнего обновления: Четверг 5 Декабря 00:47:26 EDT 2002</P>
|
<P>Дата последнего обновления: Четверг 13 Февраля 23:07:35 EDT 2002</P>
|
||||||
|
|
||||||
<P>Английский вариант сопровождает: Брюс Момьян (Bruce Momjian) (<A href=
|
<P>Английский вариант сопровождает: Брюс Момьян (Bruce Momjian) (<A href=
|
||||||
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
||||||
@ -323,7 +323,7 @@
|
|||||||
|
|
||||||
<H4><A name="1.7">1.7</A>) Какая последняя версия?</H4>
|
<H4><A name="1.7">1.7</A>) Какая последняя версия?</H4>
|
||||||
|
|
||||||
<P>Последний выпуск PostgreSQL - это версия 7.2.3.</P>
|
<P>Последний выпуск PostgreSQL - это версия 7.3.1.</P>
|
||||||
|
|
||||||
<P>Мы планируем выпускать новые версии каждые четыре месяца.</P>
|
<P>Мы планируем выпускать новые версии каждые четыре месяца.</P>
|
||||||
|
|
||||||
@ -550,7 +550,7 @@
|
|||||||
пользователя?</H4>
|
пользователя?</H4>
|
||||||
|
|
||||||
<P>Да, существует несколько графических интерфейсов для PostgreSQL.
|
<P>Да, существует несколько графических интерфейсов для PostgreSQL.
|
||||||
Это PgAccess (<A href="http://www.pgaccess.com/">http://www.pgaccess.com</A>,
|
Это PgAccess (<A href="http://www.pgaccess.org/">http://www.pgaccess.org</A>,
|
||||||
PgAdmin II (<A href="http://www.pgadmin.org/">http://www.pgadmin.org</A>,
|
PgAdmin II (<A href="http://www.pgadmin.org/">http://www.pgadmin.org</A>,
|
||||||
Win32-only), RHDB Admin (<A href="http://sources.redhat.com/rhdb/">
|
Win32-only), RHDB Admin (<A href="http://sources.redhat.com/rhdb/">
|
||||||
http://sources.redhat.com/rhdb/</A>) и Rekall
|
http://sources.redhat.com/rhdb/</A>) и Rekall
|
||||||
@ -558,11 +558,7 @@
|
|||||||
http://www.thekompany.com/products/rekall/</A>, коммерческий). Также есть
|
http://www.thekompany.com/products/rekall/</A>, коммерческий). Также есть
|
||||||
PHPPgAdmin (<A href="http://phppgadmin.sourceforge.net/">
|
PHPPgAdmin (<A href="http://phppgadmin.sourceforge.net/">
|
||||||
http://phppgadmin.sourceforge.net/</A>) - интерфейс к PostgreSQL, основанный
|
http://phppgadmin.sourceforge.net/</A>) - интерфейс к PostgreSQL, основанный
|
||||||
на Web.
|
на Web.</p>
|
||||||
|
|
||||||
<P>У нас есть прекрасный горафический интерфейс, называемый
|
|
||||||
PgAccess, который также можно использовать как генератор отчетов.
|
|
||||||
Его страничка <A href="http://www.pgaccess.org">http://www.pgaccess.org/</A></P>
|
|
||||||
|
|
||||||
<H4><A name="2.4">2.4</A>) Какие языки могут взаимодействовать с PostgreSQL?</H4>
|
<H4><A name="2.4">2.4</A>) Какие языки могут взаимодействовать с PostgreSQL?</H4>
|
||||||
|
|
||||||
@ -772,10 +768,6 @@
|
|||||||
Причина создания ограничения на количество backend процессов как
|
Причина создания ограничения на количество backend процессов как
|
||||||
раз и состоит в том, чтобы вашей системе хватило ресурсов.</P>
|
раз и состоит в том, чтобы вашей системе хватило ресурсов.</P>
|
||||||
|
|
||||||
<P>В PostgreSQL до версии 6.5, максимальное количество backend процессов
|
|
||||||
было 64, и изменение этого количества требовало перекомпиляции после
|
|
||||||
установки константы MaxBackendId в <I>include/storage/sinvaladt.h</I>.</P>
|
|
||||||
|
|
||||||
<H4><A name="3.9">3.9</A>) Что находится в каталоге <I>pgsql_tmp</I>?</H4>
|
<H4><A name="3.9">3.9</A>) Что находится в каталоге <I>pgsql_tmp</I>?</H4>
|
||||||
|
|
||||||
<P>Данный каталог содержит временные файлы, генерируемые обработчиком
|
<P>Данный каталог содержит временные файлы, генерируемые обработчиком
|
||||||
@ -969,6 +961,11 @@
|
|||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<P>Если вам кажется, что оптимизатор некорретно выбирает последовательный
|
||||||
|
перебор, используйте <CODE>SET enable_seqscan TO 'off'</CODE> и
|
||||||
|
запустите тесты, чтобы увидеть, не стало-ли сканирование индексов быстрее.
|
||||||
|
</P>
|
||||||
|
|
||||||
<P>Когда используются операции с шаблонами, например <SMALL>LIKE</SMALL>
|
<P>Когда используются операции с шаблонами, например <SMALL>LIKE</SMALL>
|
||||||
или <I>~</I>, индексы могут быть использованы в следующих случаях:</P>
|
или <I>~</I>, индексы могут быть использованы в следующих случаях:</P>
|
||||||
<UL>
|
<UL>
|
||||||
@ -1058,10 +1055,10 @@
|
|||||||
<PRE>
|
<PRE>
|
||||||
Тип Внутреннее имя Замечания
|
Тип Внутреннее имя Замечания
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
"char" char 1 символ
|
|
||||||
CHAR(n) bpchar заполняется пустотой до фиксированной длины
|
|
||||||
VARCHAR(n) varchar размер задает максимальную длину, нет заполнения
|
VARCHAR(n) varchar размер задает максимальную длину, нет заполнения
|
||||||
|
CHAR(n) bpchar заполняется пустотой до фиксированной длины
|
||||||
TEXT text нет задаваемого верхнего ограничения или длины
|
TEXT text нет задаваемого верхнего ограничения или длины
|
||||||
|
"char" char один символ
|
||||||
BYTEA bytea массив байт переменной длины (можно использовать null-байт без опаски)
|
BYTEA bytea массив байт переменной длины (можно использовать null-байт без опаски)
|
||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
@ -1076,13 +1073,16 @@ BYTEA bytea
|
|||||||
так что занимаемое дисковое пространство может также быть и меньше,
|
так что занимаемое дисковое пространство может также быть и меньше,
|
||||||
чем ожидалось.</P>
|
чем ожидалось.</P>
|
||||||
|
|
||||||
|
<SMALL>VARCHAR(n)</SMALL> - это лучшее решение, когда нужно хранить
|
||||||
|
строки переменной длины, не превышающие определенного размера.
|
||||||
|
<SMALL>TEXT</SMALL> - это лучшее решение для строк неограниченной длины,
|
||||||
|
с максимально допустимой длиной в 1 гигабайт.
|
||||||
<P><SMALL>CHAR(n)</SMALL> - это лучшее решение для хранения строк, которые
|
<P><SMALL>CHAR(n)</SMALL> - это лучшее решение для хранения строк, которые
|
||||||
обычно имеют одинаковую длину. <SMALL>VARCHAR(n)</SMALL> - это лучшее
|
обычно имеют одинаковую длину. <SMALL>CHAR(n)</SMALL> заполняется
|
||||||
решение, когда нужно хранить строки переменной длины, но не превышающие
|
пустотой до заданной длины, в то время как <SMALL>VARCHAR(n)</SMALL>
|
||||||
определенного размера. <SMALL>TEXT</SMALL> - это лучшее решение для строк
|
хранит только символы, из которых состоит строка.
|
||||||
неограниченной длины, с максимально допустимой длиной в 1 гигабайт.
|
<SMALL>BYTEA</SMALL> используется для хранения бинарных данных, значения
|
||||||
<SMALL>BYTEA</SMALL> для хранения бинарных данных, значения которых
|
которых могут включать <SMALL>NULL</SMALL> байты. Эти типы имеют сходные
|
||||||
могут включать <SMALL>NULL</SMALL> байты. Эти типы имеют сходные
|
|
||||||
характеристики производительности.</P>
|
характеристики производительности.</P>
|
||||||
|
|
||||||
<H4><A name="4.15.1">4.15.1</A>) Как мне создать поле
|
<H4><A name="4.15.1">4.15.1</A>) Как мне создать поле
|
||||||
@ -1321,8 +1321,8 @@ BYTEA bytea
|
|||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
Чтобы такая конструкция работала быстро, колонка <CODE>subcol</CODE>
|
Чтобы такая конструкция работала быстро, колонка <CODE>subcol</CODE>
|
||||||
должна быть проиндексирована.
|
должна быть проиндексирована. Эта проблема производительности будет
|
||||||
Мы надеемся убрать это ограничение в будущем выпуске.
|
устранена в версии 7.4.
|
||||||
|
|
||||||
<H4><A name="4.23">4.23</A>) Как мне выполнить внешнее связывание?</H4>
|
<H4><A name="4.23">4.23</A>) Как мне выполнить внешнее связывание?</H4>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user