From e1f55afe7d9dd2f7751fbc7f1c2d85adafbd2152 Mon Sep 17 00:00:00 2001
From: Bruce Momjian äÁÔÁ ÐÏÓÌÅÄÎÅÇÏ ÏÂÎÏ×ÌÅÎÉÑ: ÷ÏÓËÒÅÓÅÎØÅ 18 ÉÀÎÑ 15:33:25 EDT 2006 äÁÔÁ ÐÏÓÌÅÄÎÅÇÏ ÏÂÎÏ×ÌÅÎÉÑ: ðÑÔÎÉÃÁ 26 ÏËÔÑÂÒÑ 14:59:45 EDT 2007 áÎÇÌÉÊÓËÉÊ ×ÁÒÉÁÎÔ ÓÏÐÒÏ×ÏÖÄÁÅÔ: âÒÀÓ íÏÍØÑÎ (Bruce Momjian) (pgman@candle.pha.pa.us) óÁÍÕÀ Ó×ÅÖÕÀ ÁÎÇÌÉÊÓËÕÀ ×ÅÒÓÉÀ ÄÏËÕÍÅÎÔÁ ÍÏÖÎÏ ÎÁÊÔÉ ÎÁ
- http://www.PostgreSQL.org/files/documentation/faqs/FAQ.html.ïÔ×ÅÔÙ ÎÁ ÞÁÓÔÏ ÚÁÄÁ×ÁÅÍÙÅ ×ÏÐÒÏÓÙ ÐÏ PostgreSQL
-
@@ -22,10 +22,10 @@
ïÔ×ÅÔÙ ÎÁ ×ÏÐÒÏÓÙ ÓÐÅÃÉÆÉÞÎÙÅ ÄÌÑ ËÏÎËÒÅÔÎÙÈ ÐÌÁÔÆÏÒÍ ÍÏÖÎÏ ÎÁÊÔÉ ÎÁ - http://www.PostgreSQL.org/docs/faq/.
+ http://www.postgresql.org/docs/faq/.PostgreSQL ÐÒÏÉÚÎÏÓÉÔÓÑ Post-Gres-Q-L (ðÏÓÔ-çÒÅÓ-ëØÀ-üÌ), - ÔÁËÖÅ ÉÎÏÇÄÁ ÇÏ×ÏÒÑÔ ÐÒÏÓÔÏ Postgres. ÷Ù ÍÏÖÅÔÅ ÕÓÌÙÛÁÔØ ËÁË - ÜÔÏ ÐÒÏÉÚÎÏÓÉÔÓÑ Ó ÐÏÍÏÝØÀ ÁÕÄÉÏÆÁÊÌÁ, ËÏÔÏÒÙÊ ÄÏÓÔÕÐÅÎ × - ÆÏÒÍÁÔÅ MP3. + ÔÁËÖÅ ÇÏ×ÏÒÑÔ É ÐÒÏÓÔÏ Postgres, ÏÓÏÂÅÎÎÏ ÐÒÉ ÒÁÚÇÏ×ÏÒÅ. + (äÌÑ ÏÓÏÂÏ ÌÀÂÏÐÙÔÓÔ×ÕÀÝÉÈ ËÁË ÐÒÏÉÚÎÏÓÉÔØ "PostgreSQL", ÓÕÝÅÓÔ×ÕÅÔ + ÁÕÄÉÏ-ÆÁÊÌ).
PostgreSQL - ÜÔÏ ÏÂßÅËÔÎÏ-ÒÅÌÑÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÕÐÒÁ×ÌÅÎÉÑ ÂÁÚÁÍÉ @@ -141,8 +142,8 @@ ÐÏ ×ÓÅÍÕ ÍÉÒÕ É Ó×ÑÚÁÎÎÁÑ ÞÅÒÅÚ éÎÔÅÒÎÅÔ. òÁÚÒÁÂÏÔËÁ Ñ×ÌÑÅÔÓÑ ÏÂÝÅÓÔ×ÅÎÎÙÍ ÐÒÏÅËÔÏÍ É ÎÅ ÕÐÒÁ×ÌÑÅÔÓÑ ËÁËÏÊ-ÌÉÂÏ ËÏÍÐÁÎÉÅÊ. ðÏÄÒÏÂÎÏÓÔÉ ÓÍÏÔÒÉÔÅ × FAQ ÄÌÑ ÒÁÚÒÁÂÏÔÞÉËÏ×, - - http://www.PostgreSQL.org/files/documentation/faqs/FAQ_DEV.html + + http://www.postgresql.org/docs/faqs.FAQ_DEV.html
óÉÓÔÅÍÁ õÐÒÁ×ÌÅÎÉÑ âÁÚÁÍÉ äÁÎÎÙÈ PostgreSQL
-Portions copyright (c) 1996-2006, PostgreSQL Global Development +
Portions copyright (c) 1996-2007, PostgreSQL Global Development Group Portions Copyright (c) 1994-1996 Regents of the University of California
@@ -201,7 +202,7 @@ Ë ÍÏÍÅÎÔÕ ×ÙÈÏÄÁ ÄÁÎÎÏÊ ×ÅÒÓÉÉ.PostgreSQL ÔÁËÖÅ ÒÁÂÏÔÁÅÔ ÎÁ ÏÐÅÒÁÃÉÏÎÎÙÈ ÓÉÓÔÅÍÁÈ Microsoft - Windows, ÏÓÎÏ×ÁÎÎÙÈ ÎÁ NT, ÔÁËÉÈ ËÁË Win2000, WinXP É Win2003. + Windows, ÏÓÎÏ×ÁÎÎÙÈ ÎÁ NT, ÔÁËÉÈ ËÁË Win2000 SP4, WinXP É Win2003. ðÁËÅÔ ÉÎÓÔÁÌÌÑÔÏÒÁ ÄÏÓÔÕÐÅÎ ÐÏ ÁÄÒÅÓÕ http://pgfoundry.org/projects/pginstaller. ÷ÅÒÓÉÉ Windows, @@ -218,12 +219,12 @@
þÅÒÅÚ ÂÒÁÕÚÅÒ, ÉÓÐÏÌØÚÕÑ http://www.postgresql.org/ftp/ É ÞÅÒÅÚ ftp, ÉÓÐÏÌØÚÕÑ - ftp://ftp.PostgreSQL.org/pub/.
+ ftp://ftp.postgresql.org/pub/.ðÏÓÌÅÄÎÉÊ ×ÙÐÕÓË PostgreSQL - ÜÔÏ ×ÅÒÓÉÑ 8.1.4
+ðÏÓÌÅÄÎÉÊ ×ÙÐÕÓË PostgreSQL - ÜÔÏ ×ÅÒÓÉÑ 8.2.5
íÙ ÐÌÁÎÉÒÕÅÍ ×ÙÐÕÓËÁÔØ ÎÏ×ÙÅ ÓÔÁÒÛÉÅ ×ÅÒÓÉÉ ËÁÖÄÙÊ ÇÏÄ, Á ÍÌÁÄÛÉÅ ×ÅÒÓÉÉ ËÁÖÄÙÅ ÎÅÓËÏÌØËÏ ÍÅÓÑÃÅ×.
@@ -243,12 +244,13 @@ ÐÏÄËÌÀÞÉÔØÓÑ, ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ × Unix ×ÙÚÏ× ÐÒÏÇÒÁÍÍÙirc -c '#postgresql' "$USER" irc.freenode.net
ÉÌÉ
ÌÀÂÏÊ ÄÒÕÇÏÊ IRC ËÌÉÅÎÔ. îÁ ÜÔÏÍ ÖÅ ÓÅÒ×ÅÒÅ ÓÕÝÅÓÔ×ÕÀÔ ËÁÎÁÌÙ ÎÁ
- ÉÓÐÁÎÓËÏÍ (#postgresql-es) É ÆÒÁÎÃÕÚÓËÏÍ (#postgresqlfr)
- ÑÚÙËÁÈ. ôÁËÖÅ ÓÕÝÅÓÔ×ÕÅÔ ËÁÎÁÌ ÐÏ PostgreSQL ÎÁ ÓÅÒ×ÅÒÅ EFNet.
+ ÉÓÐÁÎÓËÏÍ (#postgresql-es), ÆÒÁÎÃÕÚÓËÏÍ (#postgresqlfr)
+ É ÂÒÁÚÉÌØÓËÏÍ (#postgresql-br) ÑÚÙËÁÈ. ôÁËÖÅ ÓÕÝÅÓÔ×ÕÅÔ ËÁÎÁÌ
+ ÐÏ PostgreSQL ÎÁ ÓÅÒ×ÅÒÅ EFNet.
óÐÉÓÏË ËÏÍÍÅÒÞÅÓËÏÊ ÐÏÄÄÅÒÖËÉ ËÏÍÐÁÎÉÊ ÄÏÓÔÕÐÅÎ ÎÁ - - http://techdocs.postgresql.org/companies.php.
+ + http://www.postgresql.org/support/professional_support.îÁ ÏÛÉÂËÉ, Õ×ÅÄÏÍÌÅÎÉÅ Ï ËÏÔÏÒÙÈ ÂÙÌÉ ÓÄÅÌÁÎÙ ÞÅÒÅÚ ÓÐÅÃÉÁÌØÎÕÀ ÆÏÒÍÕ ÉÌÉ ÏÔÐÒÁ×ÌÅÎÎÙÅ × ËÁËÏÊ-ÌÉÂÏ ÓÐÉÓÏË ÒÁÓÓÙÌËÉ PostgreSQL, @@ -337,7 +339,7 @@ ÓÔÒÁÎÉÃÙ ÜÌÅËÔÒÏÎÎÏÇÏ ÒÕËÏ×ÏÄÓÔ×Á man É ÎÅËÏÔÏÒÙÅ ÍÁÌÅÎØËÉÅ ÔÅÓÔÏ×ÙÅ ÐÒÉÍÅÒÙ. óÍÏÔÒÉÔÅ × ËÁÔÁÌÏÇ /doc. ÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÐÒÏÓÍÁÔÒÉ×ÁÔØ ÄÏËÕÍÅÎÔÁÃÉÀ × éÎÔÅÒÎÅÔ ÐÏ ÁÄÒÅÓÕ - http://www.PostgreSQL.org/docs.
+ http://www.postgresql.org/docs.óÕÝÅÓÔ×ÕÅÔ Ä×Å ËÎÉÇÉ ÐÏ PostgreSQL ÄÏÓÔÕÐÎÙÅ ÐÏ ÁÄÒÅÓÁÍ http://www.PostgreSQL.org/docs/books/awbook.html @@ -345,9 +347,9 @@ åÓÔØ ÎÅÓËÏÌØËÏ ËÎÉÇ ÐÏ PostgreSQL, ËÏÔÏÒÙÅ ÍÏÖÎÏ ËÕÐÉÔØ. ïÄÎÕ ÉÚ ÎÁÉÂÏÌÅÅ ÐÏÐÕÌÑÒÎÙÈ ÎÁÐÉÓÁÌ ëÏÒÒÉ äÕÇÌÁÓ (Korry Douglas). óÐÉÓÏË ÏÂÚÏÒÏ× ÐÏ ÜÔÉÍ ËÎÉÇÁÍ ÄÏÓÔÕÐÅÎ ÐÏ ÁÄÒÅÓÕ - http://techdocs.postgresql.org/techdocs/bookreviews.php. - ëÒÏÍÅ ÔÏÇÏ, ÐÏ ÁÄÒÅÓÕ http://techdocs.PostgreSQL.org/ - ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ ËÏÌÌÅËÃÉÀ ÔÅÈÎÉÞÅÓËÉÈ ÓÔÁÔÅÊ ÐÏÓ×ÑÝÅÎÎÙÈ PostgreSQL.
+ http://www.postgresql.org/docs/books/. + ëÒÏÍÅ ÔÏÇÏ, ÐÏ ÁÄÒÅÓÕ http://www.postgresql.org/docs/techdocs + ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ ËÏÌÌÅËÃÉÀ ÔÅÈÎÉÞÅÓËÉÈ ÓÔÁÔÅÊ, ÐÏÓ×ÅÝÅÎÎÙÈ PostgreSQL.ëÌÉÅÎÔ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ psql ÉÍÅÅÔ ÎÅÓËÏÌØËÏ ËÏÍÁÎÄ \d ÄÌÑ ÏÔÏÂÒÁÖÅÎÉÑ ÉÎÆÏÒÍÁÃÉÉ ÐÏ ÔÉÐÁÍ, ÏÐÅÒÁÔÏÒÁÍ, ÆÕÎËÃÉÑÍ, ÁÇÒÅÇÁÔÁÍ É Ô.Ä. - @@ -359,11 +361,7 @@
÷Ï-ÐÅÒ×ÙÈ, ×ÏÚØÍÉÔÅ ÏÄÎÕ ÉÚ ËÎÉÇ ÐÏ PostgreSQL, Ï ËÏÔÏÒÙÈ ÇÏ×ÏÒÉÌÏÓØ - ×ÙÛÅ. åÝÅ ÏÄÉÎ ÕÞÅÂÎÉË - ÜÔÏ ËÎÉÇÁ "Teach Yourself SQL in 21 Days, - Second Edition" (ïÓ×ÏÊ ÓÁÍÏÓÔÏÑÔÅÌØÎÏ SQL ÚÁ 21 ÄÅÎØ, ÷ÔÏÒÁÑ ÒÅÄÁËÃÉÑ) - ÎÁ - http://members.tripod.com/er4ebus/sql/index.htm. - íÎÏÇÉÍ ÉÚ ÎÁÛÉÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÎÒÁ×ÉÔÓÑ ËÎÉÇÁ + ×ÙÛÅ. íÎÏÇÉÍ ÉÚ ÎÁÛÉÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÔÁËÖÅ ÎÒÁ×ÉÔÓÑ ËÎÉÇÁ The Practical SQL Handbook, Bowman, Judith S., et al., Addison-Wesley. äÒÕÇÉÍ ÎÒÁ×ÉÔÓÑ The Complete Reference SQL, Groff et al., McGraw-Hill.
@@ -453,7 +451,14 @@ +éÚÍÅÎÅÎÉÑ × ÓÏÈÒÁÎÅÎÉÉ ÄÎÅ×ÎÏÇÏ ×ÒÅÍÅÎÉ × óûá ×ËÌÀÞÅÎÙ × PostgreSQL ×ÅÒÓÉÉ + 8.0.[4+] É ×Ï ×ÓÅ ÓÌÅÄÕÀÝÉÅ ×ÙÐÕÓËÉ, ÎÁÐÒÉÍÅÒ × 8.1. éÚÍÅÎÅÎÉÑ ÐÏ ëÁÎÁÄÅ + É úÁÐÁÄÎÏÊ á×ÓÔÒÁÌÉÉ ×ËÌÀÞÅÎÙ × 8.0.[10+], 8.1.[6+] É ×ÓÅ ÓÌÅÄÕÀÝÉÅ + ×ÙÐÕÓËÉ. ÷ÙÐÕÓËÉ PostgreSQL ÄÏ 8.0 ÉÓÐÏÌØÚÕÀÔ ÉÎÆÏÒÍÁÃÉÀ Ï ÓÏÈÒÁÎÅÎÉÉ + ÄÎÅ×ÎÏÇÏ ×ÒÅÍÅÎÉ ÉÚ ÂÁÚÙ ÄÁÎÎÙÈ ×ÒÅÍÅÎÎÙÈ ÚÏÎ × ÏÐÅÒÁÃÉÏÎÎÏÊ ÓÉÓÔÅÍÅ.
÷Ù ÄÏÓÔÉÇÌÉ ÕÓÔÁÎÏ×ÌÅÎÎÏÇÏ ÐÏ ÕÍÏÌÞÁÎÉÀ ÏÇÒÁÎÉÞÅÎÉÑ ÎÁ 100 ÓÅÓÓÉÊ - ÐÏÄËÌÀÞÅÎÉÑ Ë ÂÁÚÅ ÄÁÎÎÙÈ. ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ Õ×ÅÌÉÞÉÔØ ÄÌÑ - postmaster ÌÉÍÉÔ ÎÁ ËÏÌÉÞÅÓÔ×Ï ËÏÎËÕÒÅÎÔÎÙÈ backend ÐÒÏÃÅÓÓÏ×, +
÷Ù ÄÏÓÔÉÇÌÉ ÕÓÔÁÎÏ×ÌÅÎÎÏÇÏ ÐÏ ÕÍÏÌÞÁÎÉÀ ÏÇÒÁÎÉÞÅÎÉÑ × 100 ÓÅÓÓÉÊ + ÐÏÄËÌÀÞÅÎÉÑ Ë ÂÁÚÅ ÄÁÎÎÙÈ. ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ Õ×ÅÌÉÞÉÔØ ÌÉÍÉÔ ÎÁ ËÏÌÉÞÅÓÔ×Ï + ËÏÎËÕÒÅÎÔÎÙÈ backend ÐÒÏÃÅÓÓÏ× ÄÌÑ ×ÁÛÅÇÏ ÓÅÒ×ÅÒÁ âä, ÉÚÍÅÎÉ× ÚÎÁÞÅÎÉÅ max_connections × ÆÁÊÌÅ postgresql.conf - É ÐÅÒÅÓÔÁÒÔÏ×ÁÔØ postmaster.
+ É ÐÅÒÅÓÔÁÒÔÏ×ÁÔØ ÓÅÒ×ÅÒ âä.íÅÖÄÕ ÐÏÄ×ÙÐÕÓËÁÍÉ, ÒÁÚÒÁÂÏÔÞÉËÉ PostgreSQL ÄÅÌÁÀÔ ÔÏÌØËÏ ÉÓÐÒÁ×ÌÅÎÉÑ - ÏÛÉÂÏË. ôÁËÉÍ ÏÂÒÁÚÏÍ ÏÂÎÏ×ÌÅÎÉÅ Ó ×ÅÒÓÉÉ 7.4.8 ÄÏ 7.4.9 ÎÅ ÔÒÅÂÕÅÔ - ×ÙÐÏÌÎÅÎÉÑ dump É restore; ÄÏÓÔÁÔÏÞÎÏ ÏÓÔÁÎÏ×ÉÔØ ÓÅÒ×ÅÒ, ÕÓÔÁÎÏ×ÉÔØ - ÏÂÎÏ×Ì£ÎÎÙÅ ÆÁÊÌÙ óõâä É ÚÁÐÕÓÔÉÔØ ÓÅÒ×ÅÒ.
- -÷ÓÅ ÐÏÌØÚÏ×ÁÔÅÌÉ ÄÏÌÖÎÙ ÂÙ ÏÂÎÏ×ÌÑÔØÓÑ ÎÁ ÎÁÉÂÏÌÅÅ Ó×ÅÖÕÀ ÐÏÄ×ÅÒÓÉÀ - ËÁË ÔÏÌØËÏ ÏÎÁ ÂÕÄÅÔ ÄÏÓÔÕÐÎÁ. ÷ ÔÏ ×ÒÅÍÑ ËÁË ËÁÖÄÏÅ ÏÂÎÏ×ÌÅÎÉÅ - ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÎÅËÏÔÏÒÙÊ ÒÉÓË, ÐÏÄ×ÅÒÓÉÉ PostgreSQL ÒÁÚÒÁÂÙÔÙ×ÁÀÔÓÑ ÔÏÌØËÏ - ÄÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ ÏÂÝÉÈ ÏÛÉÂÏË Ó ÍÉÎÉÍÁÌØÎÙÍ ÒÉÓËÏÍ. ôÁËÉÍ ÏÂÒÁÚÏÍ, ×ÁÛ - ÒÉÓË Ó×ÑÚÁÎ ÔÏÌØËÏ Ó ÓÁÍÉÍ ÏÂÎÏ×ÌÅÎÉÅÍ.
- - -ðÒÉ ×ÙÈÏÄÅ ÏÞÅÒÅÄÎÏÇÏ ×ÙÐÕÓËÁ - (Ô.Å. ÐÒÉ ÏÂÎÏ×ÌÅÎÉÉ ÎÁÐÒÉÍÅÒ, Ó 7.3 ÎÁ 7.4) ÞÁÓÔÏ ÍÅÎÑÅÔÓÑ ×ÎÕÔÒÅÎÎÉÊ - ÆÏÒÍÁÔ ÓÉÓÔÅÍÎÙÈ ÔÁÂÌÉÃ É ÆÁÊÌÏ× ÄÁÎÎÙÈ. üÔÉ ÉÚÍÅÎÅÎÉÑ ÞÁÓÔÏ ÎÏÓÑÔ - ÓÌÏÖÎÙÊ ÈÁÒÁËÔÅÒ, ÔÁË ÞÔÏ ÍÙ ÎÅ ÏÂÓÌÕÖÉ×ÁÅÍ ÏÂÒÁÔÎÕÀ - ÓÏ×ÍÅÓÔÉÍÏÓÔØ ÄÌÑ ÆÁÊÌÏ× ÄÁÎÎÙÈ. ÷ ÜÔÉÈ ÓÌÕÞÁÑÈ ÄÌÑ ÏÂÎÏ×ÌÅÎÉÑ ÂÁÚÙ - ÄÁÎÎÙÈ ÔÒÅÂÕÅÔÓÑ ×ÙÐÏÌÎÉÔØ dump/restore.
+óÍ. ÉÎÆÏÒÍÁÃÉÀ Ï ÏÂÎÏ×ÌÅÎÉÉ × http://www.postgresql.org/support/versioning + É ÓÐÅÃÉÁÌØÎÙÅ ÉÎÓÔÒÕËÃÉÉ × + http://www.postgresql.org/docs/current/static/install-upgrading.html.
- 28 ÂÁÊÔ: ÎÁ ËÁÖÄÙÊ ÚÁÇÏÌÏ×ÏË ÓÔÒÏËÉ × ÔÁÂÌÉÃÅ (ÐÒÉÂÌÉÚÉÔÅÌØÎÏ) + 24 ÂÁÊÔ: ÎÁ ËÁÖÄÙÊ ÚÁÇÏÌÏ×ÏË ÓÔÒÏËÉ × ÔÁÂÌÉÃÅ (ÐÒÉÂÌÉÚÉÔÅÌØÎÏ) + 24 ÂÁÊÔÁ: ÏÄÎÏ ÐÏÌÅ Ó ÃÅÌÏÞÉÓÌÅÎÎÙÍ ÔÉÐÏÍ É ÏÄÎÏ ÔÅËÓÔÏ×ÏÅ ÐÏÌÅ + 4 ÂÁÊÔÁ: ÕËÁÚÁÔÅÌØ ÎÁ ÓÔÒÁÎÉÃÅ ÄÌÑ ×ÓÅÊ ÔÁÂÌÉÞÎÏÊ ÓÔÒÏËÉ ---------------------------------------- @@ -756,14 +748,14 @@ òÁÚÍÅÒ ÓÔÒÁÎÉÃÙ ÄÁÎÎÙÈ × PostgreSQL ÓÏÓÔÁ×ÌÑÅÔ 8192 ÂÁÊÔ (8 KB), ÔÁË ÞÔÏ: 8192 ÂÁÊÔ ÎÁ ÓÔÒÁÎÉÃÕ - --------------------- = 146 ÓÔÒÏË × ÔÁÂÌÉÃÅ ÎÁ ÓÔÒÁÎÉÃÕ âä (ÏËÒÕÇÌ£ÎÎÏ) - 56 ÂÁÊÔ ÎÁ ÓÔÒÏËÕ × ÔÁÂÌÉÃÅ + --------------------- = 158 ÓÔÒÏË × ÔÁÂÌÉÃÅ ÎÁ ÓÔÒÁÎÉÃÕ âä (ÏËÒÕÇÌ£ÎÎÏ) + 52 ÂÁÊÔ ÎÁ ÓÔÒÏËÕ × ÔÁÂÌÉÃÅ 100000 ÓÔÒÏË ÄÁÎÎÙÈ - ----------------------- = 685 ÓÔÒÁÎÉÃ × âä (ÏËÒÕÇÌ£ÎÎÏ) - 146 ÓÔÒÏË × ÔÁÂÌÉÃÅ ÎÁ ÓÔÒÁÎÉÃÕ + ----------------------- = 633 ÓÔÒÁÎÉÃ × âä (ÏËÒÕÇÌ£ÎÎÏ) + 158 ÓÔÒÏË × ÔÁÂÌÉÃÅ ÎÁ ÓÔÒÁÎÉÃÕ - 685 ÓÔÒÁÎÉà âä * 8192 ÂÁÊÔ ÎÁ ÓÔÒÁÎÉÃÕ = 5,611,520 ÂÁÊÔ (5.6 MB) + 633 ÓÔÒÁÎÉà âä * 8192 ÂÁÊÔ ÎÁ ÓÔÒÁÎÉÃÕ = 5,185,536 ÂÁÊÔ (5.2 MB)
éÎÄÅËÓÙ ÎÅ ÔÒÅÂÕÀÔ ÔÁË ÍÎÏÇÏ, ÎÏ ÐÏÓËÏÌØËÕ ÏÎÉ ÓÏÚÄÁÀÔÓÑ ÄÌÑ
@@ -822,13 +814,10 @@
C, ÐÏÔÏÍÕ ÞÔÏ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÕÚÎÁÔØ ÓÌÅÄÕÀÝÉÊ ÎÁÉÂÏÌØÛÉÊ
ÓÉÍ×ÏÌ ÄÌÑ ÎÅ-C ÌÏËÁÌÉ. ÷Ù ÍÏÖÅÔÅ ÄÌÑ ÔÁËÉÈ ÓÌÕÞÁÅ× ÓÏÚÄÁÔØ ÓÐÅÃÉÁÌØÎÙÊ
ÉÎÄÅËÓ text_pattern_ops
ËÏÔÏÒÙÊ ÒÁÂÏÔÁÅÔ ÔÏÌØËÏ ÄÌÑ
- LIKE ÉÎÄÅËÓÉÒÏ×ÁÎÉÑ.
+ LIKE ÉÎÄÅËÓÉÒÏ×ÁÎÉÑ. äÌÑ ÐÏÉÓËÁ ÓÌÏ× ÔÁËÖÅ ÍÏÖÎÏ
+ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÏÌÎÏÔÅËÓÔÏ×ÙÊ ÉÎÄÅËÓ.
-
÷ ×ÙÐÕÓËÁÈ ÄÏ ×ÅÒÓÉÉ 8.0, ÉÎÄÅËÓÙ ÞÁÓÔÏ ÎÅÌØÚÑ ÂÙÌÏ ÉÓÐÏÌØÚÏ×ÁÔØ, - ÅÓÌÉ ÔÉÐÙ ÄÁÎÎÙÈ ÔÏÞÎÏ ÎÅ ÓÏ×ÐÁÄÁÌÉ Ó ÉÎÄÅËÓÎÙÍÉ ÔÉÐÁÍÉ ËÏÌÏÎÏË. üÔÏ - ÏÓÏÂÅÎÎÏ ËÁÓÁÌÏÓØ int2, int8 É numeric ÉÎÄÅËÓÏ× ËÏÌÏÎÏË.
-÷Ù ÐÒÏÓÔÏ ÓÒÁ×ÎÉ×ÁÅÔÅ ÚÎÁÞÅÎÉÅ Ó IS NULL É IS NOT NULL, ËÁË ÚÄÅÓØ:
@@ -875,6 +864,13 @@ WHERE col IS NULL; +þÔÏÂÙ ÓÏÅÄÉÎÉÔØ Ó ×ÏÚÍÏÖÎÙÍÉ ÚÎÁÞÅÎÉÑÍÉ NULL, ÉÓÐÏÌØÚÕÊÔÅ + COALESCE() ËÁË ÚÄÅÓØ:
++ SELECT COALESCE(col1, '') || COALESCE(col2, '') + FROM tab ++
þÔÏÂÙ ÏÔÓÏÒÔÉÒÏ×ÁÔØ ÄÁÎÎÙÅ ÐÏ ÚÎÁÞÅÎÉÀ á×ÔÏÍÁÔÉÞÅÓËÉ ÓÏÚÄÁÎÎÁÑ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ ÉÍÅÅÔ ÉÍÑ ×ÉÄÁ
+ <ÔÁÂÌÉÃÁ>_<ËÏÌÏÎËÁ_serial>_seq, ÇÄÅ
+ ÔÁÂÌÉÃÁ É ËÏÌÏÎËÁ_serial - ÜÔÏ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ ÉÍÅÎÁ
+ ÔÁÂÌÉÃÙ É ËÏÌÏÎËÉ Ó ÔÉÐÏÍ SERIAL.
óÍÏÔÒÉÔÅ ÐÏÄÒÏÂÎÏÓÔÉ Ï ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÑÈ ÎÁ ÓÔÒÁÎÉÃÅ ÒÕËÏ×ÏÄÓÔ×Á
- ÐÏÓ×ÑÝÅÎÎÏÊ create_sequence.
+ ÐÏÓ×ÑÝÅÎÎÏÊ create_sequence. ïÄÉÎ ÉÚ ÓÐÏÓÏÂÏ× ÓÏÓÔÏÉÔ × ÐÏÌÕÞÅÎÉÉ ÓÌÅÄÕÀÝÅÇÏ ÚÎÁÞÅÎÉÑ
- SERIAL ÉÚ ÏÂßÅËÔÁ sequence Ó ÐÏÍÏÝØÀ ÆÕÎËÃÉÉ
- nextval() ÐÅÒÅÄ ×ÓÔÁ×ËÏÊ É ÚÁÔÅÍ ×ÓÔÁ×ÌÑÔØ ÜÔÏ ÚÎÁÞÅÎÉÅ
- Ñ×ÎÏ. éÓÐÏÌØÚÕÊÔÅ ÔÁÂÌÉÃÕ-ÐÒÉÍÅÒ × 4.11.1, ÐÒÉÍÅÒ
- × ÐÓÅ×ÄÏÑÚÙËÅ ÐÏËÁÖÅÔ ËÁË ÜÔÏ ÄÅÌÁÅÔÓÑ: ðÒÏÓÔÅÊÛÉÊ ÓÐÏÓÏ ÐÏÌÕÞÉÔØ ÎÁÚÎÁÞÅÎÎÏÅ ÚÎÁÞÅÎÉÅ SERIAL
+ ÜÔÏ ÉÓÐÏÌØÚÏ×ÁÔØ RETURNING. éÓÐÏÌØÚÕÑ ÄÌÑ ÐÒÉÍÅÒÁ ÔÁÂÌÉÃÕ × 4.11.1, ÜÔÏ ÍÏÖÅÔ ×ÙÇÌÑÄÅÔØ ÔÁË: ÷ ËÁÞÅÓÔ×Å ÁÌØÔÅÒÎÁÔÉ×Ù, ×Ù ÍÏÖÅÔÅ ÐÏÌÕÞÉÔØ ÎÁÚÎÁÞÅÎÎÏÅ ÚÎÁÞÅÎÉÅ
- SERIAL Ó ÐÏÍÏÝØÀ ÆÕÎËÃÉÉ currval()
- ÐÏÓÌÅ ÐÒÏ×ÅÄÅÎÉÑ ÏÂÙÞÎÏÊ ÏÐÅÒÁÃÉÉ ×ÓÔÁ×ËÉ, ÎÁÐÒÉÍÅÒ ëÁÖÄÁÑ, ÓÏÚÄÁ×ÁÅÍÁÑ × PostgreSQL ÔÁÂÌÉÞÎÁÑ ÓÔÒÏËÁ, ÐÏÌÕÞÁÅÔ ÕÎÉËÁÌØÎÙÊ
- ÉÎÄÅÎÔÉÆÉËÁÔÏÒ OID ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ÓÌÕÞÁÑ ËÏÇÄÁ
- ÉÓÐÏÌØÚÏ×ÁÌÏÓØ WITHOUT OIDS. OID - ÜÔÏ
- Á×ÔÏÍÁÔÉÞÅÓËÉ ÎÁÚÎÁÞÁÅÍÏÅ ÕÎÉËÁÌØÎÏÅ 4-È ÂÁÊÔÏ×ÏÅ ÃÅÌÏÅ ÞÉÓÌÏ.
+ åÓÌÉ ÔÁÂÌÉÃÁ ÓÏÚÄÁÎÁ Ó WITH OIDS, ÔÏ ËÁÖÄÁÑ ÓÔÒÏËÁ
+ ÐÏÌÕÞÁÅÔ ÕÎÉËÁÌØÎÙÊ ÉÎÄÅÎÔÉÆÉËÁÔÏÒ OID.
+ OID - ÜÔÏ Á×ÔÏÍÁÔÉÞÅÓËÉ ÎÁÚÎÁÞÁÅÍÏÅ ÕÎÉËÁÌØÎÏÅ 4-È
+ ÂÁÊÔÏ×ÏÅ ÃÅÌÏÅ ÞÉÓÌÏ, ËÏÔÏÒÏÅ ÕÎÉËÁÌØÎÏ ÄÌÑ ×ÓÅÊ ÕÓÔÁÎÏ×ÌÅÎÎÏÊ óõâä.
ïÄÎÁËÏ, ÐÏÓÌÅ ÔÏÇÏ ËÁË ÅÇÏ ÚÎÁÞÅÎÉÅ ÐÒÅ×ÙÓÉÔ 4 ÍÉÌÌÉÁÒÄÁ, ÚÎÁÞÅÎÉÑ
OID ÎÁÞÉÎÁÀÔ ÄÕÂÌÉÒÏ×ÁÔØÓÑ. PostgreSQL ÉÓÐÏÌØÚÕÅÔ
OID ÄÌÑ Ó×ÑÚÙ×ÁÎÉÑ Ó×ÏÉÈ ×ÎÕÔÒÅÎÎÉÈ ÔÁÂÌÉÃ. äÌÑ ÕÎÉËÁÌØÎÙÈ ÚÎÁÞÅÎÉÊ × ËÏÌÏÎËÁÈ ÔÁÂÌÉÃÙ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÌÕÞÛÉÍ
+ äÌÑ ÕÎÉËÁÌØÎÏÇÏ ÚÎÁÞÅÎÉÑ × ÓÔÒÏËÁÈ ÔÁÂÌÉÃÙ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÌÕÞÛÉÍ
ÓÐÏÓÏÂÏÍ Ñ×ÌÑÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ SERIAL ×ÍÅÓÔÏ
OID, ÐÏÔÏÍÕ ÞÔÏ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ SERIAL
ÕÎÉËÁÌØÎÙ ÔÏÌØËÏ ×ÎÕÔÒÉ ÔÁÂÌÉÃÙ É ÔÁËÉÍ ÏÂÒÁÚÏÍ ÍÅÎØÛÅ ÐÏÄ×ÅÒÖÅÎÙ
@@ -1047,7 +1033,7 @@
ðÒÅÄÐÏÌÏÖÉÔÅÌØÎÏ Õ ×ÁÓ ÚÁËÏÎÞÉÌÁÓØ ×ÉÒÔÕÁÌØÎÁÑ ÐÁÍÑÔØ
ÉÌÉ ÞÔÏ ×ÁÛÅ ÑÄÒÏ ÉÍÅÅÔ ÍÁÌÅÎØËÉÊ ÌÉÍÉÔ ÎÁ ÏÐÒÅÄÅÌÅÎÎÙÅ ÒÅÓÕÒÓÙ.
- ðÏÐÙÔÁÊÔÅÓØ ÐÅÒÅÄ ÚÁÐÕÓËÏÍ postmaster ×ÙÐÏÌÎÉÔØ ÓÌÅÄÕÀÝÉÅ
+ ðÏÐÙÔÁÊÔÅÓØ ÐÅÒÅÄ ÚÁÐÕÓËÏÍ ÓÅÒ×ÅÒÁ âä ×ÙÐÏÌÎÉÔØ ÓÌÅÄÕÀÝÉÅ
ËÏÍÁÎÄÙ: ÷Ù ÍÏÖÅÔÅ ÌÅÇËÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÆÕÎËÃÉÉ, ×ÏÚ×ÒÁÝÁÀÝÉÅ ÓÐÉÓÏË,
-
- http://techdocs.postgresql.org/guides/SetReturningFunctions.4.11.2) ëÁË ÍÎÅ ÐÏÌÕÞÉÔØ ÚÎÁÞÅÎÉÅ ÐÒÉ ×ÓÔÁ×ËÅ
SERIAL?
-
- new_id = execute("SELECT nextval('person_id_seq')");
- execute("INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal')");
-
+ new_id
ÄÌÑ ÅÇÏ ÉÓÐÏÌØÚÏ×ÁÎÉÑ × ÄÒÕÇÉÈ ÚÁÐÒÏÓÁÈ (ÎÁÐÒÉÍÅÒ
- ÔÁËÉÈ ËÁË ×ÎÅÛÎÉÊ ËÌÀÞ ÄÌÑ ÔÁÂÌÉÃÙ person
). úÁÍÅÔÉÍ,
- ÞÔÏ ÉÍÑ Á×ÔÏÍÁÔÉÞÅÓËÉ ÓÏÚÄÁÎÎÏÇÏ ÏÂßÅËÔÁ SEQUENCE
- ÂÕÄÅÔ <table>_<serialcolumn>_seq,
- ÇÄÅ table É serialcolumn Ñ×ÌÑÀÔÓÑ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ
- ÉÍÅÎÁÍÉ ×ÁÛÅÊ ÔÁÂÌÉÃÙ É ×ÁÛÅÊ ËÏÌÏÎËÉ SERIAL.
-
-
- execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
- new_id = execute("SELECT currval('person_id_seq')");
+ INSERT INTO person (name) VALUES ('Blaise Pascal') RETURNING id;
+ ÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ×ÙÚ×ÁÔØ nextval() É ÉÓÐÏÌØÚÏ×ÁÔØ ÜÔÏ ÚÎÁÞÅÎÉÅ ×
+ INSERT ÉÌÉ ×ÙÚ×ÁÔØ currval() ÐÏÓÌÅ
+ INSERT.
+
4.11.3) îÅ ÍÏÖÅÔ ÌÉ ÐÏÌÕÞÉÔØÓÑ ÔÁË, ÞÔÏ
ÉÓÐÏÌØÚÏ×ÁÎÉÅ currval() É nextval() ÐÒÉ×ÅÄÅÔ Ë
@@ -1020,15 +1006,15 @@
4.12) þÔÏ ÔÁËÏÅ OID? þÔÏ ÔÁËÏÅ
CTID?
-
ulimit -d 262144
@@ -1115,22 +1101,24 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
4.18) ëÁË ÍÎÅ ×ÅÒÎÕÔØ ÉÚ ÆÕÎËÃÉÉ ÎÅÓËÏÌØËÏ ÓÔÒÏË ÔÁÂÌÉÃÙ?
PL/PgSQL ËÜÛÉÒÕÅÔ ÓÃÅÎÁÒÉÉ ÆÕÎËÃÉÉ É ÏÄÉÎ ÉÚ ÎÅÇÁÔÉ×ÎÙÈ ÜÆÆÅËÔÏ× ÜÔÏÇÏ - ÓÏÓÔÏÉÔ × ÔÏÍ, ÞÔÏ ÅÓÌÉ ÆÕÎËÃÉÑ PL/PgSQL ÏÂÒÁÝÁÅÔÓÑ Ë ×ÒÅÍÅÎÎÏÊ ÔÁÂÌÉÃÅ - É ÜÔÁ ÔÁÂÌÉÃÁ ÐÏÚÄÎÅÅ ÕÄÁÌÑÅÔÓÑ É ÐÅÒÅÓÏÚÄÁÅÔÓÑ, Á ÆÕÎËÃÉÑ ÚÁÔÅÍ ×ÙÚÙ×ÁÅÔÓÑ - ÓÎÏ×Á, ÔÏ ÅÅ ×ÙÚÏ× ÐÒÉ×ÅÄÅÔ Ë ÏÛÉÂËÅ, ÐÏÔÏÍÕ ÞÔÏ ÓËÜÛÉÒÏ×ÁÎÎÏÅ ÓÏÄÅÒÖÉÍÏÅ - ÆÕÎËÃÉÉ ÓÏÄÅÒÖÉÔ ÕËÁÚÁÔÅÌØ ÎÁ ÓÔÁÒÕÀ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ. þÔÏÂÙ ÒÅÛÉÔØ ÜÔÕ - ÐÒÏÂÌÅÍÕ, ÉÓÐÏÌØÚÕÊÔÅ EXECUTE ÄÌÑ ÄÏÓÔÕÐÁ Ë ×ÒÅÍÅÎÎÙÍ +
÷ PostgreSQL ÄÏ ×ÅÒÓÉÉ 8.3, PL/PgSQL ËÜÛÉÒÕÅÔ ÓÃÅÎÁÒÉÉ ÆÕÎËÃÉÉ É ÏÄÉÎ ÉÚ + ÎÅÇÁÔÉ×ÎÙÈ ÜÆÆÅËÔÏ× ÜÔÏÇÏ ÓÏÓÔÏÉÔ × ÔÏÍ, ÞÔÏ ÅÓÌÉ ÆÕÎËÃÉÑ PL/PgSQL ÏÂÒÁÝÁÅÔÓÑ + Ë ×ÒÅÍÅÎÎÏÊ ÔÁÂÌÉÃÅ É ÜÔÁ ÔÁÂÌÉÃÁ ÐÏÚÄÎÅÅ ÕÄÁÌÑÅÔÓÑ É ÐÅÒÅÓÏÚÄÁÅÔÓÑ, Á ÆÕÎËÃÉÑ + ÚÁÔÅÍ ×ÙÚÙ×ÁÅÔÓÑ ÓÎÏ×Á, ÔÏ ÅÅ ×ÙÚÏ× ÐÒÉ×ÅÄÅÔ Ë ÏÛÉÂËÅ, ÐÏÔÏÍÕ ÞÔÏ ÓËÜÛÉÒÏ×ÁÎÎÏÅ + ÓÏÄÅÒÖÉÍÏÅ ÆÕÎËÃÉÉ ÓÏÄÅÒÖÉÔ ÕËÁÚÁÔÅÌØ ÎÁ ÓÔÁÒÕÀ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ. þÔÏÂÙ ÒÅÛÉÔØ + ÜÔÕ ÐÒÏÂÌÅÍÕ, ÉÓÐÏÌØÚÕÊÔÅ EXECUTE ÄÌÑ ÄÏÓÔÕÐÁ Ë ×ÒÅÍÅÎÎÙÍ ÔÁÂÌÉÃÁÍ × PL/PgSQL. éÓÐÏÌØÚÏ×ÁÎÉÅ ÜÔÏÇÏ ÏÐÅÒÁÔÏÒÁ ÚÁÓÔÁ×ÉÔ ÚÁÐÒÏÓ ÐÅÒÅÇÅÎÅÒÉÒÏ×ÁÔØÓÑ ËÁÖÄÙÊ ÒÁÚ.
+÷ PostgreSQL 8.3 É ÐÏÚÄÎÅÅ, ÜÔÏÊ ÐÒÏÂÌÅÍÙ ÎÅÔ.
+òÅÐÌÉËÁÃÉÑ Multi-master ÐÏÚ×ÏÌÑÅÔ ×ÙÐÏÌÎÑÔØ ÚÁÐÒÏÓÙ ÞÔÅÎÉÑ/ÚÁÐÉÓÉ @@ -1150,15 +1138,15 @@ CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); ÔÁËÖÅ ÐÒÉ×ÏÄÉÔ Ë ÐÏÔÅÒÅ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ, ÐÏÔÏÍÕ ÞÔÏ ÎÅÏÂÈÏÄÉÍÁ ÓÉÎÈÒÏÎÉÚÁÃÉÑ ÉÚÍÅÎÅÎÉÊ ÍÅÖÄÕ ÎÅÓËÏÌØËÉÍÉ ÓÅÒ×ÅÒÁÍÉ. îÁÉÂÏÌÅÅ ÐÏÐÕÌÑÒÎÙÍ ÒÅÛÅÎÉÅÍ ÄÌÑ ÔÁËÏÊ ÒÅÐÌÉËÁÃÉÉ × PostgreSQL Ñ×ÌÑÅÔÓÑ - Pgcluster. + PGcluster.
îÁÉÂÏÌÅÅ ÞÁÓÔÏ ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ ÉÚ-ÚÁ ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ä×ÏÊÎÙÈ ËÁ×ÙÞÅË × +
îÁÉÂÏÌÅÅ ÞÁÓÔÏ ÉÍÅÎÁ ÎÅÒÁÓÐÏÚÎÁÀÔÓÑ ÉÚ-ÚÁ ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ä×ÏÊÎÙÈ ËÁ×ÙÞÅË × ÉÍÅÎÉ ÔÁÂÌÉÃÙ ÉÌÉ ËÏÌÏÎËÉ ÐÒÉ ÓÏÚÄÁÎÉÉ ÔÁÂÌÉÃÙ. ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ Ä×ÏÊÎÙÈ ËÁ×ÙÞÅË, ÉÍÑ ÔÁÂÌÉÃÙ É ËÏÌÏÎËÉ (ËÏÔÏÒÙÅ ÎÁÚÙ×ÁÀÔ ÉÄÅÎÔÉÆÉËÁÔÏÒÁÍÉ) - ÓÏÈÒÁÎÑÀÔÓÑ × + ÓÏÈÒÁÎÑÀÔÓÑ × ÒÅÇÉÓÔÒÏ-ÚÁ×ÉÓÉÍÏÍ ×ÉÄÅ; ÜÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ×Ù ÄÏÌÖÎÙ ÉÓÐÏÌØÚÏ×ÁÔØ Ä×ÏÊÎÙÅ ËÁ×ÙÞËÉ, ËÏÇÄÁ ÕËÁÚÙ×ÁÅÔÅ ÜÔÉ ÉÍÅÎÁ × ÚÁÐÒÏÓÅ. îÅËÏÔÏÒÙÅ ÉÎÔÅÒÆÅÊÓÙ, ÔÁËÉÅ ËÁË pgAdmin, ×Ï ×ÒÅÍÑ ÓÏÚÄÁÎÉÑ ÔÁÂÌÉÃÙ ÄÏÂÁ×ÌÑÀÔ -- 2.40.0