Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1bdec342
Commit
1bdec342
authored
Jun 03, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Russian FAQ.
Viktor Vislobokov
parent
97e455c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
433 additions
and
611 deletions
+433
-611
doc/FAQ_russian
doc/FAQ_russian
+219
-314
doc/src/FAQ/FAQ_russian.html
doc/src/FAQ/FAQ_russian.html
+214
-297
No files found.
doc/FAQ_russian
View file @
1bdec342
Otvety na chasto zadavaemye voprosy po PostgreSQL
Otvety na chasto zadavaemye voprosy po PostgreSQL
Data poslednego obnovleniya: Ponedel'nik
14 fevralya 23:35:09 ES
T 2005
Data poslednego obnovleniya: Ponedel'nik
30 maya 09:11:03 ED
T 2005
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)
Perev
e
l na russkij: Viktor Vislobokov (corochoone@perm.ru)
Perev
io
l na russkij: Viktor Vislobokov (corochoone@perm.ru)
Samuyu svezhuyu anglijskuyu versiyu dokumenta mozhno najti na
Samuyu svezhuyu anglijskuyu versiyu dokumenta mozhno najti na
http://www.PostgreSQL.org/files/documentation/faqs/FAQ.html.
http://www.PostgreSQL.org/files/documentation/faqs/FAQ.html.
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
1.10) Kak nauchit'sya SQL?
1.10) Kak nauchit'sya SQL?
1.11) Kak prisoedinitsya k komande razrabotchikov?
1.11) Kak prisoedinitsya k komande razrabotchikov?
1.12) Kak sravnivat' PostgreSQL s drugimi SUBD?
1.12) Kak sravnivat' PostgreSQL s drugimi SUBD?
1.13) Kto upravlyaet PostgreSQL?
Voprosy pol'zovatelej po klientskoj chasti
Voprosy pol'zovatelej po klientskoj chasti
...
@@ -70,8 +71,8 @@
...
@@ -70,8 +71,8 @@
4.8) Kak mne vypolnit' poisk regulyarnogo vyrazheniya i poisk
4.8) Kak mne vypolnit' poisk regulyarnogo vyrazheniya i poisk
nezavisimyj ot registra bukv poisk regulyarnogo vyrazheniya? Kak mne
nezavisimyj ot registra bukv poisk regulyarnogo vyrazheniya? Kak mne
ispol'zovat' indeks dlya poiska nezavisimogo ot registra bukv?
ispol'zovat' indeks dlya poiska nezavisimogo ot registra bukv?
4.9) Kak
ya mogu opredelit', chto znachenie polya ravno NULL v
4.9) Kak
mne opredelit', chto znachenie polya ravno NULL v kakom-libo
kakom-libo zaprose
?
zaprose? Mogu ya otsortirovat' polya NULL ili net
?
4.10) Kakovy otlichiya mezhdu raznymi simvol'nymi tipami?
4.10) Kakovy otlichiya mezhdu raznymi simvol'nymi tipami?
4.11.1) Kak mne sozdat' pole serial/s-avto-uvelicheniem?
4.11.1) Kak mne sozdat' pole serial/s-avto-uvelicheniem?
4.11.2) Kak mne poluchit' znachenie pri vstavke SERIAL?
4.11.2) Kak mne poluchit' znachenie pri vstavke SERIAL?
...
@@ -80,30 +81,19 @@
...
@@ -80,30 +81,19 @@
4.11.4) Pochemu chisla iz moej posledovatel'nosti ne ispol'zuyutsya
4.11.4) Pochemu chisla iz moej posledovatel'nosti ne ispol'zuyutsya
snova pri otmene tranzakcii? Pochemu sozdayutsya razryvy pri numeracii
snova pri otmene tranzakcii? Pochemu sozdayutsya razryvy pri numeracii
v kolonke, gde ya ispol'zuyu posledovatel'nost'/SERIAL?
v kolonke, gde ya ispol'zuyu posledovatel'nost'/SERIAL?
4.12) CHto takoe OID? CHto takoe TID?
4.12) CHto takoe OID? CHto takoe
C
TID?
4.13) Pochemu ya poluchayu oshibku "ERROR: Memory exhausted in
4.13) Pochemu ya poluchayu oshibku "ERROR: Memory exhausted in
AllocSetAlloc()"?
AllocSetAlloc()"?
4.14) Kak mne uznat', kakaya versiya PostgreSQL zapuschena?
4.14) Kak mne uznat', kakaya versiya PostgreSQL zapuschena?
4.15) Pochemu pri rabote s moim bol'shim ob"ektom ya poluchayu oshibku
4.15) Kak mne sozdat' kolonku kotoraya po umolchaniyu budet soderzhat'
"invalid large obj descriptor"?
4.16) Kak mne sozdat' kolonku kotoraya po umolchaniyu budet soderzhat'
tekuschee vremya?
tekuschee vremya?
4.17) Kak vypolnit' vneshnee svyazyvanie?
4.16) Kak vypolnit' vneshnee svyazyvanie?
4.18) Kak vypolnyat' zaprosy, ispol'zuyuschie neskol'ko baz dannyh?
4.17) Kak vypolnyat' zaprosy, ispol'zuyuschie neskol'ko baz dannyh?
4.19) Kak mne vernut' iz funkcii neskol'ko strok tablicy?
4.18) Kak mne vernut' iz funkcii neskol'ko strok tablicy?
4.20) Pochemu ya poluchayu oshibku "missing oid", kogda obraschayuts'
4.19) Pochemu ya poluchayu oshibku "relation with OID #### ne
k vremennym tablicam v funkciyah PL/PgSQL?
suschestvuet", kogda obraschayuts' k vremennym tablicam v funkciyah
4.21) Kakie opcii shifrovaniya suschestvuyut?
PL/PgSQL?
4.20) Kakie est' resheniya dlya replikacii?
Rasshireniya PostgreSQL
5.1) YA napisal funkciyu opredelyaemuyu pol'zovatelem. Kogda ya
zapuskayu ee v psql, pochemu ya poluchayu core dump?
5.2) Kak ya mogu vnesti nekotorye klassnye novye tipy i funkcii v
PostgreSQL?
5.3) Kak mne napisat' C funkciyu, vozvraschayuschuyu stroku tablicy?
5.4) YA izmenil ishodnyj fajl. Pochemu posle perekompilyacii ya ne
vizhu izmenenij?
_________________________________________________________________
_________________________________________________________________
Obschie voprosy
Obschie voprosy
...
@@ -137,7 +127,8 @@
...
@@ -137,7 +127,8 @@
Sistema Upravleniya Bazami Dannyh PostgreSQL
Sistema Upravleniya Bazami Dannyh PostgreSQL
Portions copyright (c) 1996-2005, PostgreSQL Global Development Group
Portions copyright (c) 1996-2005, PostgreSQL Global Development Group
Portions Copyright (c) 1994-6 Regents of the University of California
Portions Copyright (c) 1994-1996 Regents of the University of
California
Predostavlyayutsya prava na ispol'zovanie, kopirovanie, izmenenie i
Predostavlyayutsya prava na ispol'zovanie, kopirovanie, izmenenie i
rasprostranenie dannogo programmnogo obespecheniya i ego dokumentacii
rasprostranenie dannogo programmnogo obespecheniya i ego dokumentacii
...
@@ -168,9 +159,9 @@
...
@@ -168,9 +159,9 @@
platform, na kotoryh byli provedeny testovye zapuski PostgreSQL k
platform, na kotoryh byli provedeny testovye zapuski PostgreSQL k
momentu vyhoda dannoj versii.
momentu vyhoda dannoj versii.
Nachinaya s versii 8.0, PostgreSQL bez vsyakih uhischrenij rabotaet na
PostgreSQL takzhe rabotaet na operacionnyh sistemah Microsoft Windows,
o
peracionnyh sistemah Microsoft Windows, osnovannyh na NT, takih kak
o
snovannyh na NT, takih kak Win2000, WinXP i Win2003. Paket
Win2000, WinXP i Win2003. Paket
installyatora dostupen po adresu
installyatora dostupen po adresu
http://pgfoundry.org/projects/pginstaller. Versii Windows, osnovannye
http://pgfoundry.org/projects/pginstaller. Versii Windows, osnovannye
na MS-DOS (Win95, Win98, WinMe) mogut zapuskat' PostgreSQL s
na MS-DOS (Win95, Win98, WinMe) mogut zapuskat' PostgreSQL s
pomosch'yu Cygwin.
pomosch'yu Cygwin.
...
@@ -182,9 +173,8 @@
...
@@ -182,9 +173,8 @@
1.4) Gde mozhno vzyat' PostgreSQL?
1.4) Gde mozhno vzyat' PostgreSQL?
Naprimer, vospol'zovavshis' anonimnym dostupom na ftp sajt PostgreSQL
CHerez brauzer, ispol'zuya http://www.postgresql.org/ftp/ i cherez
ftp://ftp.PostgreSQL.org/pub. Spisok zerkal vy najdete na nashem
ftp, ispol'zuya ftp://ftp.PostgreSQL.org/pub/.
osnovnom sajte.
1.5) Gde poluchit' podderzhku?
1.5) Gde poluchit' podderzhku?
...
@@ -211,13 +201,14 @@
...
@@ -211,13 +201,14 @@
PostgreSQL po adresu: http://www.postgresql.org/support/submitbug.
PostgreSQL po adresu: http://www.postgresql.org/support/submitbug.
Takzhe prover'te nalichie bolee svezhej versii PostgreSQL na nashem
Takzhe prover'te nalichie bolee svezhej versii PostgreSQL na nashem
FTP sajte ftp://ftp.PostgreSQL.org/pub.
FTP sajte ftp://ftp.PostgreSQL.org/pub
/
.
1.7) Kakaya poslednyaya versiya?
1.7) Kakaya poslednyaya versiya?
Poslednij vypusk PostgreSQL - `eto versiya 8.0.
1
Poslednij vypusk PostgreSQL - `eto versiya 8.0.
2
My planiruem vypuskat' novye versii kazhdye 10-12 mesyacev.
My planiruem vypuskat' novye starshie versii kazhdyj god, a mladshie
versii kazhdye neskol'ko mesyacev.
1.8) Kakaya dokumentaciya imeetsya v nalichii?
1.8) Kakaya dokumentaciya imeetsya v nalichii?
...
@@ -229,8 +220,10 @@
...
@@ -229,8 +220,10 @@
Suschestvuet dve knigi po PostgreSQL dostupnye po adresam
Suschestvuet dve knigi po PostgreSQL dostupnye po adresam
http://www.PostgreSQL.org/docs/books/awbook.html i
http://www.PostgreSQL.org/docs/books/awbook.html i
http://www.commandprompt.com/ppbook/. Spisok knig po PostgreSQL,
http://www.commandprompt.com/ppbook/. Est' neskol'ko knig po
kotorye mozhno kupit' dostupen po adresu
PostgreSQL, kotorye mozhno kupit'. Odnu iz naibolee populyarnyh
napisal Korri Duglas (Korry Douglas). Spisok obzorov po `etim knigam
dostupen po adresu
http://techdocs.postgresql.org/techdocs/bookreviews.php. Krome togo,
http://techdocs.postgresql.org/techdocs/bookreviews.php. Krome togo,
po adresu http://techdocs.PostgreSQL.org/ vy mozhete najti kollekciyu
po adresu http://techdocs.PostgreSQL.org/ vy mozhete najti kollekciyu
tehnicheskih statej posvyaschennyh PostgreSQL.
tehnicheskih statej posvyaschennyh PostgreSQL.
...
@@ -250,36 +243,21 @@
...
@@ -250,36 +243,21 @@
1.10) Kak mne nauchit'sya SQL?
1.10) Kak mne nauchit'sya SQL?
Kniga po PostgreSQL na
Vo-pervyh, voz'mite odnu iz knig po PostgreSQL, o kotoryh govorilos'
http://www.PostgreSQL.org/docs/books/awbook.html nauchit SQL.
vyshe. Esche odin uchebnik - `eto kniga "Teach Yourself SQL in 21
Suschestvuet drugaya kniga po PostgreSQL na
Days, Second Edition" (Osvoj samostoyatel'no SQL za 21 den', Vtoraya
http://www.commandprompt.com/ppbook. Est' prekrasnyj uchebnik na
redakciya) na http://members.tripod.com/er4ebus/sql/index.htm. Mnogim
iz nashih pol'zovatelej nravitsya kniga The Practical SQL Handbook,
Bowman, Judith S., et al., Addison-Wesley. Drugim nravitsya The
Complete Reference SQL, Groff et al., McGraw-Hill.
Est' prekrasnyj uchebnik na
http://www.intermedia.net/support/sql/sqltut.shtm, na
http://www.intermedia.net/support/sql/sqltut.shtm, na
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
i na http://sqlcourse.com.
i na http://sqlcourse.com.
Esche odin uchebnik - `eto kniga "Teach Yourself SQL in 21 Days,
Second Edition" (Osvoj samostoyatel'no SQL za 21 den', Vtoraya
redakciya) na http://members.tripod.com/er4ebus/sql/index.htm
Mnogim iz nashih pol'zovatelej nravitsya kniga The Practical SQL
Handbook, Bowman, Judith S., et al., Addison-Wesley. Drugim nravitsya
The Complete Reference SQL, Groff et al., McGraw-Hill.
1.11) Kak prisoedinitsya k komande razrabotchikov?
1.11) Kak prisoedinitsya k komande razrabotchikov?
Dlya nachala, skachajte poslednyuyu versiyu ishodnyh tekstov i
Smotrite FAQ dlya razrabotchikov.
prochtite FAQ i dokumentaciyu dlya razrabotchikov PostgreSQL na nashem
sajte ili v distributive. Zatem, podpishites' na spiski rassylki
pgsql-hackers i pgsql-patches. Dalee, otpravlyajte ispravleniya
(patches) vysokogo kachestva v spisok pgsql-patches.
Suschestvuet ogranichennyj spisok lyudej, kotoryj imeyut privelegiyu
vnosit' izmeneniya v CVS arhiv PostgreSQL. Kazhdyj iz `etih lyudej v
svoe vremya otpravil tak mnogo vysokokachestvennyh ispravlenij, chto
ih bylo nevozmozhno ostavit' bez vnimaniya i oni byli udostoeny
previlegii vnosit' izmeneniya, i my uvereny, chto te ispravleniya,
kotorye oni vnesut budut vysokogo kachestva.
1.12) Kak sravnivat' PostgreSQL s drugimi SUBD?
1.12) Kak sravnivat' PostgreSQL s drugimi SUBD?
...
@@ -298,15 +276,8 @@
...
@@ -298,15 +276,8 @@
Proizvoditel'nost'
Proizvoditel'nost'
Proizvoditel'nost' PostgreSQL shodna s drugimi kommercheskimi
Proizvoditel'nost' PostgreSQL shodna s drugimi kommercheskimi
SUBD i s SUBD s otkrytym ishodnym kodom. V kakih-to veschah my
SUBD i s SUBD s otkrytym ishodnym kodom. V kakih-to veschah my
bystree, v kakih-to medlennee. V sravnenii s MySQL ili linejnoj
bystree, v kakih-to medlennee. Nasha proizvoditel'nosti obychno
SUBD, my bystree, kogda pol'zovatelej mnogo, a takzhe na
+/-10% po sravneniyu s drugimi SUBD.
slozhnyh zaprosah i pri chtenii/zapisi zagruzki zaprosa. MySQL
bystree dlya prostyh SELECT zaprosov, vypolnyaemyh nebol'shim
kolichestvom pol'zovatelej. I razumeetsya, MySQL ne imeet
kakih-libo vozmozhnostej iz perechislenyh vyshe, v sekcii
Vozmozhnosti. My delaem upor na nadezhnost' i rasshirennye
vozmozhnosti, no my takzhe prodolzhaem uvelichivat'
proizvoditel'nost' s kazhdym vypuskom.
Nadezhnost'
Nadezhnost'
My ponimali, chto nasha SUBD dolzhna byt' nadezhnoj ili ona
My ponimali, chto nasha SUBD dolzhna byt' nadezhnoj ili ona
...
@@ -339,6 +310,19 @@
...
@@ -339,6 +310,19 @@
opisyvayutsya v nashej licenzii stilya BSD, kotoraya privedena
opisyvayutsya v nashej licenzii stilya BSD, kotoraya privedena
vyshe.
vyshe.
1.13) Kto upravlyaet PostgreSQL?
Esli vy ischite kakogo-to osobennogo cheloveka, central'nyj komitet
ili upravlyayuschuyu kompaniyu, to naprasno --- ih net. U nas est'
yadro komiteta i razrabotchikov, rabotayuschih s CVS, no `eti gruppy
sluzhat bol'she dlya administrativnyh celej, chem dlya upravleniya.
Proekt napryamuyu funkcioniruet s pomosch'yu soobschestva
razrabotchikov i pol'zovatelej, k kotoromu mozhet prisoedinitsya
kazhdyj. Vsio chto nuzhno -- `eto podpisat'sya na spiski rassylki i
uchastvovat' v diskussiyah. (Podrobnosti o tom kak vklyuchit'sya v
razrabotku PostgreSQL smotrite v FAQ dlya razrabotchikov.)
_________________________________________________________________
Voprosy pol'zovatelej po klientskoj chasti
Voprosy pol'zovatelej po klientskoj chasti
2.1) Kakie interfejsy est' dlya PostgreSQL?
2.1) Kakie interfejsy est' dlya PostgreSQL?
...
@@ -363,18 +347,13 @@
...
@@ -363,18 +347,13 @@
Dlya integracii s Web, PHP http://www.php.net yavlyaetsya neplohim
Dlya integracii s Web, PHP http://www.php.net yavlyaetsya neplohim
interfejsom.
interfejsom.
V slozhnyh sluchayah, mnogie pol'zuyutsya Perl i CGI.pm ili mod_perl.
V slozhnyh sluchayah, mnogie pol'zuyutsya Perl i DBD::Pg s CGI.pm ili
mod_perl.
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, podrobnosti smotrite v
Oni vklyuchayut PgAdmin III (http://www.pgadmin.org), PgAccess
http://techdocs.postgresql.org/guides/GUITools.
(http://www.pgaccess.org), RHDB Admin
(http://sources.redhat.com/rhdb/), TORA (http://www.globecom.net/tora/
chastichno kommercheskoe PO) i Rekall (
http://www.rekallrevealed.org/). Takzhe est' PhpPgAdmin (
http://phppgadmin.sourceforge.net/) - interfejs k PostgreSQL,
osnovannyj na Web.
_________________________________________________________________
_________________________________________________________________
Voprosy administrirovaniya
Voprosy administrirovaniya
...
@@ -391,8 +370,7 @@
...
@@ -391,8 +370,7 @@
izmenit' listen_addresses v postgresql.conf, razreshit'
izmenit' listen_addresses v postgresql.conf, razreshit'
host-avtorizaciya v fajle $PGDATA/pg_hba.conf i perestartovat' server.
host-avtorizaciya v fajle $PGDATA/pg_hba.conf i perestartovat' server.
3.3) Kakie nastrojki mne nuzhno sdelat' dlya uluchsheniya
3.3) Kakie nastrojki mne nuzhno sdelat' dlya uluchsheniya proizvoditel'nosti?
proizvoditel'nosti?
Suschestvuet tri glavnyh oblasti, kotorye potencial'no mogut
Suschestvuet tri glavnyh oblasti, kotorye potencial'no mogut
uvelichit' proizvoditel'nost':
uvelichit' proizvoditel'nost':
...
@@ -437,43 +415,6 @@
...
@@ -437,43 +415,6 @@
processa, kotoraya ochen' polezna dlya otladki i izmereniya
processa, kotoraya ochen' polezna dlya otladki i izmereniya
proizvoditel'nosti.
proizvoditel'nosti.
Dlya predostavleniya bolee detal'noj informacii razrabotchikam servera
pri otladke kakoj-libo problemy dolzhny pol'zovat'sya sleduyuschie
instrukcii.
Takim zhe obrazom mozhno proizvodit' i otladku severa, esli on
rabotaet nepravil'no. Vo-pervyh, pri zapuske configure s opciej
--enable-cassert, mnogie vyzovy assert() pozvolyayut otslezhivat'
rabotu backend processa i ostanovku programmy pri vozniknovenii
kakih-libo neozhidannostej.
Esli postmaster ne zapuschen, vy mozhete zapustit' postgres backend iz
komandnoj stroki i vvesti vash operator SQL napryamuyu. `Eto
rekomenduetsya tol'ko dlya celej otladki. Zametim, chto v `etom
rezhime, zapros zavershaetsya simvolom novoj stroki, a ne tochkoj s
zapyatoj. Esli vy proizvodili kompilyaciyu s otladochnymi simvolami,
vy mozhete ispol'zovat' lyuboj otladchik, chtoby posmotret', chto
sluchilos'. Poskol'ku backend zapuskaetsya ne iz postmaster, on ne
zapuskaetsya v identichnom okruzhenii i znachit problemy iteracij
blokirovok/backend ne mogut byt' vosproizvedeny.
Esli postmaster zapuschen, zapustite psql v odnom okne, zatem najdite
PID processa postgres, ispol'zuemyj psql, ispol'zuya SELECT
pg_backend_pid(). Ispol'zujte otladchik dlya podklyucheniya k postgres
PID. Vy mozhete ustanovit' tochki preryvaniya v otladchike i zapustit'
zapros iz psql. Esli vy proizvodite otladku zapuska postgres, vy
mozhete ustanovit' PGOPTIONS="-W n", i zatem zapustit' psql. `Eta
opciya privodit k zaderzhke processa zapuska na n sekund, v techenie
kotoryh vy mozhete podklyuchit' k processu otladchik, ustanovit'
lyubye tochki preryvaniya i prodolzhit' zapusk.
Vy takzhe mozhete skompilirovat' PostgreSQL s profilirovaniem dlya
togo, chtoby uvidet' kakie funkcii skol'ko vremeni vypolnyayutsya.
Fajly profilirovaniya backend'a nahodyatsya v kataloge
pgsql/data/base/dbname. Fajl profilirovaniya klienta budet pomeschen v
tekuschij katalog klienta. V Linux dlya vypolneniya profilirovaniya
trebuetsya kompilyacii s -DLINUX_PROFILE.
3.5) Pochemu ya poluchayu soobschenie "Sorry, too many clients" kogda
3.5) Pochemu ya poluchayu soobschenie "Sorry, too many clients" kogda
pytayus' podklyuchit'sya k baze?
pytayus' podklyuchit'sya k baze?
...
@@ -487,7 +428,7 @@
...
@@ -487,7 +428,7 @@
PostgreSQL?
PostgreSQL?
Razrabotchiki PostgreSQL delayut tol'ko nebol'shie izmeneniya mezhdu
Razrabotchiki PostgreSQL delayut tol'ko nebol'shie izmeneniya mezhdu
podvypuskami. Takim obrazom obnovlenie s versii 7.4 do 7.4.1 ne
podvypuskami. Takim obrazom obnovlenie s versii 7.4
.0
do 7.4.1 ne
trebuet vypolneniya dump i restore. Odnako pri vyhode ocherednogo
trebuet vypolneniya dump i restore. Odnako pri vyhode ocherednogo
vypuska (t.e. pri obnovlenii naprimer, s 7.3 na 7.4) chasto menyaetsya
vypuska (t.e. pri obnovlenii naprimer, s 7.3 na 7.4) chasto menyaetsya
vnutrennij format sistemnyh tablic i fajlov dannyh. `Eti izmeneniya
vnutrennij format sistemnyh tablic i fajlov dannyh. `Eti izmeneniya
...
@@ -520,11 +461,11 @@
...
@@ -520,11 +461,11 @@
Proizvol'noj stroki?
Proizvol'noj stroki?
Dlya polucheniya tol'ko neskol'kih strok, esli vy znaete ih
Dlya polucheniya tol'ko neskol'kih strok, esli vy znaete ih
kolichestvo na moment vypolneniya SELECT ispol'zujte LIMIT.
Esli est'
kolichestvo na moment vypolneniya SELECT ispol'zujte LIMIT.
kakoj-libo indeks, kotoryj sovpadaet s ORDER BY, to vozmozhno, ch
to
Esli est' kakoj-libo indeks, kotoryj sovpadaet s ORDER BY,
to
v
es' zapros vypolnen i ne budet. Esli vy ne znaete kolichestva
v
ozmozhno, chto ves' zapros vypolnen i ne budet. Esli vy ne znaete
neobhodimyh strok na moment vypolneniya SELECT, ispol'zujte kursor i
kolichestva neobhodimyh strok na moment vypolneniya SELECT,
FETCH.
ispol'zujte kursor i
FETCH.
To SELECT a random row, use:
To SELECT a random row, use:
SELECT col
SELECT col
...
@@ -567,8 +508,7 @@
...
@@ -567,8 +508,7 @@
ALTER TABLE tab DROP COLUMN old_col;
ALTER TABLE tab DROP COLUMN old_col;
COMMIT;
COMMIT;
4.4) Kakovy maksimal'nye razmery dlya strok v tablice, tablic i bazy
4.4) Kakovy maksimal'nye razmery dlya strok v tablice, tablic i bazy dannyh?
dannyh?
Suschestvuyut sleduyuschie ogranicheniya:
Suschestvuyut sleduyuschie ogranicheniya:
...
@@ -633,12 +573,12 @@
...
@@ -633,12 +573,12 @@
4.6) Pochemu moi zaprosy rabotayut medleno? Pochemu oni ne ispol'zuyut moi
4.6) Pochemu moi zaprosy rabotayut medleno? Pochemu oni ne ispol'zuyut moi
indeksy?
indeksy?
Indeksy ne ispol'zuyutsya dlya kazhdogo zaprosa
avtomaticheski. Oni
Indeksy ne ispol'zuyutsya dlya kazhdogo zaprosa
. Oni ispol'zuyutsya
ispol'zuyutsya tol'ko esli tablica bol'she minimal'nogo razmera i
tol'ko esli tablica bol'she minimal'nogo razmera i zapros vybiraet
zapros vybiraet tol'ko malen'kij procent strok v tablice. Tak
tol'ko malen'kij procent strok v tablice. Tak ustroeno, potomu chto
ustroeno, potomu chto dostup k disku s primeneniem randomizacii pri
dostup k disku s primeneniem randomizacii pri skanirovanii indeksov
skanirovanii indeksov mozhet byt' medlennee, chem prostoe chteni
e
mozhet byt' medlennee, chem prostoe chtenie tablicy ili e
e
tablicy ili ee
posledovatel'noe skanirovanie.
posledovatel'noe skanirovanie.
CHtoby opredelit' neobhodimost' ispol'zovaniya indeksa dlya kakoj-libo
CHtoby opredelit' neobhodimost' ispol'zovaniya indeksa dlya kakoj-libo
tablicy, PostgreSQL dolzhen imet' statistiku po `etoj tablice. `Eta
tablicy, PostgreSQL dolzhen imet' statistiku po `etoj tablice. `Eta
...
@@ -665,8 +605,8 @@
...
@@ -665,8 +605,8 @@
Esli vam kazhetsya, chto optimizator nekorrektno vybiraet
Esli vam kazhetsya, chto optimizator nekorrektno vybiraet
posledovatel'nyj perebor, ispol'zujte SET enable_seqscan TO 'off' i
posledovatel'nyj perebor, ispol'zujte SET enable_seqscan TO 'off' i
zapustite
testy, chtoby uvidet', ne stalo-li skanirovanie indeksov
zapustite
zapros snova, chtoby uvidet', dejstvitel'no li skanirovanie
bystree.
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:
...
@@ -693,9 +633,9 @@
...
@@ -693,9 +633,9 @@
Smotrite stranicu rukovodstva posvyaschennuyu EXPLAIN.
Smotrite stranicu rukovodstva posvyaschennuyu EXPLAIN.
4.8) Kak mne vypolnit' poisk regulyarnogo vyrazheniya i poisk nezavisimyj
4.8) Kak mne vypolnit' poisk regulyarnogo vyrazheniya i poisk nezavisimyj ot
ot registra bukv poisk regulyarnogo vyrazheniya? Kak mne ispol'zovat'
registra bukv poisk regulyarnogo vyrazheniya? Kak mne ispol'zovat' indeks
indeks
dlya poiska nezavisimogo ot registra bukv?
dlya poiska nezavisimogo ot registra bukv?
Operator ~ proizvodit poisk regulyarnogo vyrazheniya, a operator ~*
Operator ~ proizvodit poisk regulyarnogo vyrazheniya, a operator ~*
proizvodit nezavisimyj ot registra bukv poisk regulyarnogo
proizvodit nezavisimyj ot registra bukv poisk regulyarnogo
...
@@ -710,10 +650,21 @@
...
@@ -710,10 +650,21 @@
esli vy sozdadite indeks vyrazheniya, on budet ispol'zovan:
esli vy sozdadite indeks vyrazheniya, on budet ispol'zovan:
CREATE INDEX tabindex ON tab (lower(col));
CREATE INDEX tabindex ON tab (lower(col));
4.9) Kak ya mogu
opredelit', chto znachenie polya ravno NULL v kakom-libo
4.9) Kak mne
opredelit', chto znachenie polya ravno NULL v kakom-libo
zaprose
?
zaprose? Mogu ya otsortirovat' polya NULL ili net
?
Vy prosto sravnivaete znachenie s IS NULL i IS NOT NULL.
Vy prosto sravnivaete znachenie s IS NULL i IS NOT NULL, kak zdes':
SELECT *
FROM tab
WHERE col IS NULL;
CHtoby otsortirovat' dannye po znacheniyu ispol'zujte modifikatory IS
NULL i IS NOT NULL v vyrazhenii ORDER BY. Kogda oni budut generirovat'
znacheniya istina, to pri sortirovke oni budut vyshe, chem znacheniya
lozh', tak chto zapisi s NULL budut v otsortirovannom spiske sverhu:
SELECT *
FROM tab
ORDER BY (col IS NOT NULL);
4.10) Kakovy otlichiya mezhdu raznymi simvol'nymi tipami?
4.10) Kakovy otlichiya mezhdu raznymi simvol'nymi tipami?
...
@@ -731,10 +682,9 @@
...
@@ -731,10 +682,9 @@
Pervye chetyre tipa yavlyayutsya "varlena" tipami (t.e., pervye
Pervye chetyre tipa yavlyayutsya "varlena" tipami (t.e., pervye
chetyre bajta na diske yavlyayutsya dlinnoj, za kotoroj sleduyut
chetyre bajta na diske yavlyayutsya dlinnoj, za kotoroj sleduyut
dannye). Takim obrazom, fakticheski ispol'zuemoe prostranstvo bol'she,
dannye). Takim obrazom, fakticheski ispol'zuemoe prostranstvo bol'she,
chem oboznachennyj razmer. Odnako, `eti tipy dannyh takzhe poddayutsya
chem oboznachennyj razmer. Odnako, dlinnye znacheniya takzhe
szhatiyu ili mogut byt' sohraneny ne v strokom vide cherez TOAST, tak
szhimayutsya, tak chto zanimaemoe diskovoe prostranstvo mozhet takzhe
chto zanimaemoe diskovoe prostranstvo mozhet takzhe byt' i men'she,
byt' i men'she, chem ozhidalos'.
chem ozhidalos'.
VARCHAR(n) - `eto luchshee reshenie, kogda nuzhno hranit' stroki
VARCHAR(n) - `eto luchshee reshenie, kogda nuzhno hranit' stroki
peremennoj dliny, ne prevyshayuschie opredelennogo razmera. TEXT -
peremennoj dliny, ne prevyshayuschie opredelennogo razmera. TEXT -
`eto luchshee reshenie dlya strok neogranichennoj dliny, s maksimal'no
`eto luchshee reshenie dlya strok neogranichennoj dliny, s maksimal'no
...
@@ -794,16 +744,16 @@
...
@@ -794,16 +744,16 @@
Net. currval() vozvraschaet tekuschee znachenie, naznachennoe vashej
Net. currval() vozvraschaet tekuschee znachenie, naznachennoe vashej
sessiej, a ne drugimi sessiyami.
sessiej, a ne drugimi sessiyami.
4.11.4) Pochemu chisla iz moej posledovatel'nosti ne ispol'zuyutsya snova
4.11.4) Pochemu chisla iz moej posledovatel'nosti ne ispol'zuyutsya snova pri
pri otmene tranzakcii? Pochemu sozdayutsya razryvy pri numeracii v kolonke,
otmene tranzakcii? Pochemu sozdayutsya razryvy pri numeracii v kolonke, gde
gde
ya ispol'zuyu posledovatel'nost'/SERIAL?
ya ispol'zuyu posledovatel'nost'/SERIAL?
Dlya realizacii konkuretnosti, znacheniya posledovatel'nostej, pri
Dlya realizacii konkuretnosti, znacheniya posledovatel'nostej, pri
neobhodimosti vydayutsya vo vremya zapuska tranzakcij i ne
neobhodimosti vydayutsya vo vremya zapuska tranzakcij i ne
blokiruyutsya do polnogo vypolneniya tranzakcij. `Eto mozhet vyzyvat'
blokiruyutsya do polnogo vypolneniya tranzakcij. `Eto mozhet vyzyvat'
razryvy v numeracii pri otmene tranzakcij.
razryvy v numeracii pri otmene tranzakcij.
4.12) CHto takoe OID? CHto takoe
TID?
4.12) CHto takoe OID? CHto takoe C
TID?
Kazhdaya, sozdavaemaya v PostgreSQL tablichnaya stroka, poluchaet
Kazhdaya, sozdavaemaya v PostgreSQL tablichnaya stroka, poluchaet
unikal'nyj indentifikator OID za isklyucheniem sluchaya kogda
unikal'nyj indentifikator OID za isklyucheniem sluchaya kogda
...
@@ -819,10 +769,12 @@
...
@@ -819,10 +769,12 @@
obrazom men'she podverzheny perepolneniyu. Dlya hraneniya znachenij
obrazom men'she podverzheny perepolneniyu. Dlya hraneniya znachenij
8-mi bajtnoj posledovatel'nosti dostupen tip SERIAL8.
8-mi bajtnoj posledovatel'nosti dostupen tip SERIAL8.
TID ispol'zuetsya dlya identifikacii special'nyh fizicheskih zapisej s
CTID ispol'zuetsya dlya identifikacii special'nyh fizicheskih zapisej
blochnymi i offset znacheniyami. TID izmenyaetsya posle togo kak
s blochnymi i offset znacheniyami. CTID izmenyaetsya posle togo kak
stroki v tablice byli izmeneny ili peregruzheny. TID ispol'zuetsya
stroki v tablice byli izmeneny ili peregruzheny.
indeksnymi zapisyami v kachestve ukazatelya na fizicheskie zapisi.
TID ispol'zuetsya indeksnymi zapisyami v kachestve ukazatelya na
fizicheskie zapisi.
4.13) Pochemu ya poluchayu oshibku "ERROR: Memory exhausted in
4.13) Pochemu ya poluchayu oshibku "ERROR: Memory exhausted in
AllocSetAlloc()"?
AllocSetAlloc()"?
...
@@ -845,31 +797,13 @@
...
@@ -845,31 +797,13 @@
Iz psql, naberite SELECT version();
Iz psql, naberite SELECT version();
4.15) Pochemu pri rabote s moim bol'shim ob"ektom ya poluchayu oshibku
4.15) Kak mne sozdat' kolonku kotoraya po umolchaniyu budet soderzhat'
"invalid large obj descriptor"?
Vam nuzhno pri ispol'zovanii bol'shogo ob"ekta pomestit' v nachale
BEGIN WORK i v konce COMMIT, a vnutri poluchivshegosya bloka lo_open
... lo_close.
V nastoyaschij moment PostgreSQL trebuet, chtoby pri zakrytii
bol'shogo ob"ekta proishodilo vypolnenie tranzakcii. Takim obrazom,
pervaya zhe popytka sdelat' chto-libo s bol'shim ob"ektom, ne
soblyudaya dannogo pravila privedet k soobscheniyu invalid large obj
descriptor, tak kak kod vypolnyayuschij rabotu nad bol'shim ob"ektom
(po krajnej mere v nastoyaschij moment) budet generirovat' soobschenie
ob oshibke esli vy ne ispol'zuete tranzakciyu.
Esli vy ispol'zuete takoj interfejs klienta kak ODBC, vam vozmozhno
ponadobitsya ustanovit' auto-commit off.
4.16) Kak mne sozdat' kolonku kotoraya po umolchaniyu budet soderzhat'
tekuschee vremya?
tekuschee vremya?
Ispol'zujte CURRENT_TIMESTAMP:
Ispol'zujte CURRENT_TIMESTAMP:
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
4.17
) Kak mne vypolnit' vneshnee svyazyvanie?
4.16
) Kak mne vypolnit' vneshnee svyazyvanie?
PostgreSQL podderzhivaet vneshnee svyazyvanie, ispol'zuya standartnyj
PostgreSQL podderzhivaet vneshnee svyazyvanie, ispol'zuya standartnyj
sintaksis SQL. Vot dva primera:
sintaksis SQL. Vot dva primera:
...
@@ -888,7 +822,7 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -888,7 +822,7 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
neobyazatel'nym i naznachaetsya v LEFT, RIGHT i FULL svyazyvaniyah.
neobyazatel'nym i naznachaetsya v LEFT, RIGHT i FULL svyazyvaniyah.
Obychnye svyazyvaniya nazyvayutsya INNER svyazyvaniya.
Obychnye svyazyvaniya nazyvayutsya INNER svyazyvaniya.
4.18
) Kak vypolnyat' zaprosy, ispol'zuyuschie neskol'ko baz dannyh?
4.17
) Kak vypolnyat' zaprosy, ispol'zuyuschie neskol'ko baz dannyh?
Ne suschestvuet sposoba sozdat' zapros k bazam dannyh otlichnym ot
Ne suschestvuet sposoba sozdat' zapros k bazam dannyh otlichnym ot
tekuschej. Poskol'ku PostgreSQL zagruzhaet sistemnye katalogi
tekuschej. Poskol'ku PostgreSQL zagruzhaet sistemnye katalogi
...
@@ -900,13 +834,13 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -900,13 +834,13 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
soedieneniya s razlichnymi bazami dannyh i takih obrazom ob"edinyat'
soedieneniya s razlichnymi bazami dannyh i takih obrazom ob"edinyat'
informaciyu iz nih.
informaciyu iz nih.
4.19
) Kak mne vernut' iz funkcii neskol'ko strok tablicy?
4.18
) Kak mne vernut' iz funkcii neskol'ko strok tablicy?
Vy mozhete legko ispol'zovat' funkcii, vozvraschayuschie spisok,
Vy mozhete legko ispol'zovat' funkcii, vozvraschayuschie spisok,
http://techdocs.postgresql.org/guides/SetReturningFunctions.
http://techdocs.postgresql.org/guides/SetReturningFunctions.
4.20) Pochemu ya poluchayu oshibku "missing oid", kogda obraschayuts' k
4.19) Pochemu ya poluchayu oshibku "relation with OID #### ne suschestvuet",
vremennym tablicam v funkciyah PL/PgSQL?
kogda obraschayuts' k
vremennym tablicam v funkciyah PL/PgSQL?
PL/PgSQL k`eshiruet scenarii funkcii i odin iz negativnyh `effektov
PL/PgSQL k`eshiruet scenarii funkcii i odin iz negativnyh `effektov
`etogo sostoit v tom, chto esli funkciya PL/PgSQL obraschaetsya k
`etogo sostoit v tom, chto esli funkciya PL/PgSQL obraschaetsya k
...
@@ -917,50 +851,21 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -917,50 +851,21 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
EXECUTE dlya dostupa k vremennym tablicam v PL/PgSQL. Ispol'zovanie
EXECUTE dlya dostupa k vremennym tablicam v PL/PgSQL. Ispol'zovanie
`etogo operatora zastavit zapros peregenerirovat'sya kazhdyj raz.
`etogo operatora zastavit zapros peregenerirovat'sya kazhdyj raz.
4.21) Kakie opcii shifrovaniya suschestvuyut?
4.20) Kakie est' resheniya dlya replikacii?
* contrib/pgcrypto soderzhit mnogo funkcij shifrovaniya dlya
ispol'zovaniya v SQL zaprosah.
* Dlya shifrovaniya peredavaemyh dannyh ot klienta k serveru, na
servere v fajle postgresql.conf, opciya ssl dolzhna byt'
ustanovlena v true, v fajle pg_hba.conf dolzhna byt'
sootvetstvuyuschaya zapis' host ili hostssl i na storone klienta
sslmode ne dolzhen byt' zapreschion cherez disable. (Zametim, chto
takzhe vozmozhno ispol'zovanie nezavisimyh vneshnih shifruyuschih
transportov, takih kak stunnel ili ssh, vmesto sobstvennyh SSL
soedinenij PostgreSQL).
* Paroli pol'zovatelej k baze dannyh avtomaticheski shifruyutsya,
pri sohranenii v sistemnyh tablicah.
* Server mozhno zapustit', ispol'zuya shifrovannuyu fajlovuyu
sistemu.
_________________________________________________________________
Rasshireniya PostgreSQL
5.1) YA napisal funkciyu opredelyaemuyu pol'zovatelem. Kogda ya zapuskayu
ee v psql, pochemu ya poluchayu core dump?
Problema mozhet zaklyuchat'sya v neskol'kih veschah. Popytajtes'
sperva protestirovat' vashu funkciyu v otdel'noj samostoyatel'noj
programme.
5.2) Kak ya mogu vnesti nekotorye klassnye novye tipy i funkcii v
PostgreSQL?
Otprav'te vashi rasshireniya v spisok rassylki pgsql-hackers i oni po
vozmozhnosti budut pomescheny v podkatalog contrib/.
5.3) Kak mne napisat' C funkciyu, vozvraschayuschuyu stroku tablicy?
V versiyah PostgreSQL, nachinaya s 7.3, funkcii, vozvraschayuschie
Hotya "replikaciya" -- `eto edinyj termin, est' neskol'ko raznyh
tablicy polnost'yu podderzhivayutsya v C, PL/PgSQL i SQL. Podrobnosti
tehnologij dlya vypolneniya replikacij s raznymi osobennostyami dlya
smotrite v Rukovodstve Programmista. Primer vozvraschayuschej tablicu
kazhdoj.
funkcii, napisannoj na C, mozhno najti v contrib/tablefunc.
5.4) YA izmenil ishodnyj fajl. Pochemu posle perekompilyacii ya ne vizhu
Replikaciya Master/slave pozvolyaet imet' odin glavnyj (master) server
izmenenij?
dlya vypolneniya zaprosov chteniya/zapisi, v to vremya kak
podchinionnye (slave) servera mogut proizvodit' tol'ko zaprosy
chteniya/SELECT. Naibolee populyarnym resheniem dlya replikacii
master-slave v PostgreSQL yavlyaetsya Slony-I.
Fajly Makefile ne imeyut pravil'nyh zavisimostej dlya include fajlov.
Replikaciya Multi-master pozvolyaet vypolnyat' zaprosy chteniya/zapisi
Vy dolzhny vypolnit' make clean i zatem make. Esli vy ispol'zuete GCC
na neskol'kih, repliciruemyh drug s drugom komp'yuetrah. `Eta
vy mozhete ispol'zovat' opciyu --enable-depend v configure chtoby
osobennost' takzhe privodit k potere proizvoditel'nosti, potomu chto
poruchit' kompilyatoru avtomaticheski otslezhivat' zavisimosti.
neobhodima sinhronizaciya izmenenij mezhdu neskol'kimi serverami.
Naibolee populyarnym resheniem dlya takoj replikacii v PostgreSQL
yavlyaetsya Pgcluster.
doc/src/FAQ/FAQ_russian.html
View file @
1bdec342
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
<BODY
bgcolor=
"#ffffff"
text=
"#000000"
link=
"#ff0000"
vlink=
"#a00000"
alink=
"#0000ff"
>
<BODY
bgcolor=
"#ffffff"
text=
"#000000"
link=
"#ff0000"
vlink=
"#a00000"
alink=
"#0000ff"
>
<H1>
PostgreSQL
</H1>
<H1>
PostgreSQL
</H1>
<P>
:
14 23:35:09 ES
T 2005
</P>
<P>
:
30 09:11:03 ED
T 2005
</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>
</P>
</P>
<P>
: (
<A
href=
<P>
ף
: (
<A
href=
"mailto:corochoone@perm.ru"
>
corochoone@perm.ru
</A>
)
<BR>
"mailto:corochoone@perm.ru"
>
corochoone@perm.ru
</A>
)
<BR>
</P>
</P>
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<A
href=
"#1.11"
>
1.11
</A>
) ?
<BR>
<A
href=
"#1.11"
>
1.11
</A>
) ?
<BR>
<A
href=
"#1.12"
>
1.12
</A>
) PostgreSQL
<A
href=
"#1.12"
>
1.12
</A>
) PostgreSQL
<SMALL></SMALL>
?
<BR>
<SMALL></SMALL>
?
<BR>
<A
href=
"#1.13"
>
1.13
</A>
) PostgreSQL?
<BR>
<H2
align=
"center"
>
</H2>
<H2
align=
"center"
>
</H2>
...
@@ -87,8 +88,9 @@
...
@@ -87,8 +88,9 @@
<A
href=
"#4.8"
>
4.8
</A>
)
<A
href=
"#4.8"
>
4.8
</A>
)
?
?
?
<BR>
?
<BR>
<A
href=
"#4.9"
>
4.9
</A>
) ,
<A
href=
"#4.9"
>
4.9
</A>
) ,
<SMALL>
NULL
</SMALL>
- ?
<BR>
<SMALL>
NULL
</SMALL>
- ?
<SMALL>
NULL
</SMALL>
?
<BR>
<A
href=
"#4.10"
>
4.10
</A>
)
<A
href=
"#4.10"
>
4.10
</A>
)
?
<BR>
?
<BR>
<A
href=
"#4.11.1"
>
4.11.1
</A>
) serial/--?
<BR>
<A
href=
"#4.11.1"
>
4.11.1
</A>
) serial/--?
<BR>
...
@@ -101,38 +103,26 @@
...
@@ -101,38 +103,26 @@
?
?
, /SERIAL?
<BR>
, /SERIAL?
<BR>
<A
href=
"#4.12"
>
4.12
</A>
)
<SMALL>
OID
</SMALL>
?
<A
href=
"#4.12"
>
4.12
</A>
)
<SMALL>
OID
</SMALL>
?
<SMALL>
TID
</SMALL>
?
<BR>
<SMALL>
C
TID
</SMALL>
?
<BR>
<A
href=
"#4.13"
>
4.13
</A>
)
<I>
"ERROR: Memory
<A
href=
"#4.13"
>
4.13
</A>
)
<I>
"ERROR: Memory
exhausted in AllocSetAlloc()"
</I>
?
<BR>
exhausted in AllocSetAlloc()"
</I>
?
<BR>
<A
href=
"#4.14"
>
4.14
</A>
) , PostgreSQL
<A
href=
"#4.14"
>
4.14
</A>
) , PostgreSQL
?
<BR>
?
<BR>
<A
href=
"#4.15"
>
4.15
</A>
)
<A
href=
"#4.15"
>
4.15
</A>
)
<I>
"invalid large obj descriptor"
</I>
?
<BR>
<A
href=
"#4.16"
>
4.16
</A>
)
?
<BR>
?
<BR>
<A
href=
"#4.1
7"
>
4.17
</A>
) ?
<BR>
<A
href=
"#4.1
6"
>
4.16
</A>
) ?
<BR>
<A
href=
"#4.1
8"
>
4.18
</A>
) ,
<A
href=
"#4.1
7"
>
4.17
</A>
) ,
?
<BR>
?
<BR>
<A
href=
"#4.19"
>
4.19
</A>
) ?
<BR>
<A
href=
"#4.18"
>
4.18
</A>
) ?
<BR>
<A
href=
"#4.20"
>
4.20
</A>
) "missing oid",
<A
href=
"#4.19"
>
4.19
</A>
) "relation with OID ####
PL/PgSQL?
<BR>
", PL/PgSQL?
<BR>
<A
href=
"#4.21"
>
4.21
</A>
) ?
<BR>
<A
href=
"#4.20"
>
4.20
</A>
) ?
<BR>
<H2
align=
"center"
>
PostgreSQL
</H2>
<A
href=
"#5.1"
>
5.1
</A>
) .
<I>
psql
</I>
, core dump?
<BR>
<A
href=
"#5.2"
>
5.2
</A>
)
PostgreSQL?
<BR>
<A
href=
"#5.3"
>
5.3
</A>
) C ,
?
<BR>
<A
href=
"#5.4"
>
5.4
</A>
) .
?
<BR>
<HR>
<HR>
<H2
align=
"center"
>
</H2>
<H2
align=
"center"
>
</H2>
<H
4><A
name=
"1.1"
>
1.1
</A>
) PostgreSQL? ?
</H4
>
<H
3><A
name=
"1.1"
>
1.1
</A>
) PostgreSQL? ?
</H3
>
<P>
PostgreSQL
<I>
Post-Gres-Q-L (---)
</I>
,
<P>
PostgreSQL
<I>
Post-Gres-Q-L (---)
</I>
,
<I>
Postgres
</I>
.
</P>
<I>
Postgres
</I>
.
</P>
...
@@ -151,7 +141,7 @@
...
@@ -151,7 +141,7 @@
http://www.PostgreSQL.org/files/documentation/faqs/FAQ_DEV.html
</A>
http://www.PostgreSQL.org/files/documentation/faqs/FAQ_DEV.html
</A>
</P>
</P>
<H
4><A
name=
"1.2"
>
1.2
</A>
) PostgreSQL?
</H4
>
<H
3><A
name=
"1.2"
>
1.2
</A>
) PostgreSQL?
</H3
>
<P>
PostgreSQL BSD.
<P>
PostgreSQL BSD.
,
,
...
@@ -163,7 +153,7 @@
...
@@ -163,7 +153,7 @@
<P>
PostgreSQL
</P>
<P>
PostgreSQL
</P>
<P>
Portions copyright (c) 1996-2005, PostgreSQL Global Development
<P>
Portions copyright (c) 1996-2005, PostgreSQL Global Development
Group Portions Copyright (c) 1994-6 Regents of the University of
Group Portions Copyright (c) 1994-
199
6 Regents of the University of
California
</P>
California
</P>
<P>
, ,
<P>
, ,
...
@@ -187,16 +177,16 @@
...
@@ -187,16 +177,16 @@
" "
" "
, , , .
</P>
, , , .
</P>
<H
4><A
name=
"1.3"
>
1.3
</A>
) PostgreSQL?
</H4
>
<H
3><A
name=
"1.3"
>
1.3
</A>
) PostgreSQL?
</H3
>
<P>
, PostgreSQL
<P>
, PostgreSQL
Unix. ,
Unix. ,
, PostgreSQL
, PostgreSQL
.
</P>
.
</P>
<P>
8.0, PostgreSQL
<P>
PostgreSQL Microsoft
Microsoft Windows, NT,
Windows, NT, Win2000, WinXP Win2003.
Win2000, WinXP Win2003.
<A
href=
"http://pgfoundry.org/projects/pginstaller"
>
<A
href=
"http://pgfoundry.org/projects/pginstaller"
>
http://pgfoundry.org/projects/pginstaller
</A>
. Windows,
http://pgfoundry.org/projects/pginstaller
</A>
. Windows,
MS-DOS (Win95, Win98, WinMe)
MS-DOS (Win95, Win98, WinMe)
...
@@ -208,14 +198,13 @@
...
@@ -208,14 +198,13 @@
<A
href=
"http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgreSQL&stype=all&sort=type&dir=%2F"
>
<A
href=
"http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgreSQL&stype=all&sort=type&dir=%2F"
>
http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1
&
button=Search
&
key=postgreSQL
&
stype=all
&
sort=type
&
dir=%2F
</A>
.
</P>
http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1
&
button=Search
&
key=postgreSQL
&
stype=all
&
sort=type
&
dir=%2F
</A>
.
</P>
<H
4><A
name=
"1.4"
>
1.4
</A>
) PostgreSQL?
</H4
>
<H
3><A
name=
"1.4"
>
1.4
</A>
) PostgreSQL?
</H3
>
<P>
, ftp
<P>
,
<a
href=
"http://www.postgresql.org/ftp/"
>
PostgreSQL
<A
href=
http://www.postgresql.org/ftp/
</a>
ftp,
"ftp://ftp.PostgreSQL.org/pub"
>
ftp://ftp.PostgreSQL.org/pub
</A>
.
<A
href=
"ftp://ftp.PostgreSQL.org/pub/"
>
ftp://ftp.PostgreSQL.org/pub/
</A>
.
</P>
.
</P>
<H
4><A
name=
"1.5"
>
1.5
</A>
) ?
</H4
>
<H
3><A
name=
"1.5"
>
1.5
</A>
) ?
</H3
>
<P>
PostgreSQL
<P>
PostgreSQL
E-mail. web-
E-mail. web-
...
@@ -233,28 +222,30 @@
...
@@ -233,28 +222,30 @@
. PostgreSQL EFNet.
</P>
. PostgreSQL EFNet.
</P>
<P>
<P>
<A
href=
"http://techdocs.postgresql.org/companies.php"
>
http://techdocs.postgresql.org/companies.php
</A>
.
</P>
<A
href=
"http://techdocs.postgresql.org/companies.php"
>
http://techdocs.postgresql.org/companies.php
</A>
.
</P>
<H
4><A
name=
"1.6"
>
1.6
</A>
) ?
</H4
>
<H
3><A
name=
"1.6"
>
1.6
</A>
) ?
</H3
>
<P>
ޣ
<P>
ޣ
PostgreSQL :
PostgreSQL :
<A
href
=
"http://www.postgresql.org/support/submitbug"
>
<A
HREF
=
"http://www.postgresql.org/support/submitbug"
>
http://www.postgresql.org/support/submitbug
</A>
.
</P>
http://www.postgresql.org/support/submitbug
</A>
.
</P>
<P>
PostgreSQL
<P>
PostgreSQL
FTP
<A
href=
"ftp://ftp.postgresql.org/pub"
>
FTP
<A
href=
"ftp://ftp.postgresql.org/pub
/
"
>
ftp://ftp.PostgreSQL.org/pub
</A>
.
</P>
ftp://ftp.PostgreSQL.org/pub
/
</A>
.
<H
4><A
name=
"1.7"
>
1.7
</A>
) ?
</H4
>
<H
3><A
name=
"1.7"
>
1.7
</A>
) ?
</H3
>
<P>
PostgreSQL - 8.0.
1
</P>
<P>
PostgreSQL - 8.0.
2
</P>
<P>
10-12 .
</P>
<P>
,
.
</P>
<H
4><A
name=
"1.8"
>
1.8
</A>
) ?
</H4
>
<H
3><A
name=
"1.8"
>
1.8
</A>
) ?
</H3
>
<P>
PostgreSQL , ,
<P>
PostgreSQL , ,
man
man
...
@@ -265,10 +256,12 @@
...
@@ -265,10 +256,12 @@
<P>
PostgreSQL
<A
href=
<P>
PostgreSQL
<A
href=
"http://www.PostgreSQL.org/docs/books/awbook.html"
>
http://www.PostgreSQL.org/docs/books/awbook.html
</A>
"http://www.PostgreSQL.org/docs/books/awbook.html"
>
http://www.PostgreSQL.org/docs/books/awbook.html
</A>
<a
href=
"http://www.commandprompt.com/ppbook/"
>
http://www.commandprompt.com/ppbook/
</a>
.
<a
href=
"http://www.commandprompt.com/ppbook/"
>
http://www.commandprompt.com/ppbook/
</a>
.
PostgreSQL,
PostgreSQL, .
(Korry Douglas).
<a
href=
"http://techdocs.postgresql.org/techdocs/bookreviews.php"
>
http://techdocs.postgresql.org/techdocs/bookreviews.php
</a>
.
<a
href=
"http://techdocs.postgresql.org/techdocs/bookreviews.php"
>
http://techdocs.postgresql.org/techdocs/bookreviews.php
</a>
.
,
<a
href=
"http://techdocs.postgresql.org"
>
http://techdocs.PostgreSQL.org/
</a>
,
<a
href=
"http://techdocs.postgresql.org"
>
http://techdocs.PostgreSQL.org/
</a>
PostgreSQL.
</p
>
PostgreSQL.
</P
>
<P>
<I>
psql
</I>
\d
<P>
<I>
psql
</I>
\d
, , , .. -
, , , .. -
...
@@ -276,56 +269,41 @@
...
@@ -276,56 +269,41 @@
<P>
.
</P>
<P>
.
</P>
<H
4
><A
name=
"1.9"
>
1.9
</A>
)
<H
3
><A
name=
"1.9"
>
1.9
</A>
)
?
</H
4
>
?
</H
3
>
<P>
PostgreSQL
<SMALL>
SQL
</SMALL>
-92.
<P>
PostgreSQL
<SMALL>
SQL
</SMALL>
-92.
<A
href=
"http://www.postgresql.org/docs/faqs.TODO.html"
>
TODO
</A>
<A
href=
"http://www.postgresql.org/docs/faqs.TODO.html"
>
TODO
</A>
,
,
.
</P>
.
</P>
<H4><A
name=
"1.10"
>
1.10
</A>
)
<SMALL>
SQL
</SMALL>
?
</H4>
<H3><A
name=
"1.10"
>
1.10
</A>
)
<SMALL>
SQL
</SMALL>
?
</H3>
<P>
-, PostgreSQL,
. - "Teach Yourself SQL in 21 Days,
Second Edition" ( SQL 21 , )
<A
href=
"http://members.tripod.com/er4ebus/sql/index.htm"
>
http://members.tripod.com/er4ebus/sql/index.htm
</A>
.
<I>
The Practical SQL Handbook
</I>
,
Bowman, Judith S., et al., Addison-Wesley.
<I>
The
Complete Reference SQL
</I>
, Groff et al., McGraw-Hill.
</P>
<P>
PostgreSQL
<A
href=
"http://www.PostgreSQL.org/docs/books/awbook.html"
>
http://www.PostgreSQL.org/docs/books/awbook.html
</A>
<SMALL>
SQL
</SMALL>
. PostgreSQL
<A
href=
"http://www.commandprompt.com/ppbook/"
>
http://www.commandprompt.com/ppbook.
</A>
<A
href=
<A
href=
"http://www.intermedia.net/support/sql/sqltut.shtm"
>
http://www.intermedia.net/support/sql/sqltut.shtm,
</A>
"http://www.intermedia.net/support/sql/sqltut.shtm"
>
http://www.intermedia.net/support/sql/sqltut.shtm,
</A>
<A
href=
<A
href=
"http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM"
>
"http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM"
>
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
</A>
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
</A>
<A
href=
<A
href=
"http://sqlcourse.com/"
>
http://sqlcourse.com.
</A></P>
"http://sqlcourse.com/"
>
http://sqlcourse.com.
</A></P>
<P>
- "Teach Yourself SQL in 21 Days, Second Edition"
( SQL 21 , )
<A
href=
"http://members.tripod.com/er4ebus/sql/index.htm"
>
http://members.tripod.com/er4ebus/sql/index.htm
</A></P>
<P>
<H3><A
name=
"1.11"
>
1.11
</A>
) ?
</H3>
<I>
The Practical SQL Handbook
</I>
,
Bowman, Judith S., et al., Addison-Wesley.
<I>
The
Complete Reference SQL
</I>
, Groff et al., McGraw-Hill.
</P>
<H4><A
name=
"1.11"
>
1.11
</A>
) ?
</H4>
<P>
,
<P>
<a
href=
"http://www.postgresql.org/docs/faqs.FAQ_DEV.html"
>
FAQ PostgreSQL
FAQ
</A>
.
</P>
. ,
<I>
pgsql-hackers
</I>
<I>
pgsql-patches
</I>
. , (patches)
pgsql-patches.
</P>
<P>
,
<SMALL>
CVS
</SMALL>
PostgreSQL.
,
, , ,
.
</P>
<H
4
><A
name=
"1.12"
>
1.12
</A>
) PostgreSQL
<H
3
><A
name=
"1.12"
>
1.12
</A>
) PostgreSQL
<SMALL></SMALL>
?
</H
4
>
<SMALL></SMALL>
?
</H
3
>
<P>
<P>
:
:
...
@@ -348,14 +326,8 @@
...
@@ -348,14 +326,8 @@
<DD>
PostgreSQL
<DD>
PostgreSQL
. - ,
. - ,
- . MySQL
- . +/-10%
, , ,
.
/ . MySQL
SELECT , .
, MySQL -
,
<I></I>
.
,
.
<BR>
<BR>
<BR>
</DD>
</DD>
...
@@ -396,10 +368,25 @@
...
@@ -396,10 +368,25 @@
</DD>
</DD>
</DL>
</DL>
<H3><A
name=
"1.13"
>
1.13
</A>
) PostgreSQL?
</H3>
<H2
align=
"center"
>
</H2>
<P>
- ,
, --- .
, CVS,
,
.
,
. ӣ --
. (
PostgreSQL
<a
href=
"http://www.postgresql.org/docs/faqs.FAQ_DEV.html"
>
FAQ
</A>
.)
</P>
<HR>
<H3
align=
"center"
>
</H3>
<H
4><A
name=
"2.1"
>
2.1
</A>
) PostgreSQL?
</H4
>
<H
3><A
name=
"2.1"
>
2.1
</A>
) PostgreSQL?
</H3
>
<P>
PostgreSQL
<small>
C
</small>
<P>
PostgreSQL
<small>
C
</small>
(embedded)
<small>
C
</small>
.
(embedded)
<small>
C
</small>
.
...
@@ -414,8 +401,8 @@
...
@@ -414,8 +401,8 @@
<i>
Drivers/Interfaces
</I>
, .
</P>
<i>
Drivers/Interfaces
</I>
, .
</P>
<H
4
><A
name=
"2.2"
>
2.2
</A>
)
<H
3
><A
name=
"2.2"
>
2.2
</A>
)
PostgreSQL Web?
</H
4
>
PostgreSQL Web?
</H
3
>
<P>
Web :
<P>
Web :
<A
href=
"http://www.webreview.com"
>
http://www.webreview.com
</A></P>
<A
href=
"http://www.webreview.com"
>
http://www.webreview.com
</A></P>
...
@@ -423,33 +410,26 @@
...
@@ -423,33 +410,26 @@
<P>
Web, PHP
<A
href=
"http://www.php.net"
>
<P>
Web, PHP
<A
href=
"http://www.php.net"
>
http://www.php.net
</A>
.
</P>
http://www.php.net
</A>
.
</P>
<P>
, Perl CGI.pm mod_perl.
</P>
<P>
, Perl DBD::Pg CGI.pm
mod_perl.
</P>
<H4><A
name=
"2.3"
>
2.3
</A>
) PostgreSQL
?
</H4>
<H3><A
name=
"2.3"
>
2.3
</A>
) PostgreSQL
?
</H3>
<P>
, PostgreSQL.
PgAdmin III (
<A
href=
"http://www.pgadmin.org/"
>
http://www.pgadmin.org
</A>
),
<P>
,
<a
href=
"http://techdocs.postgresql.org/guides/GUITools"
>
PgAccess (
<A
href=
"http://www.pgaccess.org/"
>
http://www.pgaccess.org
</A>
),
http://techdocs.postgresql.org/guides/GUITools
</A>
.
</P>
RHDB Admin (
<A
href=
"http://sources.redhat.com/rhdb/"
>
http://sources.redhat.com/rhdb/
</A>
),
TORA (
<A
href=
"http://www.globecom.net/tora/"
>
http://www.globecom.net/tora/
</A>
)
Rekall (
<A
href=
"http://www.rekallrevealed.org/"
>
http://www.rekallrevealed.org/
</A>
).
PhpPgAdmin (
<A
href=
"http://phppgadmin.sourceforge.net/"
>
http://phppgadmin.sourceforge.net/
</A>
) - PostgreSQL,
Web.
</P>
<HR>
<HR>
<H2
align=
"center"
>
</H2>
<H2
align=
"center"
>
</H2>
<H
4
><A
name=
"3.1"
>
3.1
</A>
) PostgreSQL
<H
3
><A
name=
"3.1"
>
3.1
</A>
) PostgreSQL
<I>
/usr/local/pgsql
</I>
?
</H
4
>
<I>
/usr/local/pgsql
</I>
?
</H
3
>
<P>
<I>
--prefix
</I>
<I>
configure
</I>
.
</P>
<P>
<I>
--prefix
</I>
<I>
configure
</I>
.
</P>
<H
4
><A
name=
"3.2"
>
3.2
</A>
)
<H
3
><A
name=
"3.2"
>
3.2
</A>
)
?
</H
4
>
?
</H
3
>
<P>
, PostgreSQL
<P>
, PostgreSQL
Unix TCP/IP . ,
Unix TCP/IP . ,
...
@@ -458,8 +438,8 @@
...
@@ -458,8 +438,8 @@
host-
<I>
$PGDATA/pg_hba.conf
</I>
host-
<I>
$PGDATA/pg_hba.conf
</I>
.
</P>
.
</P>
<H
4
><A
name=
"3.3"
>
3.3
</A>
)
<H
3
><A
name=
"3.3"
>
3.3
</A>
)
?
</H
4
>
?
</H
3
>
<P>
,
<P>
,
:
</P>
:
</P>
...
@@ -510,55 +490,17 @@
...
@@ -510,55 +490,17 @@
</DD>
</DD>
</DL>
</DL>
<H
4
><A
name=
"3.4"
>
3.4
</A>
)
<H
3
><A
name=
"3.4"
>
3.4
</A>
)
?
</H
4
>
?
</H
3
>
<P>
,
<P>
,
<code>
log_*
</code>
,
<code>
log_*
</code>
,
,
,
.
</P>
.
</P>
<P><B>
-
<H3><A
name=
"3.5"
>
3.5
</A>
)
<I>
"Sorry, too
.
</B></P>
many clients"
</I>
?
</H3>
<P>
,
. -,
<I>
configure
</I>
--enable-cassert,
<I>
assert()
</I>
backend
- .
</P>
<P>
<I>
postmaster
</I>
,
<I>
postgres
</I>
backend
<SMALL>
SQL
</SMALL>
.
<B></B>
. , ,
, .
, ,
, . backend
<I>
postmaster
</I>
,
/backend .
</P>
<P>
<I>
postmaster
</I>
,
<I>
psql
</I>
,
<SMALL>
PID
</SMALL>
<I>
postgres
</I>
,
<I>
psql
</I>
,
<CODE>
SELECT pg_backend_pid()
</CODE>
.
<I>
postgres
</I>
<SMALL>
PID
</SMALL>
.
<I>
psql
</I>
.
<I>
postgres
</I>
,
PGOPTIONS="-W n",
<I>
psql
</I>
.
<I>
n
</I>
,
,
.
</P>
<P>
PostgreSQL
, .
backend'
<I>
pgsql/data/base/dbname
</I>
.
. Linux
<I>
-DLINUX_PROFILE
</I>
.
</P>
<H4><A
name=
"3.5"
>
3.5
</A>
)
<I>
"Sorry, too
many clients"
</I>
?
</H4>
<P>
100
<P>
100
.
.
...
@@ -567,11 +509,11 @@
...
@@ -567,11 +509,11 @@
<I>
postmaster
</I>
.
</P>
<I>
postmaster
</I>
.
</P>
<H
4
><A
name=
"3.6"
>
3.6
</A>
) dump restore
<H
3
><A
name=
"3.6"
>
3.6
</A>
) dump restore
PostgreSQL?
</H
4
>
PostgreSQL?
</H
3
>
<P>
PostgreSQL
<P>
PostgreSQL
. 7.4 7.4.1
. 7.4
.0
7.4.1
dump restore.
dump restore.
(.. , 7.3 7.4)
(.. , 7.3 7.4)
.
.
...
@@ -585,8 +527,10 @@
...
@@ -585,8 +527,10 @@
dump/restore.
dump/restore.
<i>
pg_upgrade
</i>
.
</P>
<i>
pg_upgrade
</i>
.
</P>
<H4><A
name=
"3.7"
>
3.7
</A>
) ""
?
</H4>
<H3><A
name=
"3.7"
>
3.7
</A>
) ""
?
</H3>
<P>
""
<P>
""
, , ""
, , ""
. . ECC, SCSI
. . ECC, SCSI
...
@@ -600,26 +544,27 @@
...
@@ -600,26 +544,27 @@
<H2
align=
"center"
>
</H2>
<H2
align=
"center"
>
</H2>
<H
4
><A
name=
"4.1"
>
4.1
</A>
)
<SMALL>
SELECT
</SMALL>
<H
3
><A
name=
"4.1"
>
4.1
</A>
)
<SMALL>
SELECT
</SMALL>
? ?
</H4
>
? ?
</H3
>
<P>
,
<P>
,
<SMALL>
SELECT
</SMALL>
<SMALL>
LIMIT
</SMALL>
.
<SMALL>
SELECT
</SMALL>
<SMALL>
LIMIT
</SMALL>
.
</P>
- ,
<SMALL>
ORDER BY
</SMALL>
,
- ,
<SMALL>
ORDER BY
</SMALL>
,
, .
, .
<SMALL>
SELECT
</SMALL>
,
<SMALL>
SELECT
</SMALL>
,
<SMALL>
FETCH
</SMALL>
.
</P>
<SMALL>
FETCH
</SMALL>
.
</P>
<
p>
To
<small>
SELECT
</small>
a random row, use:
</p
>
<
P>
To
<small>
SELECT
</small>
a random row, use:
</P
>
<
pre
>
SELECT col
<
PRE
>
SELECT col
FROM tab
FROM tab
ORDER BY random()
ORDER BY random()
LIMIT 1;
LIMIT 1;
</
pre
>
</
PRE
>
<H4><A
name=
"4.2"
>
4.2
</A>
) , ,
<H3><A
name=
"4.2"
>
4.2
</A>
) , ,
? ,
? ,
<I>
psql
</I>
?
</H
4
>
<I>
psql
</I>
?
</H
3
>
<P>
<I>
psql
</I>
, \dt.
<P>
<I>
psql
</I>
, \dt.
<I>
psql
</I>
, \?.
<I>
psql
</I>
, \?.
...
@@ -642,7 +587,7 @@
...
@@ -642,7 +587,7 @@
.
</P>
.
</P>
<H
4><A
name=
"4.3"
>
4.3
</A>
) ?
</H4
>
<H
3><A
name=
"4.3"
>
4.3
</A>
) ?
</H3
>
<P>
8.0 ,
<P>
8.0 ,
<SMALL>
ALTER TABLE ALTER COLUMN TYPE
</SMALL>
.
</P>
<SMALL>
ALTER TABLE ALTER COLUMN TYPE
</SMALL>
.
</P>
...
@@ -656,13 +601,12 @@
...
@@ -656,13 +601,12 @@
COMMIT;
COMMIT;
</PRE>
</PRE>
<H
4
><A
name=
"4.4"
>
4.4
</A>
) ,
<H
3
><A
name=
"4.4"
>
4.4
</A>
) ,
?
</H
4
>
?
</H
3
>
<P>
:
</P>
<P>
:
</P>
<BLOCKQUOTE>
<BLOCKQUOTE>
<TABLE>
<TABLE>
<TBODY>
<TR>
<TR>
<TD>
?
</TD>
<TD>
?
</TD>
<TD>
( 32 TB)
</TD>
<TD>
( 32 TB)
</TD>
...
@@ -691,7 +635,6 @@
...
@@ -691,7 +635,6 @@
<TD>
?
</TD>
<TD>
?
</TD>
<TD></TD>
<TD></TD>
</TR>
</TR>
</TBODY>
</TABLE>
</TABLE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BR>
<BR>
...
@@ -709,8 +652,8 @@
...
@@ -709,8 +652,8 @@
,
,
32k.
</P>
32k.
</P>
<H
4
><A
name=
"4.5"
>
4.5
</A>
)
<H
3
><A
name=
"4.5"
>
4.5
</A>
)
?
</H
4
>
?
</H
3
>
<P>
PostgreSQL 5
<P>
PostgreSQL 5
.
</P>
.
</P>
...
@@ -747,10 +690,10 @@
...
@@ -747,10 +690,10 @@
.
.
</P>
</P>
<H
4
><A
name=
"4.6"
>
4.6
</A>
) ?
<H
3
><A
name=
"4.6"
>
4.6
</A>
) ?
?
</H
4
>
?
</H
3
>
<P>
.
<P>
.
. ,
. ,
...
@@ -774,17 +717,18 @@
...
@@ -774,17 +717,18 @@
,
,
. MAX() MIN()
. MAX() MIN()
,
,
<SMALL>
ORDER BY
</SMALL>
<SMALL>
LIMIT
</SMALL>
:
</P>
<SMALL>
ORDER BY
</SMALL>
<SMALL>
LIMIT
</SMALL>
:
<
pre
>
<
PRE
>
SELECT col
SELECT col
FROM tab
FROM tab
ORDER BY col [ DESC ]
ORDER BY col [ DESC ]
LIMIT 1;
LIMIT 1;
</
pre
>
</
PRE
>
<P>
,
<P>
,
,
<CODE>
SET enable_seqscan TO 'off'
</CODE>
,
<CODE>
SET enable_seqscan TO 'off'
</CODE>
, , - .
, ,
.
</P>
</P>
<P>
,
<SMALL>
LIKE
</SMALL>
<P>
,
<SMALL>
LIKE
</SMALL>
...
@@ -810,15 +754,15 @@
...
@@ -810,15 +754,15 @@
.
.
int2, int8 numeric .
</P>
int2, int8 numeric .
</P>
<H
4
><A
name=
"4.7"
>
4.7
</A>
) ,
<H
3
><A
name=
"4.7"
>
4.7
</A>
) ,
?
</H
4
>
?
</H
3
>
<P>
<SMALL>
EXPLAIN
</SMALL>
.
</P>
<P>
<SMALL>
EXPLAIN
</SMALL>
.
</P>
<H
4
><A
name=
"4.8"
>
4.8
</A>
)
<H
3
><A
name=
"4.8"
>
4.8
</A>
)
?
?
?
</H
4
>
?
</H
3
>
<P>
<I>
~
</I>
,
<P>
<I>
~
</I>
,
<I>
~*
</I>
<I>
~*
</I>
...
@@ -832,23 +776,40 @@
...
@@ -832,23 +776,40 @@
WHERE lower(col) = 'abc';
WHERE lower(col) = 'abc';
</PRE>
</PRE>
<P>
. ,
. ,
, :
</P>
, :
<PRE>
<PRE>
CREATE INDEX tabindex ON tab (lower(col));
CREATE INDEX tabindex ON tab (lower(col));
</PRE>
</PRE>
<H4><A
name=
"4.9"
>
4.9
</A>
) ,
<H3><A
name=
"4.9"
>
4.9
</A>
) ,
<SMALL>
NULL
</SMALL>
- ?
</H4>
<SMALL>
NULL
</SMALL>
- ?
<SMALL>
NULL
</SMALL>
?
</H3>
<P>
<SMALL>
IS NULL
</SMALL>
<P>
<SMALL>
IS NULL
</SMALL>
<SMALL>
IS NOT NULL
</SMALL>
.
</P>
<SMALL>
IS NOT NULL
</SMALL>
, :
</P>
<PRE>
SELECT *
FROM tab
WHERE col IS NULL;
</PRE>
<P>
<NULL>
<SMALL>
IS NULL
</SMALL>
<SMALL>
IS NOT NULL
</SMALL>
<SMALL>
ORDER BY
</SMALL>
.
<I></I>
, ,
<I></I>
, NULL :
</P>
<PRE>
SELECT *
FROM tab
ORDER BY (col IS NOT NULL);
</PRE>
<H
4
><A
name=
"4.10"
>
4.10
</A>
)
<H
3
><A
name=
"4.10"
>
4.10
</A>
)
?
</H
4
>
?
</H
3
>
<BLOCKQUOTE>
<BLOCKQUOTE>
<TABLE>
<TABLE>
<TBODY>
<TR>
<TR>
<TH></TH>
<TH></TH>
<TH>
</TH>
<TH>
</TH>
...
@@ -879,7 +840,6 @@
...
@@ -879,7 +840,6 @@
<TD>
char
</TD>
<TD>
char
</TD>
<TD>
</TD>
<TD>
</TD>
</TR>
</TR>
</TBODY>
</TABLE>
</TABLE>
</BLOCKQUOTE>
</BLOCKQUOTE>
...
@@ -889,8 +849,7 @@
...
@@ -889,8 +849,7 @@
<P>
"varlena" (..,
<P>
"varlena" (..,
, ).
, ).
, ,
, ,
. ,
. , ,
<SMALL>
TOAST
</SMALL>
,
,
,
.
</P>
.
</P>
...
@@ -906,8 +865,8 @@
...
@@ -906,8 +865,8 @@
<SMALL>
NULL
</SMALL>
.
<SMALL>
NULL
</SMALL>
.
, .
</P>
, .
</P>
<H
4
><A
name=
"4.11.1"
>
4.11.1
</A>
)
<H
3
><A
name=
"4.11.1"
>
4.11.1
</A>
)
serial/--?
</H
4
>
serial/--?
</H
3
>
<P>
PostgreSQL
<SMALL>
SERIAL
</SMALL>
.
<P>
PostgreSQL
<SMALL>
SERIAL
</SMALL>
.
. :
</P>
. :
</P>
...
@@ -918,7 +877,7 @@
...
@@ -918,7 +877,7 @@
);
);
</PRE>
</PRE>
<P>
:
</P>
:
<PRE>
<PRE>
CREATE SEQUENCE person_id_seq;
CREATE SEQUENCE person_id_seq;
CREATE TABLE person (
CREATE TABLE person (
...
@@ -930,8 +889,8 @@
...
@@ -930,8 +889,8 @@
<I>
create_sequence
</I>
.
<I>
create_sequence
</I>
.
<H
4
><A
name=
"4.11.2"
>
4.11.2
</A>
)
<H
3
><A
name=
"4.11.2"
>
4.11.2
</A>
)
<SMALL>
SERIAL
</SMALL>
?
</H
4
>
<SMALL>
SERIAL
</SMALL>
?
</H
3
>
<P>
<P>
<SMALL>
SERIAL
</SMALL>
sequence
<SMALL>
SERIAL
</SMALL>
sequence
...
@@ -960,16 +919,16 @@
...
@@ -960,16 +919,16 @@
</PRE>
</PRE>
<H
4
><A
name=
"4.11.3"
>
4.11.3
</A>
) ,
<H
3
><A
name=
"4.11.3"
>
4.11.3
</A>
) ,
<I>
currval()
</I>
<I>
nextval()
</I>
<I>
currval()
</I>
<I>
nextval()
</I>
?
</H
4
>
?
</H
3
>
<P>
.
<i>
currval()
</i>
,
<P>
.
<i>
currval()
</i>
,
, .
</P>
, .
</P>
<H
4
><A
name=
"4.11.4"
>
4.11.4
</A>
)
<H
3
><A
name=
"4.11.4"
>
4.11.4
</A>
)
?
?
, /SERIAL?
</H
4
>
, /SERIAL?
</H
3
>
<P>
, ,
<P>
, ,
...
@@ -977,8 +936,8 @@
...
@@ -977,8 +936,8 @@
.
</P>
.
</P>
<H
4
><A
name=
"4.12"
>
4.12
</A>
)
<SMALL>
OID
</SMALL>
?
<H
3
><A
name=
"4.12"
>
4.12
</A>
)
<SMALL>
OID
</SMALL>
?
<SMALL>
TID
</SMALL>
?
</H4
>
<SMALL>
CTID
</SMALL>
?
</H3
>
<P>
, PostgreSQL ,
<P>
, PostgreSQL ,
<SMALL>
OID
</SMALL>
<SMALL>
OID
</SMALL>
...
@@ -993,17 +952,17 @@
...
@@ -993,17 +952,17 @@
O
<SMALL>
ID
</SMALL>
,
<SMALL>
SERIAL
</SMALL>
O
<SMALL>
ID
</SMALL>
,
<SMALL>
SERIAL
</SMALL>
. 8-
. 8-
<SMALL>
SERIAL8
</SMALL>
.
</P>
<SMALL>
SERIAL8
</SMALL>
.
<P>
T
<SMALL>
ID
</SMALL>
<P>
C
<SMALL>
T
ID
</SMALL>
offset .
T
<SMALL>
ID
</SMALL>
offset .
C
<SMALL>
T
ID
</SMALL>
.
.
T
<SMALL>
ID
</SMALL>
<P>
T
<SMALL>
ID
</SMALL>
.
</P>
.
</P>
<H
4
><A
name=
"4.13"
>
4.13
</A>
)
<I>
"ERROR: Memory
<H
3
><A
name=
"4.13"
>
4.13
</A>
)
<I>
"ERROR: Memory
exhausted in AllocSetAlloc()"
</I>
?
</H
4
>
exhausted in AllocSetAlloc()"
</I>
?
</H
3
>
<P>
<P>
.
.
...
@@ -1022,38 +981,21 @@
...
@@ -1022,38 +981,21 @@
, backend ,
, backend ,
.
.
<H
4
><A
name=
"4.14"
>
4.14
</A>
) , PostgreSQL
<H
3
><A
name=
"4.14"
>
4.14
</A>
) , PostgreSQL
?
</H
4
>
?
</H
3
>
<P>
<I>
psql
</I>
,
<CODE>
SELECT version();
</CODE></P>
<P>
<I>
psql
</I>
,
<CODE>
SELECT version();
</CODE></P>
<H4><A
name=
"4.15"
>
4.15
</A>
)
<I>
"invalid large obj descriptor"
</I>
?
</H4>
<P>
<H3><A
name=
"4.15"
>
4.15
</A>
)
<CODE>
BEGIN WORK
</CODE>
<CODE>
COMMIT
</CODE>
,
?
</H3>
<CODE>
lo_open
</CODE>
...
<CODE>
lo_close.
</CODE></P>
<P>
PostgreSQL ,
. ,
- ,
<I>
invalid large obj descriptor
</I>
,
(
)
.
</P>
<P>
<SMALL>
ODBC
</SMALL>
,
<CODE>
auto-commit off.
</CODE></P>
<H4><A
name=
"4.16"
>
4.16
</A>
)
?
</H4>
<P>
<I>
CURRENT_TIMESTAMP
</I>
:
</P>
<P>
<I>
CURRENT_TIMESTAMP
</I>
:
</P>
<PRE>
<PRE>
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
</PRE>
</PRE>
<H
4><A
name=
"4.17"
>
4.17
</A>
) ?
</H4
>
<H
3><A
name=
"4.16"
>
4.16
</A>
) ?
</H3
>
<P>
PostgreSQL ,
<P>
PostgreSQL ,
SQL. :
</P>
SQL. :
</P>
...
@@ -1077,8 +1019,8 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -1077,8 +1019,8 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
<SMALL>
RIGHT
</SMALL>
<SMALL>
FULL
</SMALL>
.
<SMALL>
RIGHT
</SMALL>
<SMALL>
FULL
</SMALL>
.
<SMALL>
INNER
</SMALL>
.
</P>
<SMALL>
INNER
</SMALL>
.
</P>
<H
4><A
name=
"4.18"
>
4.18
</A>
) ,
<H
3><A
name=
"4.17"
>
4.17
</A>
) ,
?
</H
4
>
?
</H
3
>
<P>
.
<P>
.
PostgreSQL
PostgreSQL
...
@@ -1089,14 +1031,16 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -1089,14 +1031,16 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
.
</P>
.
</P>
<H
4><A
name=
"4.19"
>
4.19
</A>
) ?
</H4
>
<H
3><A
name=
"4.18"
>
4.18
</A>
) ?
</H3
>
<P>
, ,
<P>
, ,
<A
href=
"http://techdocs.postgresql.org/guides/SetReturningFunctions"
>
<A
href=
"http://techdocs.postgresql.org/guides/SetReturningFunctions"
>
http://techdocs.postgresql.org/guides/SetReturningFunctions
</A>
.
</P>
http://techdocs.postgresql.org/guides/SetReturningFunctions
</A>
.
</P>
<H4><A
name=
"4.20"
>
4.20
</A>
) "missing oid",
PL/PgSQL?
</H4>
<H3><A
name=
"4.19"
>
4.19
</A>
) "relation with OID ####
", PL/PgSQL?
</H3>
<P>
PL/PgSQL
<P>
PL/PgSQL
, PL/PgSQL
, PL/PgSQL
,
,
...
@@ -1106,53 +1050,26 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
...
@@ -1106,53 +1050,26 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
PL/PgSQL.
PL/PgSQL.
.
</P>
.
</P>
<h4><a
name=
"4.21"
>
4.21
</a>
) ?
</h4>
<ul>
<li><i>
contrib/pgcrypto
</i>
<small>
SQL
</small>
.
</li>
<li>
,
<i>
postgresql.conf
</i>
,
<i>
ssl
</i>
<i>
true
</i>
,
<i>
pg_hba.conf
</i>
<i>
host
</i>
<i>
hostssl
</i>
<i>
sslmode
</i>
ݣ
<i>
disable
</i>
. (,
,
stunnel ssh, SSL PostgreSQL).
</li>
<li>
,
.
</li>
<li>
, .
</li>
</ul>
<HR>
<H2
align=
"center"
>
PostgreSQL
</H2>
<H4><A
name=
"5.1"
>
5.1
</A>
) .
<I>
psql
</I>
, core dump?
</H4>
<P>
.
.
</P>
<H4><A
name=
"5.2"
>
5.2
</A>
)
PostgreSQL?
</H4>
<P>
<I>
pgsql-hackers
</I>
<H3><A
name=
"4.20"
>
4.20
</a>
) ?
</H3>
<I>
contrib/
</I>
.
</P>
<
H4><A
name=
"5.3"
>
5.3
</A>
) C ,
<
P>
"" -- ,
?
</H4
>
.
</P
>
<P>
PostgreSQL, 7.3, ,
<P>
Master/slave (master)
C, PL/PgSQL SQL.
/, Σ
. ,
(slave)
C,
<i>
contrib/tablefunc
</i>
.
</P>
/
<SMALL>
SELECT
</SMALL>
.
master-slave PostgreSQL
<A
href=
"http://gborg.postgresql.org/project/slony1/projdisplay.php"
>
Slony-I
</A>
.
</P>
<H4><A
name=
"5.4"
>
5.4
</A>
) .
<P>
Multi-master /
?
</H4>
, .
,
.
PostgreSQL
<A
href=
"http://pgfoundry.org/projects/pgcluster/"
>
Pgcluster
</A>
.
<P>
<I>
Makefile
</I>
include
.
<I>
make clean
</I>
<I>
make
</I>
.
<SMALL>
GCC
</SMALL>
<I>
--enable-depend
</I>
<I>
configure
</I>
.
</P>
</BODY>
</BODY>
</HTML>
</HTML>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment